The line protocol
Every message is one JSON object followed by a newline.- Command
- Event
The runtime sends a request and waits for the matching A failure uses the same
id.id with "ok": false and an error string.
Unknown commands are ignored. The ESP32 starter in
firmware/esp32 answers these four and exposes pins 2 and 13 as outputs.
Sending an event
The ESP32 main loop callstake_host_message whenever the serial line is idle. The starter returns nothing. Replace that function so it returns a message once per real event:
firmware/esp32/src/main.rs
None until the next event.
A SOP matches it like this:
SOP.toml
board is the name in [peripherals], not the chip. signal is the name your firmware chose.
Boards the daemon listens for
With no[peripherals] table, the daemon opens four serial boards:
An explicit
boards list, including an empty one, replaces that default. Add a board from the CLI:
native is local GPIO on the device itself, used for rpi-gpio. Serial boards get the tools gpio_read and gpio_write. A Raspberry Pi GPIO board gets gpio_rpi_read, gpio_rpi_write, gpio_rpi_blink, and rpi_system_info.
What gets attested
When[chain] is enabled, a successful call to gpio_write, gpio_rpi_write, gpio_rpi_blink, or set_device is attested automatically, with requestURI kinetic://actuator/<tool> and the tool arguments as the parameters. A failed call is not attested.
The reference firmware trees live under firmware/: esp32, pico, nucleo, arduino, and kinetic-fw-protocol, which is the shared parser for commands and host messages.