Many Pies

Many Pies

Friday, July 25, 2008

Getting going with BT's Web21C

In which our hero spends days downloading and fiddling with stuff just to send a text message.

I've spent a couple of days getting going with BT's Web21C SDK. I started on Windows trying to get Python going, switching to Ubuntu a couple of times in the middle. In the end I gave up, and switched to PHP on Ubuntu. The latter hardly took any time to get working. I had planned to document how I got the python working from my notes, but seeing as I didn't I've just kept my notes here in case it helps someone else. I couldn't believe the hoops I had to go through, modifying source code for python modules, installing lots and lots of software.

Using python:
download python tools
See EasyInstall
Watch where it says it's install it to then add to path:
set path=%path%;c:\program files\python\scripts

easy_install zsi

to run actual programmodify sample, remove previous sys.path.insert and put this before import service
sys.path.insert(0, '../build/lib/btsdk')
says it needs other stuff:

Download (non-light) SSL from
and MSVC runtime from

and then run certs-utility.bat

Gave up on WIndows ssl ( openssl ordinal 3288 error message), used Ubuntu.
Then did last step in Python, but need to install M2Crypto,

for which you need .net framework sdk 1.1
and swig (
add swig dir to path
copy open ssl includes to python include

error: Setup script exited with error: Python was built with version 7.1 of Visual Studio, and extensions need to be built with the same version of the compiler
, but it isn't installed.
create distutils.cfg file

command gcc failed

(diverted to linux but that failed because couldn't find pyconfig.h when trying to get ZSI installed - which works on windows)

Off to
guess that I just need the "developer" package, though could probably do with less as that took ages to install.
added c:\cygwin\bin to the path
replace regexp in distutils\ line 100 with this
version_re = re.compile(r'(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?',

copy openssl\lib\*.lib to python\scripts

gave up
found this:
(this may be helpful
command given didn't work, but used this
python build_ext -I\localcopyofincludeDirectoryBecauseBuildingOnANetworkDriveAndYouCan'tSpecifyADifferent drive letter --openssl=c:\progra~1\openssl

python install (bdist_wininst thought it wasn't running on win32)

copy m2crypto-0.18.2\build\lib.cygwin-1.5.25-i686-2.5\m2crypto to site-packages under python
write program instead of running last line of setup batch file:
import pkg_resources
from btsdk import utility

cygwin complains about crypto dll even though it's there
add c:\cygwin\bin to path
complains about incompatible cygwin1.dll

1 comment:

Anonymous said...

Thanks for your contribution to the WeAreMedia Wiki