tobozo / ESP32-BLECollector

ᛡᛒ BLE Scanner + Data persistence on SD Card for M5Stack, M5Core2, Odroid-Go, ESP32-Wrover-Kit and other models
https://youtu.be/G07loGS04Vg
MIT License
276 stars 31 forks source link

Known issues: BLEScan.cpp or sqlite3.c errors #2

Closed tobozo closed 4 years ago

tobozo commented 5 years ago

thanks to @chegewara, the latest changes on this app use a modified version of the ESP32_BLE library where many memory leaks are fixed,

This version hasn't been released yet and might change in the future, until then use this version:

ESP32_ble_library.zip

The sqlite3.c library now has a permanent fix for the assert() error, just make sure you update to the latest version from the repository.

image

tobozo commented 5 years ago

Both issues are now fixed by pulling the latest stable version of all packages.

mm108 commented 5 years ago

A (related) quick question - which would be the correct ble library to use? In the readme I found these 2 links. My earliest attempt to get this running had some issue. The BLE scans would find lesser devices after the scan runs for a few hours. This is probably because of the memory leak issues you have mentioned. Wondering which of the below libs is best suited for eliminating that problem? Thanks.

1) https://github.com/wakwak-koba/ESP32_BLE_Arduino 2) https://github.com/tobozo/ESP32-BLECollector/files/2614534/ESP32_ble_library.zip

cheers

tobozo commented 5 years ago

It'll work better (no code modification required) with the version from wakwak-koba, as it exposes the addressType so less garbage data is added to the database.

Could that explain the lesser results ?

What's the available heap and cache fill status when you observe this ?

Heap is in the upper right corner, and cache fill status are the three colored squared at the bottom righ near the graph.

mm108 commented 5 years ago

hi @tobozo, I just did some digging and realized that the BLE Arduino library that I was having was an older version - there was some crazy mix up. I got rid of the old ble libs and then used the one from wakwak-koba as you mentioned, and so far so good! The results have been very consistent. I'll be monitoring the values and should I face a similar scenario, I'll post the values I gather. Btw thanks a ton for the amazing work - it's one of the best I've seen so far. This should have more stars! I have a feeling that this issue can be closed. If you had a PayPal button I'd want to get you couple of beers :)

tobozo commented 5 years ago

thanks !

BTW the sqlite library is now available from Arduino Library manager, and the latest release is supposed to be more gentle on memory (although a bit slower on writes).

Also I just realized I had changes unstaged commits and pushed them on the unstable branch.

There's another interesting project you may want to test, it's the ESP32-Paxcounter, it gave me the idea to order some DCF77@77.5KHz modules to play with ^_^

[edit] also keeping this issue open since there's still ambiguity on the library

mm108 commented 5 years ago

Wow cool. Just had a look at the ESP32-Paxcounter and first look - it looks pretty cool! I have a bunch of ESP32s lying around - and probably couple of them have LoRa on them. The Paxcounter project is pretty interesting and I'll give it a try as soon as time permits. And the more important question - Can I donate for some beer? Just a small token of appreciation.

tobozo commented 5 years ago

I appreciate very much your feedback, may I suggest you use this money to donate yourself a M5Stack or an Odroid-Go ?

I'm trying to make this project multi platform as a good UI challenge but it only has occasional testers :smile:

mm108 commented 5 years ago

hmmm, noted :) It could be a M5Stack after I clear some of the clutter on my table. Thanks once again and I'll post when I meddle with the Paxcounter. Cheers & all the best with your project.

tobozo commented 4 years ago

closing this as no longer relevant after switching to Nimble-Arduino