Project Overview
Built a production fleet telematics gateway deployed in 2,000+ commercial vehicles. The device reads OBD-II data from the vehicle CAN bus, processes it locally for anomaly detection, and streams telemetry to AWS IoT Core over LTE with sub-50ms end-to-end latency.
Yocto BSP Development
Created a custom meta-fleet-gw Yocto layer for the NXP i.MX8M Mini SoC:
- Custom machine config with optimized kernel (6.1 LTS) — stripped to 4.2s boot time
- Custom OBD-II kernel driver for ISO 15765-4 CAN and ISO 9141 serial protocols
- Systemd services for telemetry daemon, OTA watchdog, and BLE peripheral manager
- A/B partition layout with SWUpdate + U-Boot boot counter for safe OTA rollback
AWS Greengrass OTA Pipeline
# Greengrass component — telemetry publisher
ComponentName: com.fleet.TelemetryPublisher
ComponentVersion: 2.1.0
Manifests:
- Platform: {os: linux}
Lifecycle:
Run:
Script: |
python3 /opt/fleet/telemetry_daemon.py --endpoint $AWS_IOT_ENDPOINT --topic fleet/{device_id}/telemetry --interval 1000
Edge Anomaly Detection
Trained a 4-class TFLite model on Engine RPM, throttle position, coolant temp, and MAF sensor data to detect: harsh braking, over-revving, idling excess, and sensor fault. Running at 4ms inference on Cortex-A53 — triggers cloud alert within 200ms of anomaly detection.
Results
- Reduced cellular data cost by 62% using delta OTA (320MB → 18MB average update)
- 99.7% fleet uptime over 18 months with zero bricked devices (A/B rollback)
- Anomaly detection reduced roadside breakdowns by 23% in first 6 months