|
ProtoCore v0.0.1
Deterministic, zero-heap network stack for embedded targets
|
Layer: Foundation ยท Build flags: PC_ENABLE_ENOCEAN, PC_ENABLE_GATEWAY
A UART radio plugged into the gateway - EnOcean's energy-harvesting 868 MHz switches and sensors, reached through a serial gateway module (TCM 310 / USB 300) that streams ESP3 telegrams at 57600 baud. Unlike the SPI radios (LoRa, nRF24) there is no chip driver here - the module does the RF, so the "driver" is purely the ESP3 framing codec.
An ESP3 telegram is 0x55 | data-len(2) | opt-len(1) | type(1) | CRC8H | data | opt | CRC8D. The codec accumulates the byte stream and frames one telegram at a time, verifying both CRC-8s and resynchronizing on garbage:
pc_esp3_build() assembles a telegram the same way (for sending a common command / a teach-in reply). The codec is pure - you feed it the UART bytes - and fully host-tested (CRC-8 known answers, round trip, malformed framing, resync) in test/test_enocean.
| Module | ESP32 |
|---|---|
| TX | GPIO 16 (RX) |
| RX | GPIO 17 (TX) |
| VCC | 3V3 |
| GND | GND |
57600 8N1. Change PIN_RX / PIN_TX for your board.
The flags must reach the library build, so pass them as build flags: