This Arduino sketch is designed for Freematics ESP32 GNSS Kit to work as a GPS data logger and Traccar client while also providing access for real-time and logged data over WiFi.
By default, ESP32's internal flash is used as SPIFFS for data storage. Due to limited flash size, rotation logging is implemented. MicroSD data logging is also supported.
The sketch runs a HTTP server through ESP32's WiFi (AP and/or station). Implemented HTTP APIs provide remote access for device running status, statistics and logged/logging data.
Implemented HTTP APIs:
- /api/info - device info
- /api/live - live data
- /api/list - list of log files
- /api/log/[file #] - content of CSV format log file
- /api/data/[file #]?pid=[PID # in HEX] - filtered data in JSON array
A Traccar client is implemented. Simply change the host server address and device ID settings in config.h to make the client push data to your Traccar server.
- Freematics ESP32 GNSS Kit
- PlatformIO, Arduino IDE or Freematics Arduino Builder for compiling and uploading code