I was puzzling over some trivial BLE code not working on REPL on 5.3.0 on an nrF52840 based CPB, e.g.:
>>> import adafruit_ble
>>> from adafruit_ble.advertising.standard import Advertisement
>>> ble = adafruit_ble.BLERadio()
>>> scan = ble.start_scan(Advertisement, timeout=5)
>>> print(scan)
<generator object 'start_scan' at 20016600>
>>> for adv in scan:
... print(adv.complete_name)
...
...
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_ble/__init__.py", line 235, in start_scan
KeyboardInterrupt:
The control-c was probably after 20-40 seconds.
I loaded up some known working code from https://learn.adafruit.com/circuit-playground-bluefruit-quick-draw-duo/quick-draw-duo and this also fails in the same way and same place in start_scan().
I went back to 5.2.0 and it's working now. This and the code around line 235 suggests the problem is more likely to lay here than in https://github.com/adafruit/Adafruit_CircuitPython_BLE
I'm using libraries from adafruit-circuitpython-bundle-5.x-mpy-20200501.zip
I was puzzling over some trivial BLE code not working on REPL on
5.3.0on an nrF52840 based CPB, e.g.:The control-c was probably after 20-40 seconds.
I loaded up some known working code from https://learn.adafruit.com/circuit-playground-bluefruit-quick-draw-duo/quick-draw-duo and this also fails in the same way and same place in
start_scan().I went back to
5.2.0and it's working now. This and the code around line 235 suggests the problem is more likely to lay here than in https://github.com/adafruit/Adafruit_CircuitPython_BLEI'm using libraries from adafruit-circuitpython-bundle-5.x-mpy-20200501.zip