433 & 868 MHz Seeeduino – Downlink reception and Cayenne LPP decoding

TTN version: TTNv3 / TTS SANDBOX
Board: Seeeduino LoRaWAN
Frequency: Europe 433 MHz (ITU region 1)
Europe 863-870 MHz (SF9 for RX2 – recommended)
Activation: OTAA / ABP
Device Class: Class A, B, C
LoRaWAN: 1.0.3
Last revision: December 14, 2024

This article provides instructions for downlink reception and Cayenne LPP format decoding using Seeeduino LoRaWAN. If you haven’t set up Seeduino LoRaWAN yet, check out our 868 MHz Seeeduino LoRaWAN or 433 MHz Seeeduino LoRaWAN tutorials.

 

Prepare

  • Seeeduino LoRaWAN
  • PC + micro USB cable

 

Activation

Over The Air Activation (OTAA) – the most secure and recommended activation method for end devices. Devices perform a join procedure with the network, during which a dynamic device address is assigned and security keys are negotiated with the device.

Activation By Personalization (ABP) – requires hardcoding the device address as well as the security keys in the device. ABP is less secure than OTAA and also has the downside that devices can not switch network providers without manually changing keys in the device.

See the documentation for more information on activation.

 

Device classes

The LoRaWAN specification defines three device types: Class A, Class B, and Class C. All LoRaWAN devices must implement Class A, whereas Class B and Class C are extensions to the specification of Class A devices. All device classes support bi-directional communication (uplink and downlink).

See the documentation for more information on device classes.

 

Fair Use Policy

The TTN documentation says about Fair Use Policy:

On The Things Network’s public community network a Fair Use Policy applies which limits the uplink airtime to 30 seconds per day (24 hours) per node and the downlink messages to 10 messages per day (24 hours) per node. If you use a private network, these limits do not apply, but you still have to be compliant with the governmental and LoRaWAN limits.

Note: Don’t send more than 10 downlinks per day per node.

 

Printing decoded downlinks to Serial Monitor and setting uplink sending time

  1. Copy and paste one of the programs bellow (based on your chosen frequency and device class) into your Arduino IDE.
  2. In the Arduino IDE Library Manager search CayenneLPP by Electronic Cats and install it.
  3. In TTS -> Applications -> YourAppName -> YourEndDeviceName -> Payload formatters -> Uplink change Formatter type to Custom Javascript formatter.
  4. Follow the Cayenne LPP tutorial tutorial in the Additional data types and Original LPPv1 data types section and then continue with the following points below.

Class A

  1. In the Arduino IDE File -> Examples -> SeeeduinoLoRaWan-x.x.x open one of these programs:
    • 868_OTAA_Class_A_CLPP_Downlink
    • 433_OTAA_Class_A_CLPP_Downlink
  2. In program replace APP_EUI, DEV_EUI and APP_KEY with keys in TTS. Keys are in TTS -> Applications -> YourAppName -> YourEndDeviceName -> Activation information.
  3. Connect Seeeduino LoRaWAN using micro USB cable to your computer and choose the appropriate COM port which is used for communication with Seeeduino.
  4. In Arduino IDE click on Upload button to upload program to your Seeeduino LoRaWAN.

Class B

  1. In the Arduino IDE File -> Examples -> SeeeduinoLoRaWan-x.x.x open one of these programs:
    • 868_OTAA_Class_B_CLPP_Downlink
    • 433_OTAA_Class_B_CLPP_Downlink
  2. In program replace APP_EUI, DEV_EUI and APP_KEY with keys in TTS. Keys are in TTS -> Applications -> YourAppName -> YourEndDeviceName -> Activation information.
  3. Connect Seeeduino LoRaWAN using micro USB cable to your computer and choose the appropriate COM port which is used for communication with Seeeduino.
  4. In Arduino IDE click on Upload button to upload program to your Seeeduino LoRaWAN.

Class C

  1. In the Arduino IDE File -> Examples -> SeeeduinoLoRaWan-x.x.x open one of these programs:
    • 868_OTAA_Class_C_CLPP_Downlink
    • 433_OTAA_Class_C_CLPP_Downlink
  2. In program replace APP_EUI, DEV_EUI and APP_KEY with keys in TTS. Keys are in TTS -> Applications -> YourAppName -> YourEndDeviceName -> Activation information.
  3. Connect Seeeduino LoRaWAN using micro USB cable to your computer and choose the appropriate COM port which is used for communication with Seeeduino.
  4. In Arduino IDE click on Upload button to upload program to your Seeeduino LoRaWAN.

 

Sending downlink from TTS

  1. In TTS -> Applications -> YourAppName -> YourEndDeviceName -> Messaging -> Schedule Downlink write 010001 to Payload field (channel 01, type 00 (Digital Input), value 01).
  2. Click on button Schedule downlink.
  3. After sending the uplink and receiving the downlink by Seeeduino, you should see the following in Serial Monitor:

 

Sending downlinks via TTS using a Python script from TTS

You can use a Python script to automatically encode and send the uplink sending period setting value.

  1. Follow the tutorial Sending downlinks via TTS using a Python script and then continue with the following points below.
  2. Open the main.py file in your favorite code editor.
  3. FPort, Confirmed downlink, Priority and Insert mode can be set in the Downlink Settings section.
  4. The uplink sending period setting value can be set on line 16 (for example, set 60 for 60 seconds).
  5. Run main.py script. (In CMD/Terminal navigate to directory with main.py file and type python3 main.py).
  6. In CMD/Terminal you should see this:
  7. In TTS -> Applications -> YourAppName -> YourEndDeviceName -> Live data you should see this:
  8. You should see the following in Arduino IDE Serial Monitor:

 

Sending downlinks via TTS using a Grafana panel plugin

If you want to send downlinks in a different way, continue with the following tutorial: