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.

?-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.

Revisions of app/single_us915_main.cpp

Revision Date Message Actions
34:9c8966cd66a2 18 months ago update to using mbed-6 File  Diff  Annotate
31:6ed03f61af64 2018-12-16 rename header file due to header with same name in mbed-os File  Diff  Annotate
29:ad409c68c0a6 2018-12-07 update to latest radio HAL File  Diff  Annotate
28:36be305a5e5e 2017-08-28 when RGB enabled, indicate beacon lost File  Diff  Annotate
27:c8b432b2a4a8 2017-08-14 add sequency number to sensor polling File  Diff  Annotate
26:8227a4edb216 2017-08-11 sensor sampling asychronous to uplink activity File  Diff  Annotate
25:fed9d5b77183 2017-08-10 uplink held during beacon, and sent after beacon done File  Diff  Annotate
24:94ea42eb6b9e 2017-08-09 sx1276 driver: support all arduino form factor. User button on murata-discovery board. File  Diff  Annotate
23:a862b5601663 2017-08-08 sx1276 driver: support PaSelect on TYPE_ABZ module File  Diff  Annotate
22:999a7e7698a8 2017-08-07 add remote tx-power-index control File  Diff  Annotate
21:500ff43d8424 2017-08-04 rejoin in application layer File  Diff  Annotate
20:42839629a5dc 2017-08-04 add sleep() call, mbedignore rtos File  Diff  Annotate
19:c3af34457b6d 2017-08-02 button_isr runs with jumper installed File  Diff  Annotate
18:9ac71c0eb70d 2017-08-02 add pwm commands and 434MHz band File  Diff  Annotate
17:3215f12051f9 2017-07-28 handle stalled beacon reception in application layer File  Diff  Annotate
16:915815632c1f 2017-07-27 simplify MAC beacon timer File  Diff  Annotate
15:9023bf4cf168 2017-07-13 add txpower command to application layer, increase beacon guard to 2.5s File  Diff  Annotate
14:7ac0add1123e 2017-07-10 application layer: for sensors use uplink_length File  Diff  Annotate
12:ed33c53afcaf 2017-07-05 add sensor demo option File  Diff  Annotate
11:4c337f5bbe4c 2017-06-19 sensor support in application layer File  Diff  Annotate
10:00997daeb0c0 2017-06-17 add sensor support for grove connectors File  Diff  Annotate
7:e238827f0e47 2017-06-06 Randomize join-retry delay. Use RawSerial for getc() in ISR. File  Diff  Annotate
5:c108560af4c3 2017-05-26 add sx1272 debug pin, prevent uplink config from being changed by beacon File  Diff  Annotate
4:d9201410c87b 2017-05-26 correct baud rate to 38400 File  Diff  Annotate
2:f2d9aa163652 2017-05-23 rejoin network after several missed beacons File  Diff  Annotate
1:53c30224eda8 2017-05-22 prevent lockup from printing in ISR File  Diff  Annotate
0:8f0d0ae0a077 2017-05-18 initial commit File  Diff  Annotate