Services Reference

LibreScoot is built as a collection of microservices. Each handles a specific domain.

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

DBC Services

These run on the Dashboard Computer (display/UI).

Service Description Repo
scootui Flutter dashboard UI. Speedometer, battery display, navigation, settings. GitHub
dbc-backlight Display brightness control based on ambient light. GitHub
brightness-reader Reads ambient light sensor values.
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

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

CLI Tool

The lsc command-line tool provides a unified interface for interacting with the scooter.

$ 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

View on GitHub →

← Architecture Installation →