| Reverse engineering my e-scooter and rewriting the firmware in Rust(bensimms.moe) | |
| 420 points by vinhnx 4 days ago | 98 comments | |
tl;dr: The author reverse-engineered their Egret GT e-scooter by sniffing its CAN bus (exposed via the display's USB-C port), dumping firmware from replacement controller and display units via SWD, and analyzing it in Ghidra to map out CAN messages, peripheral configs, and the unauthenticated CAN-based firmware update protocol. They then wrote custom Rust firmware for the display unit using Embassy, building out a HAL for the AT32F415 (an STM32 clone with mixed peripherals) and using the `mipidsi` crate to drive the ST7796 display over a 16-bit parallel GPIO bus. | |
HN Discussion:
| |