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", baud=115200, addr="100", network="10",  blocking=True, baudrate=None, band=None, mode=None, parameter=None, password=None, 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.1.tar.gz (4.3 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.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rylr-1.0.1.tar.gz
  • Upload date:
  • Size: 4.3 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.1.tar.gz
Algorithm Hash digest
SHA256 5387ee80337c4f1492ec99d24c0c0f4d791f3e8c289b56c07707e1dc1388c798
MD5 5d2e4a2972be178d35cb7a19bc3e48c0
BLAKE2b-256 13c0e8059f3bb57131a2fcead0eb2b785f3b05f6ff0ccd7dca2db881b9334fd1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rylr-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5af341a75d83d4bd10b4dc59c6f47e2913673e0785bd151515172f3b97986deb
MD5 826f691bb10144f40c2e455655eb7236
BLAKE2b-256 ade95e5d0bde67a3f35ed13e28032e9e01e76947f3c91221a19981fe2c1606b3

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