Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tobozo authored Nov 3, 2018
1 parent b082e00 commit 00e29b1
Showing 1 changed file with 39 additions and 19 deletions.
58 changes: 39 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,63 @@ Like a BLE Scanner but with persistence.





All BLE data found by the [BLE Scanner](https://github.com/nkolban/ESP32_BLE_Arduino) is collected into a [sqlite3](https://github.com/siara-cc/esp32_arduino_sqlite3_lib) format on the SD Card.

Public Mac addresses are compared against [OUI list](https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf), while Vendor names are compared against [BLE Device list](https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers).

Two databases are provided in a db format ([mac-oui-light.db](https://github.com/tobozo/ESP32-BLECollector/blob/master/SD/mac-oui-light.db) and [ble-oui.db](https://github.com/tobozo/ESP32-BLECollector/blob/master/SD/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.
When a BLE device is found, it is populated with matching oui/vendor name (if any) and eventually 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.
/!\ Use the "No OTA (Large Apps)" or "Minimal SPIFFS (Large APPS with OTA)" partition scheme to compile this sketch.
The memory cost of using sqlite and BLE libraries is quite high.
As a result you can't use sqlite with SPIFFS, only the SD Card.

Known issues / Roadmap
----------------------
Hardware requirements
---------------------
- [mandatory] ESP32 (with or without PSRam)
- [mandatory] SD Card breakout (or bundled in Wrover-Kit, M5Stack, LoLinD32 Pro)
- [mandatory] Micro SD (FAT32 formatted, **max 32GB**)
- [mandatory] [mac-oui-light.db](https://github.com/tobozo/ESP32-BLECollector/blob/master/SD/mac-oui-light.db) and [ble-oui.db](https://github.com/tobozo/ESP32-BLECollector/blob/master/SD/ble-oui.db) files copied on the Micro SD Card root
- [mandatory] ILI9341 320x240 TFT (or bundled in Wrover-Kit, M5Stack, LoLinD32 Pro)
- [optional] I2C RTC Module (see "#define RTC_PROFILE" in settings.h)

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!).
RTC available Profiles:
-----------------------
- **Hobo**: Default profile, no TinyRTC module in your build, only uptime will be displayed
- **Rogue**: TinyRTC module adjusted after flashing (build DateTime), no WiFi, no NTP Sync
- **Chronomaniac**: TinyRTC module adjusts itself via NTP (separate binary, requires WiFi)

Optional I2C RTC Module requirements (/!\ **Chronomaniac** profile only):
-------------------------------------
- Set `#define RTC_PROFILE NTP_MENU` in [Settings.h](https://github.com/tobozo/ESP32-BLECollector/blob/master/Settings.h)
- Set your `WIFI_SSID` and `WIFI_PASSWD` in [Settings.h](https://github.com/tobozo/ESP32-BLECollector/blob/master/Settings.h)
- Export compiled binary as `NTPMenu.bin` && copy the file on the SD Card
- Set `#define RTC_PROFILE CHRONOMANIAC` in [Settings.h](https://github.com/tobozo/ESP32-BLECollector/blob/master/Settings.h)
- Export compiled binary as `BLEMenu.bin` && copy the file on the SD Card
- Insert the SD Card
- Flash the ESP

More memory errors occur when adding any of the following features:
Contributions are welcome :-)


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.

- WiFi
- ArduinoJSON
- FOTA Update from SD
- GPS+NMEA
- ~~OLED / TFT~~
The NTP sync problem is now solved by sd-loading a NTP app, and storing the time on an external RTC module.
So the next big question is about adding controls :thinking:.

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

- implement [GATT services](https://www.bluetooth.com/specifications/gatt/services)
- add timestamps + GPS Coords to entries for better pruning [as suggested by /u/playaspect](https://www.reddit.com/r/esp8266/comments/9s594c/esp32blecollector_ble_scanner_data_persistence_on/e8nipr6/?context=3)
- Implement [GATT services](https://www.bluetooth.com/specifications/gatt/services)
- Use the RTC to add timestamps (and/or) GPS Coords to entries for better pruning [as suggested by /u/playaspect](https://www.reddit.com/r/esp8266/comments/9s594c/esp32blecollector_ble_scanner_data_persistence_on/e8nipr6/?context=3)
- ~~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)
- Reduce the memory problems to avoid restarting the ESP too often (currently restarts when heap is under 100k)
- Have the data easily exported without removing the sd card (wifi, ble, serial)

Credits/requirements:

Expand Down

0 comments on commit 00e29b1

Please sign in to comment.