MicroPython implementation of the Universal Reliable Serial Transport (URST) protocol - a robust serial communication solution.
| Status: | 0.1.1 |
|---|
URST provides reliable, error-checked data transmission over serial data links, with the following features:
- Reliable Delivery: Acknowledgment-based protocol with automatic retries
- Error Detection: Built-in CRC16 validation for data integrity
- Frame Synchronization: COBS encoding for reliable frame delimiting
- Flow Control: Sequence numbers and timeouts for reliable data transfer
- Configurable: Adjustable timeouts, retries, and buffer sizes
See full specification for more details.
- Python - Coming Soon!
- Arduino - TBA
If you haven't got mpremote installed see details here
mpremote mip install github:simonl65/URST-micropython- Clone or download this repository
- Copy the
urstdirectory to your MicroPython device's filesystem
Use the deploy_with_demo script to install URST along with a minimal example.
Note: This will install URST to the device's
libdirectory and add ademo_libdirectory,config.pyandmain.py.
uv run deploy_with_demo.pyor...
python deploy_with_demo.pyfrom machine import UART
import time
from urst.handler import URSTHandler
# Initialize UART
uart = UART(0, baudrate=115200)
# Create URST handler instance
comms = URSTHandler(uart)
# Example: Sending data
success = comms.send(b'Hello, World!')
print("Message", "acknowledged" if success else "failed")
# Example: Receiving data
while True:
result = comms.receive()
if result:
print(f"Received: {result}")
time.sleep(0.1) # Prevent tight loopRun the test suite with:
uv run tests/testrunner.pyor...
python tests/testrunner.pyWe welcome contributions! Here's how you can help:
- Check for any open issues that cover what you want to change. Open a new issue if there are none.
- Fork the repository.
- Create a new feature branch.
- Make your changes.
- Add/update tests as appropriate.
- Run the test suite to ensure all tests pass.
- Commit and push your branch to your fork.
- Create a pull request with a clear description of your changes.
This code is released under the Sustainable Use License detailed in LICENSE.md.
In essence the license is one of Fair-code. It effectively prohibits you from making profit from this code if I haven't given you a specific license to do so. If I give you such a separate license then I'm happy for us both to profit off this code.