Reliable delivery
Strict stop-and-wait ARQ waits for ACK and retries when a frame is lost or rejected.
Universal Reliable Serial Transport
URST-mpy turns a plain UART link into a dependable message channel. It handles framing, CRC checks, acknowledgements, retries, and message fragmentation for boards such as the Raspberry Pi Pico and ESP32.
Why use it
Strict stop-and-wait ARQ waits for ACK and retries when a frame is lost or rejected.
Every frame carries CRC-16/CCITT-FALSE validation, with COBS encoding for unambiguous zero-delimited framing.
Messages larger than the physical MTU are fragmented and reassembled automatically by the transport.
Use the same transport with MicroPython UART objects or desktop Python serial ports for gateways and tests.
Quick start
Install directly with mpremote mip, or copy theurst/ package onto your MicroPython filesystem. Then pass URST a UART object and work with complete byte messages instead of raw serial chunks.
mpremote mip install github:simonl65/URST-mpyExample
URST-mpy keeps application code direct: initialize the transport, send bytes, and poll for complete reassembled messages.
import machine
import time
import urst
uart = machine.UART(
0,
baudrate=57600,
tx=machine.Pin(0),
rx=machine.Pin(1),
)
transport = urst.Urst(uart)
transport.send(b"Hello from Pico!")
while True:
message = transport.read()
if message:
print("Received:", message.decode())
time.sleep(0.1)