Skip to main content

Python library for RYLR LoRa transceivers to simplifies communication with RYLR modules using Python

Project description

RYLR is a Python library for RYLR LoRa transceivers to simplifies communication with RYLR modules using Python. It provides an interface to send and receive LoRa messages, configure module parameters (e.g., frequency, spreading factor, and power settings), and manage network communication. The library abstracts the AT command interactions, making it easier to integrate LoRa connectivity into Python projects without dealing with low-level serial communication details.

Support for RYLR896 and RYLR406.

Installation

pip install rylr

Features

  • Set and get device configuration (address, network ID, baudrate, etc.)
  • Send and receive LoRa messages
  • Built-in support for AES password hashing
  • Simple AT command interface wrapper

Usage

from rylr import RYLR

# Initialize the module
modem = RYLR(port="/dev/ttyUSB0", addr="101", network="10")

# Set properties
modem.baudrate = 9600 
modem.band = "915000000" # 915 MHz
modem.password = "mypassword"

# Send data to address 102
modem.send("Hello", address=102)

# Receive data
print(modem.recv())

# Close the port when done
modem.close()

Constructor

RYLR(port="/dev/ttyUSB0", baudrate=115200, addr="100", network="10",  wait_time=0.1, band="", mode="", parameter="", password="", power=15)

Properties

Property Getter Method Setter Method Description
address AT+ADDRESS? AT+ADDRESS=<addr> Device address (0–65535)
network AT+NETWORKID? AT+NETWORKID=<id> Network ID (0–16)
baudrate AT+IPR? AT+IPR=<rate> Baudrate (300–115200)
mode AT+MODE? AT+MODE=<mode> 0: Tx/Rx, 1: Sleep
band AT+BAND? AT+BAND=<freq> Frequency in Hz
parameter AT+PARAMETER? AT+PARAMETER=<param> LoRa parameters
password AT+CPIN AT+CPIN=<AES_MD5> AES password (MD5 hashed)
power AT+CRFOP? AT+CRFOP=<0–15> Transmission power (0–15 dBm)

|

Methods

  • send(data, address=0): Send data to a specific LoRa address.

  • recv(): Read incoming message (blocking).

  • AT_command(command: str, wait_time: float=0.1): Send a raw AT command to the modem.

  • close(): Closes the serial connection.

Notes

Make sure the correct serial port (/dev/ttyUSB0, COMx, etc.) is specified.

This library assumes you're familiar with AT command configuration for the RYLR896/406 modules.

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

rylr-1.0.3.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

rylr-1.0.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file rylr-1.0.3.tar.gz.

File metadata

  • Download URL: rylr-1.0.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for rylr-1.0.3.tar.gz
Algorithm Hash digest
SHA256 e36f31f35e1053fea1903fb10ad1bb0507946900d2a987657dcb705d55fdb300
MD5 ae4d0fade824f281b619f0d03482d96c
BLAKE2b-256 eab9d6d0bcb56d6dc1079ec1e96d76109ab69425e7d27051b9e0093385b2b01e

See more details on using hashes here.

File details

Details for the file rylr-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: rylr-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for rylr-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 62717943c76d053684d74ec5897b335b767b1b92a45af443a0f7a41788414425
MD5 05365bdd0b1f56be723b4561eae0335f
BLAKE2b-256 24a83bc03792a02ab40b7b2bd8d0ab2390f47ff543420f7aab06587edb6e8e32

See more details on using hashes here.

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