BLEService does not survive BLE cycles #357
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Background Info
I am using a Nano 33 IoT 33. In this scenario, my Arduino plays a peripheral role.
What I refer to as "BLE cycle" is the process of using
BLE.begin()
... up until theBLE.end()
, with all the setup and config functions in between.Problem Description
During my first BLE cycle, everything goes as planned and I can communicate perfectly fine. However, upon ending BLE and doing other stuff, then coming back to it in another step, there will usually be one of these errors:
Thus this completely interrupts my device setup flow and I have to resort to resetting the device. Thankfully I have a state machine implementation but I don't believe this is a solution.
What I've Tried
Solution 2
In this solution, as described above, I opt to create a new characteristic and service for every BLE cycle. I have found that this sometimes works, specifically in these cases:
I'm all out of ideas at the moment. There's clearly something going wrong in the library level. I haven't been able to pinpoint exactly what causes this. Is there a way to enable some form of verbose logging in your library?
Minimal Reproducible Example
The text was updated successfully, but these errors were encountered: