This file is included to prevent pylint failing with the following error: no-name-in-module. note: revisit/remove this file when this pylint error has been resolved.

adafruit_tinylora

CircuitPython LoRaWAN implementation for use with The Things Network.

  • Author(s): adafruit

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_tinylora.adafruit_tinylora.TTN(dev_address, net_key, app_key, country='US')

TTN Class

application_key

Returns the TTN Application Key.

country

Returns the TTN Frequency Country.

device_address

Returns the TTN Device Address.

network_key

Returns the TTN Network Key.

class adafruit_tinylora.adafruit_tinylora.TinyLoRa(spi, cs, irq, rst, ttn_config, channel=None)

TinyLoRa Interface

deinit()

Deinitializes the TinyLoRa object properties and pins.

send_data(data, data_length, frame_counter, timeout=2)

Function to assemble and send data :param data: data to send :param data_length: length of data to send :param frame_counter: frame counter variable, declared in code.py. :param timeout: TxDone wait time, default is 2.

send_packet(lora_packet, packet_length, timeout)

Sends a LoRa packet using the RFM Module :param bytearray lora_packet: assembled LoRa packet from send_data :param int packet_length: length of LoRa packet to send :param int timeout: TxDone wait time.

set_channel(channel)

Sets the RFM Channel (if single-channel) :param int channel: Transmit Channel (0 through 7).

set_datarate(datarate)

Sets the RFM Datarate :param datarate: Bandwidth and Frequency Plan

adafruit_tinylora_encryption

Required tinyLoRA Encryption Methods for AES and Message Integrity checks. * Author(s): adafruit

class adafruit_tinylora.adafruit_tinylora_encryption.AES(device_address, app_key, network_key, frame_counter)

TinyLoRA AES Implementation Functions in this implementation are from and/or derived from AES-Python (https://github.com/bozhu/AES-Python) and TinyLoRa ()

calculate_mic(lora_packet, lora_packet_length, mic)

Calculates the validity of data messages, generates message integrity check bytearray.

encrypt(aes_data)

Performs AES Encryption routine with data. :param bytearray data: Data to-be encrypted.

encrypt_payload(data)

Encrypts data payload. :param bytearray data: Data to-be-encrypted.

adafruit_tinylora.adafruit_tinylora_encryption.xtime(col)

xtime impl. for _mix_single_column()

ttn_as

AS920 The Things Network Frequency Plans * Author(s): Brent Rubell

ttn_au

The Things Network Frequency Plans - AU915 * Author(s): Brent Rubell

ttn_cn

The Things Network Frequency Plans - CN470 * Author(s): IAMLIUBO

ttn_eu

The Things Network Frequency Plans - EU863 * Author(s): Brent Rubell

ttn_usa

The Things Network Frequency Plans - US902 * Author(s): Brent Rubell