Closed brettfiedler closed 6 months ago
This isn't a dealbreaker, but it is an extra step if you need to disconnect the micro:bit for any reason (e.g., updating its code or switching power supplies)
To easily reproduce:
1) Create a project that writes to the controller with UUART. 2) Put a program in front of the camera with this component. 3) THEN, connect to BLE. 4) Paper Playground WILL send data to the microbit, but nothing happens and no error occurs.
A good test case: Simple UART Example in microcontroller-ble-demos > microbit-ble-demos. Use the microbit-playper-bridge-v2.hex file.
OK, this should be resolved. This was my fault. There is a map of characteristics that have in-progress writes. If a write is in-progress we try to avoid sending another. If there is an error writing to the charactersitic (like before the BLE device is connected), the characteristic was not removed from the map. So from then on it was impossible to write to the characteristic.
This has been merged into main, closing.
This error appears when a paper is detected (like microcontroller-ble-demos > microbit-ble-demos > UART to IO Pins (LEDs) with Markers). When connecting to the microbit via "Connect to BLE", the connection is successful by all metrics on both PP side and micro:bit side, but the micro:bit does not seem to read anything sent over UART.
Solution:
Can we catch this and try to start the service again when we're connected? Or perhaps we should never even try to connect to the service until we're connected to a device?