Skip to content

Conversation

@JensOgorek
Copy link
Contributor

Motivation

When configuring ESP32 nodes over the serial bus, there was no easy way to send a complete .liz script to a remote node. Additionally, if a broken script was deployed to a bus node (or a script without SerialBus configuration), the node would become unreachable and require physical USB access to fix.

Implementation

Remote configuration via serial bus (configure.py)

  • Added --serial-bus NODE_ID argument
  • Wraps each command in bus.send(NODE_ID, "...") to forward to remote node
  • Waits for reboot and verifies checksum via bus echo relay

Automatic bus backup (main/utils/bus_backup.cpp)

  • When a SerialBus is created, its config (pins, baud, uart, node_id) is saved to NVS
  • On boot, if startup fails to create a SerialBus but backup config exists:
    • Looks for existing Serial with matching pins (reuses if found)
    • Otherwise finds a free UART and creates a new Serial
    • Creates a backup SerialBus to keep the node reachable
  • Added core.delete_bus_backup() to remove the saved config

Progress

  • The implementation is complete.
  • Tested on hardware.
  • Documentation has been added.

@JensOgorek JensOgorek self-assigned this Jan 28, 2026
@JensOgorek JensOgorek added the enhancement New feature or request label Jan 28, 2026
@JensOgorek JensOgorek changed the title add bus_backup & configuration for serial_bus peers Serial bus No. 3: Configure peers over Serial Bus Jan 28, 2026
@JensOgorek JensOgorek added this to the 0.10.1 milestone Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants