How mr-pian/grub-friendly-starting-up-system works
This is a remote-start gateway system: an ESP32-S3 gateway presents a screen and network control, communicates with an EFR32BG22 BLE key, and can act as a USB keyboard during boot to help select a GRUB entry. The key advertises PC state and battery information and handles physical-button events; the Web service provides LAN browser control. The main firmware excerpts show Wi-Fi provisioning, USB HID, and HTTP activity, but not the full UI or Web request flow. Some subsystem links are therefore documented or left unverified.
Main entry points: app.c Key Application · main.c Gateway Runtime · ble_client.c BLE Client · server.js Web Server
Components 16
ESP32 Gateway
- Gateway Runtime
Firmware/ESP32_S3_Mesh/main/main.c - Wi-Fi Network
Firmware/ESP32_S3_Mesh/main/main.c - Screen UI
Firmware/ESP32_S3_Mesh/components/LVGL_UI.c - BLE Client
Firmware/ESP32_S3_Mesh/components/ble_client.c - USB HID
Firmware/ESP32_S3_Mesh/main/main.c - Mesh Networking
Firmware/ESP32_S3_Mesh
BLE Key
- Key Application
Firmware/GRUB_Key/app.c - Bluetooth Stack
Firmware/GRUB_Key/autogen/sl_bluetooth.c - GATT Database
Firmware/GRUB_Key/autogen/gatt_db.c - Device Runtime
Firmware/GRUB_Key/main.c - Power Management
Firmware/GRUB_Key/autogen/sl_power_manager_handler.c
Web Control
- Web Server
Web/server.js
PC Startup
- Target PC
- GRUB Boot Menu
Other components
- User
- Browser
Connections 18
- User → Screen UI: interacts with
README.md - User → Browser: controls through
README.md - Browser → Web Server: requests control
README.md - Web Server → Gateway Runtime: controls remotely
README.md - Gateway Runtime → Wi-Fi Network: initializes Wi-Fi
Firmware/ESP32_S3_Mesh/main/main.c - Gateway Runtime → USB HID: installs HID
Firmware/ESP32_S3_Mesh/main/main.c - USB HID → Target PC: sends keystrokes
Firmware/ESP32_S3_Mesh/main/main.c - Target PC → GRUB Boot Menu: boots into
README.md - Gateway Runtime → Screen UI: starts display
README.md - Gateway Runtime → BLE Client: uses BLE client
README.md - BLE Client → Key Application: scans and connects
Firmware/ESP32_S3_Mesh/components/ble_client.c - Key Application → Bluetooth Stack: updates advertising
Firmware/GRUB_Key/app.c - Key Application → GATT Database: uses GATT data
Firmware/GRUB_Key/app.c - Device Runtime → Key Application: initializes application
Firmware/GRUB_Key/main.c - Key Application → BLE Client: advertises state
Firmware/GRUB_Key/app.c - BLE Client → Key Application: writes commands
Firmware/ESP32_S3_Mesh/components/ble_client.c - Key Application → Power Management: coordinates sleep
- Gateway Runtime → Mesh Networking: supports mesh
README.md