Skip to content

petermoor877/ESP32-BLECollector

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32-BLECollector

Like a BLE Scanner but with persistence.

ESP32 BLECollector running on Wrover-Kit

All BLE data found by the BLE Scanner is collected into a sqlite3 format on the SD Card.

Public Mac addresses are compared against OUI list, while Vendor names are compared against BLE Device list.

Two databases are provided in a db format (mac-oui-light.db and ble-oui.db).

The blemacs.db file is created on first run. When a BLE device is found, it is populated with the vendor name (if any) and inserted in the blemasc.db file.

/!\ Use the "No OTA (Large Apps)" partition scheme to compile this sketch. As a result a SD Card is required and you can't use SPIFFS.

Known issues / Roadmap

Because sqlite3 and BLE library already use a fair amount of RAM, there isn't much room left for additional tools such as Web Server, db parser, NTP sync or data logging over network.

Also the code is far from optimized (pull requests accepted!).

More memory errors occur when adding any of the following features:

  • WiFi
  • ArduinoJSON
  • FOTA Update from SD
  • GPS+NMEA
  • OLED / TFT

Some ideas I'll try to implement in the upcoming changes:

  • implement GATT services
  • add timestamps + GPS Coords to entries for better pruning as suggested by /u/playaspect
  • move the ble-oui query outside the devicecallback (this is causing watchdog messages) and populate between scans
  • reduce the memory problems to avoid restarting the ESP too often (currently restarts when heap is under 120k)
  • have the data easily exported without removing the sd card (wifi, ble, serial)

Credits/requirements:

About

BLE Scanner + Data persistence on SD Card

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 64.2%
  • C++ 35.8%