List of available downlink commnads for MeteoHelix LoRaWAN weather stations

Wireless-Adjust-Downling-LoRa-Sigfox-Icon.png

The following table lists all available downlink commands for MeteoHelix LoRaWAN weather stations

  • 0x80 - request next data from server

  • 0x00 - none

  • 0x01 - set time with unix timestamp

  • 0x02 - set measure interval, logging interval and transmit interval

  • 0x03 - set polynome, coefficient

  • 0x04 - device reset (Reset is required after changing any of the following: DevAddr, AppKey, AppEUI, AppsKey, NwksKey and OTAA/ABP authentication)

  • 0x05 - set data protocol

  • 0x06 - set default config

  • 0x07 - set DevAddr (manually set device Network Address) length of 32 bits (4 bytes).

  • 0x08 - set AppKey (manually set device Application Key) length of

  • 0x09 - set AppEUI (manually set device Application Identifier) length of 128 bits (16 bytes).

  • 0x0A - set AppsKey (manually set device Application Session Key) length of 128 bits (16 bytes).

  • 0x0B - set NwksKey (manually set device Network Session Key) length of 128 bits (16 bytes).

  • 0x0C - set OTAA or ABP authentication

  • 0x0D - turn on/off message confirmation

LoRaWAN Network Security and Data encryption

  • DevEUI - 64 bit end-device identifier, EUI-64 (unique)

  • DevAddr - 32 bit device address (non-unique)

  • AppEUI - 64 bit application identifier, EUI-64 (unique)

  • GatewayEUI - 64 bit gateway identifier, EUI-64 (unique)

The Network Session Key (NwkSKey) is used for interaction between the Node and the Network Server. This key is used to check the validity of messages (MIC check). In the backend of The Things Network this validation is also used to map a non-unique device address (DevAddr) to a unique DevEUI and AppEUI.

The Application Session Key (AppSKey) is used for encryption and decryption of the payload. The payload is fully encrypted between the Node and the Handler/Application Server component of The Things Network (which you will be able to run on your own server). This means that nobody except you is able to read the contents of messages you send or receive.

These two session keys (NwkSKey and AppSKey) are unique per device, per session. If you dynamically activate your device (OTAA), these keys are re-generated on every activation. If you statically activate your device (ABP), these keys stay the same until you change them.

Dynamically activated devices (OTAA) use the Application Key (AppKey) to derive the two session keys during the activation procedure. In The Things Network you can have a default AppKey which will be used to activate all devices, or customize the AppKey per device.

Each device is assigned a dynamic 32 bit Device Address (DevAddr) upon joining a LoRaWAN network. For The Things Network, the first 7 bits are fixed with the remaining 25 bits assigned to individual devices.

Adaptive Data Rate (ADR) of MeteoHelix weather stations

 SF7BW125 is usually a good place to start, as it consumes the least power and airtime. If you need more range, you can slowly increase until you have enough. You can also enable adaptive data rate, the network will then be able to automatically optimize your data rate.

Over-the-Air Activation (OTAA)

Over-the-Air Activation (OTAA) is the preferred and most secure way to connect with The Things Network. Devices perform a join-procedure with the network, during which a dynamic DevAddr is assigned and security keys are negotiated with the device.

Activation by Personalization (ABP)

In some cases you might need to hardcode the DevAddr as well as the security keys in the device. This means activating a device by personalization (ABP). This strategy might seem simpler, because you skip the join procedure, but it has some downsides related to security.

commands for Sigfox + LoRa
Commands Command parameters Command description
0x80 none request next data from server
0x00 none none
0x01 HH hh LL ll set time with unix timestamp
0x02 MeasH MeasL LogH LogL ModemH ModemL set MeasInterval [s], LogInterval [s], ModemInterval [min]
0x03 Poly Coeff float1 float2 float3 float4 set polynome, coefficient
0x04 none Reset
0x05 DataProtocol set Data protocol
0x06 none set Default Config
0x07 DevAddr set DevAddr
0x08 Appkey set AppKey
0x09 AppEui set AppEui
0x0A AppsKey set AppsKey
0x0B NwksKey set NwksKey
0x0C OTAA set OTAA or ABP
0x0D CNF set / clear confirmation
Examples:
RX=01 5B E7 03 D0 00 00 00 set time and date
RX=02 00 0F 02 58 00 0A 00 set MeasInterval 15s, LogInterval 600s, ModemInterval 10 min
RX=03 01 00 19 04 9E 3F 00 set P1, A0 = 1.2345
RX=04 00 00 00 00 00 00 00 reset
RX=05 01 00 00 00 00 00 00 set DataProtocol 1
RX=06 00 00 00 00 00 00 00 SetDefaultConfig
mac_rx 1 0700000000
mac_rx 1 08424152414E492044455349474E000000
mac_rx 1 09424152414E490000
mac_rx 1 0A000000424152414E492044455349474E
mac_rx 1 0B000424152414E492044455349474E000
mac_rx 1 0C 01 set OTAA
mac_rx 1 0D 00 clear confirmation