Skip to content
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

scan_evt timeout spammed in serial monitor #226

Open
naice opened this issue Sep 12, 2023 · 8 comments
Open

scan_evt timeout spammed in serial monitor #226

naice opened this issue Sep 12, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@naice
Copy link

naice commented Sep 12, 2023

Hi,

first of thanks for your hard work! I let the hub run on my ESP32 over night PC was in deep sleep when i turned it on again this morning my serial monitor is spammed with "scan_evt timeout".
image

already searched your source for it but couldn't find it, is this caused by the BLE library? I am just curious about the issue.

@technyon
Copy link
Owner

Hi,

yes this comes from the BLE lib. If this causes issues for you (like the lock state not updating), consider to set "Restart if bluetooth beacons not received" to something like 60 seconds.

@naice
Copy link
Author

naice commented Sep 12, 2023

I was thrilled already by the fact that the hub could connect to my front door as i am so far away (an entire floor level in my house), i just think thats because of an unstable signal.

But thx for the fast response, if i detect any issues i will try the setting.

@technyon
Copy link
Owner

That would sure explain the timeout warnings ... if possible move the ESP closer.

@jaynis
Copy link

jaynis commented Sep 17, 2023

Hi. I am experiencing the same problem since I updated to 8.26. The issue occurs about once a day for me and results in the Nuki BLE connection being completely broken (only a manual restart helps). Before I was running on 8.22 which worked flawlessly for me with only one crash within 2 months. While I was investigating the issue I found espressif/arduino-esp32#5860 where bleScan->clearResults(); is suspected to be the root cause. This would make sense because it was introduced after version 8.22 to this project.
I am currently running a custom build where I simply removed the clearResults() call again to see if that improves my situation. I understand there are certainly good reasons why this has been added, but at least for me it was working better without.

I will consider enabling "Restart if bluetooth beacons not received" as well but while this might mitigate the issue I would rather see this as a workaround and last resort than a fix.

@technyon
Copy link
Owner

Thanks for looking into this. Yes, this would indeed explain it. The automatic restart option doesn't work for you?

@jaynis
Copy link

jaynis commented Sep 19, 2023

I havent tested the automatic restart option yet because before you mentioned it here I did not know it might be of help regarding my problem. But generally the automatic restart sounds a bit like symptom treatment rather than a fix of the root cause, what I am looking for.

@technyon
Copy link
Owner

It is, and I'm not happy about having to resort to this. There are issues in the Espressif bluetooth stack, my guess is this is only one of them. Especially when using bluetooth and wifi at the same time, the stack sometimes silently dies. This is at least one hint at what's going on.

@iranl
Copy link
Collaborator

iranl commented May 21, 2024

It seems a fix for this problem has apparently been included in IDF 5.1.3 and up, see espressif/esp-idf@74f99d2, espressif/esp-idf@56563f7 and espressif/esp-idf@2ec5d6b.

So hopefully this will be fixed in Arduino Core 3.0 as this is based on IDF 5.1

@iranl iranl added this to the Arduino Core 3.0 milestone May 21, 2024
@iranl iranl added the bug Something isn't working label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants