jrowberg / bglib

BGLib implementation for Bluegiga BLE Bluetooth Smart modules
Other
240 stars 170 forks source link

Blescanner.py cannot detect any BLE devices #57

Closed fafa92 closed 6 years ago

fafa92 commented 6 years ago

Hi, I was going through this instruction ==> "http://docs-europe.electrocomponents.com/webdocs/12eb/0900766b812eb651.pdf" and then when I'm trying to run python code to scan other BLE devices it cannot detect any while there so many around it. Basically, I'm seeing something like this, can someone help me with this? image

jrowberg commented 6 years ago

I would recommending that you uncomment the debug output statements on lines 293, 299, 305, 311, and 355, then re-run the script. This should identify any unexpected results coming back in response or event packets.

fafa92 commented 6 years ago

Thank you @jrowberg for your response, I did uncomment those line and I'm getting this, can you please help me what that means? Thanks image

jrowberg commented 6 years ago

That visible sequence of hex bytes translates per asciitohex.com as follows:

<--- enter ASCII 0 to reboot in dfu

Fortunately, this tells you exactly what you have to do. Your BLED112 is programmed with non-standard firmware, running some BGScript application. This means that it will not respond as expected to any BGAPI protocol commands. You will need to reboot in DFU mode and then use BLE GUI (or dfutool.exe via command line) to reflash the .hex file from the "usbcdc" example project that comes with the SDK. It should then start working as expected.

fafa92 commented 6 years ago

Thank you, it's been fixed