Cyberes 8fae0cd5db | ||
---|---|---|
.. | ||
.vscode | ||
.gitignore | ||
Kconfig.projbuild | ||
README.md | ||
config.h | ||
config.xml | ||
dataserver.cpp | ||
platformio.ini | ||
teleclient.cpp | ||
teleclient.h | ||
telecrypt.cpp | ||
telecrypt.h | ||
telelogger.bin | ||
telelogger.ino | ||
telemesh.cpp | ||
telemesh.h | ||
telestore.cpp | ||
telestore.h |
README.md
This Arduino sketch is developed for Freematics ONE+ to collect vehicle telemetry data from OBD, GPS, motion sensor, to log the data in local storage and to transmit the data to a remote server in real-time. It demonstrates most capabilities of Freematics ONE+ and works well with Traccar GPS tracking platform.
Data Collection
The sketch collects following data.
- Vehicle OBD data (from OBD port)
- Battery voltage (from OBD port)
- Geolocation data (from internal or external GNSS)
- Accelerometer and gyroscope data (from internal MEMS motion sensor)
- Cellular or WiFi network signal level
- Device temperature
Collected data are stored in a circular buffer in ESP32's IRAM or PSRAM. When PSRAM is enabled, hours of data can be buffered in case of temporary network outage and transmitted when network connection resumes.
Data Transmission
Data transmission over UDP and HTTP(s) protocols are implemented for the followings.
- WiFi (ESP32 built-in)
- 3G WCDMA (SIM5360)
- 4G LTE CAT-4 (SIM7600)
- 4G LTE CAT-M (SIM7070)
UDP mode implements a telemetry client for Freematics Hub and Traccar. HTTP(s) mode implements OsmAnd protocol with additional data sent as POST payload.
Seamless WiFi and cellular network co-working is implemented. When defined WiFi hotspot is available, data is transmitted via WiFi and cellular module is switched off. When no WiFi hotspot can be reached, cellular module is switched on for data transmission until WiFi hotspot available again.
Data Storage
Following types of data storage are supported.
- MicroSD card storage
- ESP32 built-in Flash memory storage (SPIFFS)
BLE & App
A BLE SPP server is implemented in FreematicsPlus library. To enable BLE support, change ENABLE_BLE to 1 config.h. This will enable remote control and data monitoring via Freematics Controller App.
Prerequisites
- Freematics ONE+ Model A, Model B, Model H
- A micro SIM card if cellular network connectivity required
- PlatformIO, Arduino IDE, Freematics Builder or ESP-IDF for compiling and uploading code