rf95modem-py
Python library to send and receive data over LoRa PHY via a serial connection to a rf95modem.
This library was tested against the rf95modem commit 8f163aa, slightly after version 0.7.3.
Install
This library is available on PyPI as rf95modem.
pip install rf95modem
Library
The primary focus of this library is to send and receive data via LoRa's physical layer, LoRa PHY, with the help of a rf95modem.
Therefore the rf95modem.reader.Rf95Reader. allows direct interaction with a connected rf95modem, including configuration changes, sending, and receiving raw LoRa PHY messages.
This Rf95Reader extends serial.threaded.LineReader from pySerial.
The following short code example demonstrates how to use this library.
import serial
import serial.threaded
import sys
import time
import rf95modem
if __name__ == '__main__':
ser = serial.serial_for_url('/dev/ttyUSB1', baudrate=115200, timeout=1)
with serial.threaded.ReaderThread(ser, rf95modem.Rf95Reader) as rf95:
rf95.rx_handlers.append(lambda rx: print(rx))
rf95.mode(rf95modem.ModemMode.FAST_SHORT_RANGE)
rf95.frequency(868.23)
rf95.transmit(b"hello world")
print(rf95.fetch_status())
while True:
# Wait for incoming messages to be printed by our handler.
try:
time.sleep(0.1)
except KeyboardInterrupt:
sys.exit(0)
Metadata
Release files for rf95modem 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rf95modem-0.1.1.tar.gz | 5.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rf95modem-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / rf95modem-0.1.1.tar.gz
| Download URL | rf95modem-0.1.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
700ded7bf922c6744c45437c348ef9c7356190b9c72c250a2f3a3fdee8b99d24
|
|
BLAKE2b-256 checksum How to use checksums |
07683baa4dc2565a2c1aa8753c8d7395837856f01b47413268c46dea86666ae0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / rf95modem-0.1.1-py3-none-any.whl
| Download URL | rf95modem-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b49a53982480c940f0ece758a8853225e8c7bb6e5deafd186013fd0367fdde5
|
|
BLAKE2b-256 checksum How to use checksums |
37455b8f3adc7949a40937c00d8b56f16b7c85e4642c9fe2407406283a8c34ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|