velxio/backend/app/services
davidmonterocrespo24 2072011fa4 feat(pi): pluggable slave handler + canvas wire detection for I2C/SPI/UART
Adds the public extension points the velxio-prod overlay uses to bind
real canvas-side I2C/SPI/UART models (BME280, future MCP23017, etc.)
to a running Pi guest's protocol shims:

- qemu_manager: set_pi_slave_handler(fn) / get_pi_slave_handler() for
  pi_attach_slave + pi_detach_slave WebSocket messages. OSS image
  leaves the hook unset so the messages are silently dropped.
- simulation route: parses the two new WS message types and forwards
  them to the registered handler when present.
- RaspberryPi3Bridge: attachSlave(spec) / detachSlave(spec) frontend
  side of the protocol.
- piSlaveScanner: at simulation start walks components + wires,
  identifies I2C/SPI/UART peers wired to Pi protocol pins (40-pin
  header physical-pin numbering), and emits one attach per
  bus/address pair (deduped across SDA+SCL wires).
- RaspberryPiWorkspace: invokes the scanner once the bridge is open,
  with retries to ride out the WS-still-connecting race.
- integration test: pi3_bme280_attach.py boots the Pi, pre-attaches a
  BME280 via the slave handler, runs a host-side proto loop, runs
  guest python smbus2.read_byte_data(0x76, 0xD0) and asserts the
  console reads back CHIP=0x60.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 16:26:37 +02:00
..
boot_images test(pi3): fix Phase 2 E2E test + bump rootfs to shims-final 2026-05-18 15:00:21 +02:00
esp-idf-template fix(espidf): enable mbedTLS PSK so ssl_client.cpp links 2026-05-14 12:38:20 -03:00
picow_net
__init__.py
arduino_cli.py
chip_compile.py
esp32_flash_image.py
esp32_i2c_slaves.py feat(i2c): cross-board bridging across all velxio boards (AVR/RP2040/ESP32 xtensa+riscv) 2026-05-12 17:51:39 -03:00
esp32_lib_bridge.py
esp32_lib_manager.py Add end-to-end tests for ESP32 I2C functionality and circuit verification 2026-05-12 16:55:15 -03:00
esp32_signals.py fix(esp32): LEDC signal IDs are 71-86 per ESP32 TRM, not 72-87 2026-05-17 05:42:52 +02:00
esp32_spi_slaves.py
esp32_worker.py fix(esp32 worker): importlib fallback for SignalRouter modules 2026-05-17 05:26:12 +02:00
esp_qemu_manager.py
espidf_compiler.py feat(compile): stream live ESP-IDF cmake + ninja output to the console 2026-05-09 23:36:58 +02:00
gpio_shim.py
picow_net_bridge.py
qemu_manager.py feat(pi): pluggable slave handler + canvas wire detection for I2C/SPI/UART 2026-05-18 16:26:37 +02:00
signal_router.py feat(esp32): SignalRouter — model the GPIO Matrix as first-class 2026-05-17 05:00:53 +02:00
wasm_chip_runtime.py
wasm_chip_slave.py
wifi_status_parser.py