cyberman54 / ESP32-Paxcounter

Wifi & BLE driven passenger flow metering with cheap ESP32 boards
https://cyberman54.github.io/ESP32-Paxcounter/
Other
1.69k stars 397 forks source link

Store packages in microSD if not able to send them #280

Closed davidex720 closed 5 years ago

davidex720 commented 5 years ago

Using tbeam it could be really helpful to have the opportunity to store messages that were not successfully sent. Doing so it could be possible to make something like a buffer of older message that the device could send once it reconnects to a gateway. Using GPS lock the tbeam could store the messages with both time and gps coordinate

cyberman54 commented 5 years ago

You're welcome to make pull request to implement this, shouldn't be too complicated since we have all necessary parts already in the code:

davidex720 commented 5 years ago

very cool! the idea to use a microSD is coming from the need to validate the package sniffing, a lot easier on a microSD than on PSRAM very cool the gps time implementation, I'll have a look at that

cyberman54 commented 5 years ago

What do you mean by validate the package sniffing ? The intention of paxcounter is to have a privacy respecting simple counter, not to have an offline wireshark device for collecting sniffed data.

davidex720 commented 5 years ago

i was thinking about tests

cyberman54 commented 5 years ago

a lot easier on a microSD than on PSRAM

I don't see that it makes a big difference how and where to store the data.

@davidex720 You just need to rewrite the mallocator function to store data where and how you want it, e.g. on a filesystem.

davidex720 commented 5 years ago

ok, thank you, i'll do it

cyberman54 commented 5 years ago

@DavideNesi If you do it, would be nice to see your pull request here after.

cyberman54 commented 5 years ago

@davidex720 for SD card usage with ESP32, see here:

https://github.com/espressif/arduino-esp32/issues/1190#issuecomment-470721024