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.2.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.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rylr-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 7fc1bfe571c84fae42ddd688f44f90248ace741d20c9cf84b66933347443d814
MD5 b174642a1367309556c2f78a8e6e4cf3
BLAKE2b-256 1780b216511cddd912902cfe2a1f3b3b171d9c79acc930759313e17bc279b56b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rylr-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 78d7b708d54a1e74f9d85470c04cd79ea3ddc8932927485556bdbc1f4b8dfb38
MD5 c8cdef684875797777ccecf2636c6204
BLAKE2b-256 f6c65f8159a8eb469a6a5886cf2bc0efc0658f1f8c134cfd399811c3a1eeb4ec

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