|
ProtoCore v0.0.1
Deterministic, zero-heap network stack for embedded targets
|
Layer: Foundation ยท Build flags: PC_ENABLE_ZIGBEE, PC_ENABLE_GATEWAY
A Zigbee network plugged into the gateway through a Silicon Labs EmberZNet network co-processor (NCP), which speaks EZSP over the ASH data-link protocol on a UART. This resets the NCP and decodes its ASH frames; a DATA frame carrying an EZSP callback (an incoming Zigbee message) is bridged northbound.
ASH wraps each frame as [control | payload | CRC16], byte-stuffs the reserved control bytes, and terminates with a Flag 0x7E. services/zigbee does the framing:
pc_ash_frame_encode() builds a frame the same way (this sketch sends an ASH RST at boot). The CRC is CRC-16/CCITT; the codec is host-tested against the documented RST frame (C0 38 BC 7E) and the byte-stuffing in test/test_zigbee.
Interpreting the EZSP command inside a DATA frame - version negotiation, the ACK/sequence numbers, the incomingMessageHandler fields - is application work; this sketch bridges the raw EZSP payload to show the transport path.
| NCP | ESP32 |
|---|---|
| TX | GPIO 16 (RX) |
| RX | GPIO 17 (TX) |
| VCC | 3V3 |
| GND | GND |
115200 8N1 (an EFR32 / EM357 NCP; RTS/CTS optional).
The flags must reach the library build, so pass them as build flags: