-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Missing BT device when scanning stopped. #1
Comments
Thanks
Orignal project is here https://github.com/davidkroell/bodycomposition and includes the arm64 package.
I've been using my solution for over a year and I haven't noticed such things. Are you using Arduino ESP32 version 1.4 library? or maybe you are using RPI for BLE synchronization? (unfortunately I cannot help with that). |
It does but the latest version is missing the fix for the EOF issue.
Sorry, I wasn't specific enough here. I'm using LOLIN32 board but with Arduino ESP32 2.0.0. I couldn't find version 1.4 (all I see is version 2.0.0 and then 1.0.6 and below). Btw. my logs look like this (no code changes, except for the extra log added):
|
Wait a while, new version will come out, working on extending functionality:
Download from here https://github.com/espressif/arduino-esp32 |
Thanks. For now I compiled one by myself and works fine. But I'll keep an eye on that repo.
If it's 1.0.4 then I'll try it out. |
I couldn't compile it against 1.0.4, some errors around
|
I had the same, and that's why the older library (1.0.4) solved the problem. I am adding your fix to the code. |
@krystianpe
On the old 1.0.4 library, it looks like this:
Did you correct anything else ? |
Yup, turns out it wasn't always working. For now I changed it to:
it's not perfect but seems to work. Now it stops scanning on the next device after MiScale is detected. |
@krystianpe |
Yup, fixed my problem with 1.0.4 and BigSur (espressif/arduino-esp32#4408) and was able to compile against it. It works... but I wouldn't be myself if I left it as it is, so I dig some more and found something that looks like a probable cause of it. Here it passes the advertised device to the callback but at this point it's not yet stored in the vector, so when you stop scanning it ignores the last result. It seems like that's how they want it to be, though maybe it would make sense to report it...
Previously I would say this works but since I had so many failed attempts, I'm not promising anything now :D (though it works for me) |
@krystianpe |
Sure, here are the changes in better context. I'm sending it here instead of PR, as I made few other changes and I'm not sure you'd want them, so pick whatever you need from this. I also tested it against 2.0.1-RC1, as it seems to have quite a few bug fixes, including some in the BLE library.
|
I tested your fix on version 2.0.0, this is how it solves the problem with BLE, unfortunately I noticed a very unstable connection to WiFi (every second connection is successful, this problem does not exist in version 1.0.4). |
I haven't noticed any issues but will have a look. Have you tried 2.0.1-RC1, maybe that one has something that would help. Either way I'll check and get back to you if I find anything helpful. |
Same problem on version 2.0.1-rc1 :(, back to stable version 1.0.4 |
First of all amazing project.
Some feedback after testing it. I had to recompile
bodycomposition
because I'm using RPi witharm64
. I can provide the 64-bit version if you would wish to add it. I also had some problems with BLE scanning. Turns out when the scanning was manually stopped (instead of the timeout) it wouldn't add the last device detected (which in that case would be the MiScale). For now I just removed that line from the code and reduced scanning time to 20sec. Not sure why that happens...The text was updated successfully, but these errors were encountered: