Closed Parakoos closed 2 years ago
Two more pieces of info. First is that the Adafruit Connect app's UART functionality seem to not be affected by this issue.
Second is that if you comment out the line with characteristicRead.startNotifications()
then the code will fail at the write, characteristicWrite.writeValueWithoutResponse(encodedValue)
.
I had an idea and went through Windows, removing all mentions of the Circuit Playground as a saved Bluetooth device, upgraded it to v7.0 and tried the code above. It worked.
I am going to close this issue now as I'm not sure I can reproduce it anymore. There may be something weird going on here with upgrading a board from 6.3 to 7.0 that may trip people up.
Thanks for the update! CircuitPython's BLE internals changed with 7.0.0 that may require erasing the bonding info. Glad you got it working.
CircuitPython version
Code/REPL
Behavior
All is OK on the board, but the following Javascript will fail. If I switch over to 6.3.0 (uf2 file to bootloader as well as swap the adafruit_ble to corresponding version) then it works without a problem.
The error thrown is on the line where you start the notifications (await characteristicRead.startNotifications()) and what is caught is as follows: {code: 9, message: 'GATT operation not permitted.'}
Description
I have run the exact same javascript and code.py in three different situations:
All the code (javascript and code.py) remains identical in all three situation. The only thing that changes is the version of Circuit Python and the adafruit_ble library (7.0.0 vs 6.3.0) . It works on the 6.3.0 Circuit Playground Bluefruit and 7.0.0 itsybitsy, but if fails on 7.0.0 Circuit Playground Bluefruit .
Additional information
You can run the javascript in the dev console on any screen.