You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with a MKR1010 and I realised something was wrong with the detection of a connected central.
In my code, I'm using ArduinoLowPower and ArduinoBLE library.
Let's say my smartphone is connected to my MKR1010.
After X seconds, I'm putting the duino in deepsleep where I shut down everything, including the BLE, with BLE.end().
The duino wakes up if a button (attach to pin 5) is pressed and I turn on everything back again.
And here comes the problem :
In my loop() there is a condition if (central.connected()) which will be true even though nothing is connected. (Assuming BLE.end() disconnect everything.)
The only solution I found is to use central.disconnect() before going into sleep mode.
Hi @mcxiv ,
this is related to #127
An end function should be added to the ATT class, in order to clean up the library's state. However your workaround seems nice to me
Hi,
I'm working with a MKR1010 and I realised something was wrong with the detection of a connected central.
In my code, I'm using
ArduinoLowPower
andArduinoBLE
library.Let's say my smartphone is connected to my MKR1010.
After X seconds, I'm putting the duino in deepsleep where I shut down everything, including the BLE, with
BLE.end()
.The duino wakes up if a button (attach to pin 5) is pressed and I turn on everything back again.
And here comes the problem :
In my
loop()
there is a conditionif (central.connected())
which will be true even though nothing is connected. (AssumingBLE.end()
disconnect everything.)The only solution I found is to use
central.disconnect()
before going into sleep mode.It looks familiar with #33.
The text was updated successfully, but these errors were encountered: