Skip to main content

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 framing
  • pyserial — 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

donglora-1.1.0.tar.gz (96.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

donglora-1.1.0-py3-none-any.whl (32.4 kB view details)

Uploaded Python 3

File details

Details for the file donglora-1.1.0.tar.gz.

File metadata

  • Download URL: donglora-1.1.0.tar.gz
  • Upload date:
  • Size: 96.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for donglora-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f9e472370205cf291c94e4b2762e54785b4acbc0f7d377e9e3c302c69d4e0fdb
MD5 34476ae8bb3563e6c1ac4720433ff547
BLAKE2b-256 453f329bceebee5d7b97af021ee3f82e035e088768675b3b7d0be0f72a7f1da0

See more details on using hashes here.

Provenance

The following attestation bundles were made for donglora-1.1.0.tar.gz:

Publisher: ci.yml on donglora/client-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file donglora-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: donglora-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for donglora-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e360121eaa98f34d5efe93c860a93f22dc1243cc0af297cbb3276a801dd57f5f
MD5 24286b47a95cbebeea2b072582c6302d
BLAKE2b-256 4c16c9cb5df46c3cc11084272f481dafdf39cdeb2fe053f72567196dde8d8a65

See more details on using hashes here.

Provenance

The following attestation bundles were made for donglora-1.1.0-py3-none-any.whl:

Publisher: ci.yml on donglora/client-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page