BLE Database Generation

I’m attempting to generate a BLE database for a bc127, however I get the following message.

Traceback (most recent call last):
File “D:\ble\”, line 66, in
db_gen_lib = CDLL(“db_gen/bin/Release/db_gen”)
File “C:\Users\rawli\WinPython-64bit-\python-2.7.12.amd64\lib\”, line 362, in init
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 193] %1 is not a valid Win32 application

I’ve tried using several versions of python on several different systems, both win64 and linux, and while the specific text varies slightly, I keep ending up at the same result that the dll isn’t valid.

Is there something I can do to fix this problem?


+1. Has anybody had any luck with this?

Yes! There is another post on this forum where a user said they were able to use this on Win10 with Python2.7. So, I tried this and it also failed for me. However, I did some digging on the error:

windowserror: [error 193] %1 is not a valid win32 application

And on StackExechange there is an unrelated post where some was having a similar issues. The resolve was to use the 32 Bit (x86) version of Python. I am running x64 Windows 10 machine.

I uninstalled my x64 version of Python, I installed Python 2.7.18 (x86) version and tried again. I’m happy to report that the db_gen.dll now works with the provided file.

Please try a 32 bit version of python for this!!!