DongLoRa host library — talk LoRa from Python over USB
Project description
DongLoRa Python Client
Python client library for talking to a DongLoRa device — either directly over USB or through the mux daemon.
Install
pip install donglora
Or with uv:
uv add donglora
Quick Start
import donglora as dl
ser = dl.connect()
dl.send(ser, "SetConfig", config=dl.DEFAULT_CONFIG)
dl.send(ser, "StartRx")
while True:
pkt = dl.recv(ser)
if pkt:
print(pkt["rssi"], pkt["payload"].hex())
Connection Functions
| Function | Description |
|---|---|
connect() |
Auto-detect: TCP mux, Unix socket mux, then USB serial |
connect_default() |
Convenience wrapper with default timeout |
try_connect() |
Like connect() but non-blocking — raises if no device found |
connect_mux_auto() |
Mux only — never falls back to USB serial |
mux_connect() |
Connect via Unix domain socket |
mux_tcp_connect() |
Connect via TCP |
Module Structure
| Module | Contents |
|---|---|
donglora.protocol |
Wire types, RadioConfig, encode/decode, constants |
donglora.codec |
COBS framing |
donglora.discovery |
USB device discovery by VID:PID |
donglora.transport |
MuxConnection (socket wrapper) |
donglora.connect |
Connection auto-detection and mux helpers |
donglora.client |
High-level send/recv/validate |
Everything is re-exported from the top-level donglora package.
Dependencies
cobs— COBS framingpyserial— USB serial communication
Optional extras: meshcore (crypto), orac (AI bot).
Development
just check # fmt + lint + test
just fmt # format code
just test # run tests
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file donglora-0.2.0.tar.gz.
File metadata
- Download URL: donglora-0.2.0.tar.gz
- Upload date:
- Size: 71.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56ca1d11fefa5b1bb787d0dabb735e4cb729200ce0b2c9a09b716ed225c47e4a
|
|
| MD5 |
3eef2d66530680a248c78133641ec709
|
|
| BLAKE2b-256 |
9f866c1cf368749bb0be78ea92abf4a701a8487e8e927f8a288230ec08ba89c6
|
Provenance
The following attestation bundles were made for donglora-0.2.0.tar.gz:
Publisher:
ci.yml on donglora/client-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
donglora-0.2.0.tar.gz -
Subject digest:
56ca1d11fefa5b1bb787d0dabb735e4cb729200ce0b2c9a09b716ed225c47e4a - Sigstore transparency entry: 1259215006
- Sigstore integration time:
-
Permalink:
donglora/client-py@7a9e67ac1c3b46253588842bd4729a00f681c256 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/donglora
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@7a9e67ac1c3b46253588842bd4729a00f681c256 -
Trigger Event:
push
-
Statement type:
File details
Details for the file donglora-0.2.0-py3-none-any.whl.
File metadata
- Download URL: donglora-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a3d75113279efde48227b2fc02b218854f67c0d4ff5f52b670c51d2dbce95e9
|
|
| MD5 |
4d5b7acb71a1f6e2d978ab559d36300b
|
|
| BLAKE2b-256 |
9c9b4d6b7cca7284e690fa283e8dbc551955a120722954527fde7bef4bef1969
|
Provenance
The following attestation bundles were made for donglora-0.2.0-py3-none-any.whl:
Publisher:
ci.yml on donglora/client-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
donglora-0.2.0-py3-none-any.whl -
Subject digest:
3a3d75113279efde48227b2fc02b218854f67c0d4ff5f52b670c51d2dbce95e9 - Sigstore transparency entry: 1259215050
- Sigstore integration time:
-
Permalink:
donglora/client-py@7a9e67ac1c3b46253588842bd4729a00f681c256 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/donglora
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@7a9e67ac1c3b46253588842bd4729a00f681c256 -
Trigger Event:
push
-
Statement type: