How leandrosly/s16-companion works
S16 Companion is an ESP32-S3 wrist display and Bluetooth bridge for a KingSong KS-S16. The main flow connects to the wheel, presents a matching BLE identity and GATT services to phone apps, and relays wheel data and app interactions while providing live display, controls, logging, and peripheral features. The README documents substantial features, but the firmware sketches implementing them were not sampled, so those links are documented rather than source-verified; the sampled NimBLE files show supporting BLE stack changes.
Main entry points: ks_s16_ponte_v5_midia.ino Companion Firmware · nimconfig.h NimBLE Configuration · ble_gap.c GAP Procedures · ble_hs_hci_evt.c HCI Event Dispatch
Components 20
BLE Bridge
- Wheel BLE Client
ks_s16_ponte_v5_midia/ks_s16_ponte_v5_midia.ino - App BLE Server
ks_s16_ponte_v5_midia/ks_s16_ponte_v5_midia.ino - Media Controls
ks_s16_ponte_v5_midia/ks_s16_ponte_v5_midia.ino
Display and Controls
- Companion Firmware
ks_s16_ponte_v5_midia/ks_s16_ponte_v5_midia.ino - Live Display
ks_s16_ponte_v5_midia/ks_s16_ponte_v5_midia.ino - Settings and Sleep
ks_s16_ponte_v5_midia/ks_s16_ponte_v5_midia.ino - SD Logs and Prints
ks_s16_ponte_v5_midia/ks_s16_ponte_v5_midia.ino
Peripherals
- Dream Backpack
ks_s16_ponte_v5_midia/ks_s16_ponte_v5_midia.ino - MPU-6050
ks_s16_ponte_v5_midia/ks_s16_ponte_v5_midia.ino - Audio and Horn
ks_s16_ponte_v5_midia/ks_s16_ponte_v5_midia.ino - 433 MHz Signals
ks_s16_ponte_v5_midia/ks_s16_ponte_v5_midia.ino - Brake Lighting
ks_s16_ponte_v5_midia/ks_s16_ponte_v5_midia.ino
BLE Platform
- GAP Procedures
patch_nimble_2.5.1/ble_gap.c - HCI Event Dispatch
patch_nimble_2.5.1/ble_hs_hci_evt.c - GAP Service
patch_nimble_2.5.1/ble_svc_gap.c - GATT Service
patch_nimble_2.5.1/ble_svc_gatt.c - NimBLE Configuration
patch_nimble_2.5.1/nimconfig.h
Other components
- Rider
- KS-S16 Wheel
- Phone Apps
Connections 26
- Rider → Live Display: views status
README.md - KS-S16 Wheel → Wheel BLE Client: sends telemetry
README.md - Wheel BLE Client → KS-S16 Wheel: connects and controls
README.md - Wheel BLE Client → Companion Firmware: provides wheel data
README.md - Companion Firmware → App BLE Server: hosts wheel identity
README.md - Phone Apps → App BLE Server: connects as app
README.md - App BLE Server → Phone Apps: relays wheel services
README.md - Phone Apps → Media Controls: pairs separately
README.md - Media Controls → Phone Apps: controls playback
README.md - Companion Firmware → Live Display: updates display
- Rider → Settings and Sleep: configures device
README.md - Settings and Sleep → SD Logs and Prints: saves settings
- Companion Firmware → SD Logs and Prints: records events
README.md - Rider → Dream Backpack: sets lighting
README.md - Dream Backpack → Wheel BLE Client: connects as client
README.md - MPU-6050 → Live Display: drives auto display
README.md - Rider → Audio and Horn: triggers horn
README.md - Rider → 433 MHz Signals: sets indicators
README.md - Companion Firmware → Brake Lighting: detects regen current
README.md - Brake Lighting → Dream Backpack: sets red lighting
README.md - Brake Lighting → 433 MHz Signals: sets red lamps
README.md - NimBLE Configuration → GAP Procedures: configures stack
- NimBLE Configuration → HCI Event Dispatch: configures stack
- GAP Procedures → HCI Event Dispatch: handles connection events
- App BLE Server → GAP Service: uses GAP service
- App BLE Server → GATT Service: uses GATT service