Skip to main content

rn2483 library

Project description

Python library and tools for using RN2483 LoRaWAN Transceiver

pylint Score

Compatible devices Build Status
Raspberry Pi 3B+ Build Status

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

This version

0.1

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)

Uploaded Source

Built Distribution

lora_rn2483-0.1-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page