How do you keep collecting useful data when the connection disappears?
A small box with several jobs
The datalogger combines a Raspberry Pi, a PiCAN 2 CAN interface and a SIM7600E-H modem with GPS. It polls OBD-II vehicle data and reads position information, then sends records to Supabase over a 4G connection.
It is designed for unattended operation, where the interesting work begins after the first successful upload. Power cycles, serial-device changes and lost connectivity all need an explicit response.
Make failure local
Independent reader and uploader threads keep one component’s interruption from stopping the entire pipeline. A SQLite queue buffers records when uploads fail and flushes them when the connection returns.
The surrounding system includes stable device names, systemd services and modem recovery helpers. Together they address the practical gap between a script that runs once and a device that can keep working without someone watching a terminal.
Hardware is part of the software
The documentation covers wiring, diagnostic gateway wake-up behaviour and modem power requirements. Those details matter as much as the Python code: a software retry cannot compensate for an inadequate power supply. Running the project requires the actual hardware and a configured backend.


