Services Reference
LibreScoot is split into small, independent Go services. One per concern, each in its own repo.
MDB Services
These run on the Middle Driver Board (main controller).
| Service | Description | Repo |
|---|---|---|
vehicle-service |
Central state machine. Handles lock/unlock, power states, LED patterns, GPIO control. | GitHub |
battery-service |
BMS communication via NFC. Monitors charge, temperature, health for both battery slots. | GitHub |
ecu-service |
Motor controller interface via CAN bus. Supports Bosch and Votol ECUs. | GitHub |
bluetooth-service |
BLE communication with mobile app and NRF52 module. Firmware updates, commands. | GitHub |
alarm-service |
Motion detection using BMX055 accelerometer. Triggers hazard lights on tamper. | GitHub |
modem-service |
Cellular connectivity via ModemManager. Monitors signal, connection state. | GitHub |
uplink-service |
Remote telemetry and commands over WebSocket. Connects to uplink-server. | GitHub |
update-service |
OTA update management. Delta downloads, Mender integration, channel switching. | GitHub |
pm-service |
Power management. Handles suspend, hibernate, reboot. Inhibitor support. | GitHub |
keycard-service |
NFC keycard authentication. Reads UID, controls lock/unlock. | GitHub |
settings-service |
Persistent settings storage. Redis-backed configuration. | GitHub |
version-service |
Publishes OS version info to Redis from /etc/os-release. | GitHub |
ums-service |
USB Mass Storage mode manager. Switches the USB port between network and UMS modes, and copies map files on eject. | GitHub |
DBC Services
These run on the Dashboard Computer (display/UI).
| Service | Description | Repo |
|---|---|---|
dbc-dispatcher |
Boot-time display application launcher. Starts Flutter after boot animation completes, handles DBC application lifecycle. | GitHub |
boot-animation |
Lottie animation renderer for /dev/fb0 using ThorVG. Displays startup animation before Flutter is ready. | GitHub |
scootui |
Flutter dashboard UI. Speedometer, battery display, navigation, settings. | GitHub |
dbc-backlight |
Display brightness control. Reads ambient light from OPT3001 sensor and adjusts backlight automatically. | GitHub |
carplay-service |
CarPlay dongle support for phone mirroring. | GitHub |
update-service |
OTA update management for DBC. Receives updates from MDB. | GitHub |
version-service |
Publishes DBC version info to Redis. | GitHub |
Server-Side
These run on external infrastructure, not on the scooter.
| Component | Description | Repo |
|---|---|---|
uplink-server |
Server-side counterpart to uplink-service. Accepts WebSocket connections from scooters for remote monitoring and control. | GitHub |
CLI Tool
The lsc command-line tool provides a unified interface for interacting with the scooter. See the CLI reference for full documentation.
$ lsc status # Show vehicle, battery, connectivity status $ lsc unlock # Unlock the scooter $ lsc lock # Lock the scooter $ lsc ota status # Check for updates $ lsc settings list # View configurable settings
Shared Libraries
| Library | Description | Repo |
|---|---|---|
redis-ipc |
Redis-based IPC library. Pub/sub, queue processing, atomic transactions. | GitHub |
librefsm |
Hierarchical finite state machine library for Go services. | GitHub |
pn7150 |
PN7150 NFC controller driver for Go. | GitHub |