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:
  • Admiration for the technical skill and quality of the writeup
  • Sharing related reverse-engineering experiences with their own devices
  • Criticism of non-compliant use of USB-C for CAN bus
  • Questions about Rust binary bloat and type name handling
  • Suggestion to explore alternative UI tools like Slint for embedded GUI