|
esp-sdr-zephyr
Raw I/Q receive and transmit on the ESP32-S3/C6 Wi-Fi radio, for Zephyr
|
The framed serial link between a host and apps/osmosdr_serial. More...
#include <stddef.h>#include <stdint.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | esdr_link_hello |
| struct | esdr_link_frame |
| struct | esdr_link_cobs |
The framed serial link between a host and apps/osmosdr_serial.
What esdr_proto.h's serial transport carries (requests, replies, receive blocks), in frames over a byte stream that may lose bytes and has no flow control wires: a UART, through the MCH2022 badge's RP2040. A frame says what it is, how many came before it and whether it is whole, and a lost byte costs one frame, not the stream's alignment.
Before encoding: type, flags (0), sequence number (little endian; blocks and all other frames count apart, as they may take different ways), the payload, CRC-32 (zlib's, little endian) over all of these. Then COBS, so that no zero byte is left, and a zero byte ends the frame. Empty frames (zeros in a row) mean nothing, except that ESDR_LINK_FALLBACK_ZEROS of them, as a host of the older transport sends on opening, go back to that transport.
Portable C and C++, no dependencies: the firmware, apps/osmosdr/soapy and the unit tests use it. apps/osmosdr_serial/tools/esdr_serial.py has its twin. Tools read the numbers from this file: keep every constant on its own line.