-
-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pScan->start(...) blocking forever #617
Comments
maybe I found the problem, the scan doesn't stop even after the endscancb is called |
nope, even by adding in the callback NimBLEDevice::getScan()->stop(); it doesn't work and keep waiting for something
|
this #297 helps but it's not perfect btw |
What MCU is this on? Can you share a code snippet to reproduce? |
I'm using an esp32, I fixed it by using a task on core 0. What I don't understand is why both the blocking and non-blocking versions, after scanning for "x" seconds, don't return control to the main loop, obviously with two cores there are no problems for the application I need to run however I would like to be able to solve or at least understand if I am doing something wrong. Part of the code:
setup(): p.s. this is the whole library I use to manage a bluetooth remote control, many things maybe you don't care about, look directly for pScan (object I use to call the scan start) if you don't want to look at the whole code! |
A quick look suggests that the scan task is being suspended in various situations but never resumed so the scan is never restarted. |
Closing this as it does not appear to be an issue with the library. |
Hi, when I run pScan->start(5, scanEndedCB, false); or pScan->start(5, false); even after it has finished scanning the program goes into infinite loop and I don't understand why, my code doesn't include cycles after the call to start (apart from the loop of course) and it just seems like the program is waiting for something and doesn't even crash, I hope you can provide me with a solution, thanks in advance.
update: only occurs if the bluetooth device I want to connect to with esp32 is turned off (a BLE remote control)
The text was updated successfully, but these errors were encountered: