rn2483 library
Project description
Python library and tools for using RN2483 LoRaWAN Transceiver
Compatible devices | Build Status |
---|---|
Raspberry Pi 3B+ |
RN2483 to Raspberry Pi GPIO connection
Pin | RN2483 | to | Pin | Raspberry Pi 3B+ |
---|---|---|---|---|
[7] | UART_RX | -> | [14] | UART_TX0 |
[6] | UART_TX | -> | [15] | UART_RX0 |
How to use it
When importing library as module, import pyserial and initialize a connection using your assigned serial interface (e.g /dev/ttyUSB0 - in ubuntu).
Install pyserial
:
pip3 install pyserial
Install rn2483
:
git clone https://github.com/alexantoniades/python-RN2483.git
cd python-RN2483
python3 setup.py install
Import and initialize modules
import serial
import rn2483
#define serial port and baudrate for rn2583 transceiver
PORT = "/dev/ttyUSB0"
BAUDRATE = 57600
# Initialize serial connection
uart = serial.Serial(PORT, BAUDRATE)
# Initialize transceiver
device = rn2483(connection=uart, debug=True)
# Check if device is initialized
print(device.connection.is_open)
# Check hardware eui
print(device.hardware_eui())
Configure LoRaWAN - Authentication By Personalization
device.config_abp(nwskey=NetworkSessionKey, appskey=ApplicationSessionKey, devaddr=DeviceAddress)
Configure LoRaWAN - Over The Air Authentication
device.config_otaa(appkey=ApplicationKey, appeui=ApplicationEUI)
Send data
device.send("Hello World")
Close connection
device.close_connection()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lora-rn2483-0.1.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for lora_rn2483-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd6b8bf177c0d1400fd9ac61dcec487660db398072c70e500329b7e5d397e23a |
|
MD5 | 857c3923e5a901f83ee627c9d6e5bbf2 |
|
BLAKE2b-256 | 02f3f2750d7e532284239c90e6208a1d3382709fff373b2eedc45b0035b00df8 |