end node on synchronous star LoRa network.

Dependencies:   SX127x sx12xx_hal TSL2561

radio chip selection

Radio chip driver is not included, allowing choice of radio device.
If you're using SX1272 or SX1276, then import sx127x driver into your program.
if you're using SX1261 or SX1262, then import sx126x driver into your program.
if you're using SX1280, then import sx1280 driver into your program.
If you're using NAmote72 or Murata discovery, then you must import only sx127x driver.

This project for use with LoRaWAN_singlechannel_gateway project.

Alternately gateway running on raspberry pi can be used as gateway.

LoRaWAN on single radio channel

Network description is at gateway project page. Synchronous star network.

Hardware Support

This project supports SX1276 and SX1272, sx126x kit, sx126x shield, and sx128x 2.4GHz. The ST board B-L072Z-LRWAN1 is also supported (TypeABZ module). When B-L072Z-LRWAN1 target is selected, TARGET_DISCO_L072CZ_LRWAN1 is defined by tools, allowing correct radio driver configuration for this platform. Alternately, any mbed board that can use LoRa radio shield board should work, but NUCLEO boards are tested.

End-node Unique ID

DevEUI is created from CPU serial number. AppEUI and AppKey are declared as software constants.

End-node Configuration

Data rate definition LORAMAC_DEFAULT_DATARATE configured in LoRaMac-definitions.h. See gateway project page for configuration of gateway.
LoRaWAN addressing is configured in Comissioning.h; only OTA mode is functional.
Header file board/lora_config.h, selects application layer options (i.e. sensors) to be compiled in.

Serial Interface

Serial port operates at 115200bps.
Application layer single_us915_main.cpp User button triggers uplink (i.e. blue button on nucleo board), or jumper enables continuously sends repeated uplink packets. The MAC layer holds each uplink request until the allocated timeslot.

commandargumentsdescription
?-print available commands
. (period)-print status (DevEUI, DevAddr, etc)
ullength integerset payload length of test uplink packets

sensor demo

Selected grove sensors may be plugged into SX1272 shield.
To enable, edit lora_config.h to define SENSORS.

Sensor connections on SX1272MB2xAS:

D8 D9: buttonRX TX: (unused)A3 A4: Rotary Angle Sensor
D6 D7: RGB LEDSCL SDA: digital light sensorA1 A2: Rotary Angle Sensor

Digital input pin, state reported via uplink: PC8
Digital output pin, controlled via downlink: PC6
PWM out: PB_10

Jumper enables auto-repeated transmit: PC10 and PC12 on NUCLEO board, located on end of morpho headers nearby JP4.

History

remove old crypto default tip

2020-07-13, by Wayne Roberts [Mon, 13 Jul 2020 09:15:59 -0700] rev 35

remove old crypto


update to using mbed-6

2020-07-10, by Wayne Roberts [Fri, 10 Jul 2020 11:12:59 -0700] rev 34

update to using mbed-6


for rx window timer, capture txDone using rx window timer

2018-12-19, by Wayne Roberts [Wed, 19 Dec 2018 13:56:04 -0800] rev 33

for rx window timer, capture txDone using rx window timer


ceil() requires argument type cast

2018-12-16, by dudmuck [Sun, 16 Dec 2018 18:29:23 +0000] rev 32

ceil() requires argument type cast


rename header file due to header with same name in mbed-os

2018-12-16, by Wayne Roberts [Sun, 16 Dec 2018 10:22:21 -0800] rev 31

rename header file due to header with same name in mbed-os


add sx1280, add beacon duration to join accept

2018-12-13, by Wayne Roberts [Thu, 13 Dec 2018 16:53:02 -0800] rev 30

add sx1280, add beacon duration to join accept


update to latest radio HAL

2018-12-07, by Wayne Roberts [Fri, 07 Dec 2018 17:57:41 -0800] rev 29

update to latest radio HAL


when RGB enabled, indicate beacon lost

2017-08-28, by dudmuck [Mon, 28 Aug 2017 13:13:56 -0700] rev 28

when RGB enabled, indicate beacon lost


add sequency number to sensor polling

2017-08-14, by dudmuck [Mon, 14 Aug 2017 11:30:36 -0700] rev 27

add sequency number to sensor polling


sensor sampling asychronous to uplink activity

2017-08-11, by dudmuck [Fri, 11 Aug 2017 15:34:49 -0700] rev 26

sensor sampling asychronous to uplink activity