Skip to main content

Payload Format of tag XL

Message Types

PortNameTypeDescription
151Settings DownlinkDownlinkContains a list of setter, getter and/or runner commands.
151Settings UplinkUplinkContains a list of device and/or runner settings. Sent in different situations.
192GNSS-NG Localization MessageUplinkOne or two GNSS-NG localization messages are sent after a successful GNSS-NG scan.
197Wi-Fi Localization MessageUplinkA single Wi-Fi localization message is sent after a successful Wi-Fi scan.

Configurable Parameters

The following table lists the default values and limits of the configurable parameters. The parameters are modifiable via settings downlinks.

Configuration NameDefault ValueMinimumMaximumUnitDescription
MOVING_INTERVAL30012065535secondsLocalization scan interval if the device is in motion.
STEADY_INTERVAL720012065535secondsLocalization scan interval if the device is not in motion.
HEARTBEAT_INTERVAL61255hoursHeartbeat message interval.
BLE_FWU_ENABLED101-BLE firmware update over the air enabled.
ADVERTISEMENT_FWU_INTERVAL305255secondsTime period during which the device opens the BLE advertisement for firmware updates.
GNSS_ENABLE101-GNSS scans enabled.
WIFI_ENABLE101-Wi-Fi scans enabled.
ACCELERATION_ENABLE101-If enabled, localization scans are triggered if the device is in motion (based on the acceleration sensor data).
ACCELERATION_SENSITIVITY300016000milli-gAcceleration sensor threshold.
ACCELERATION_DELAY1500100065535millisecondsThe device must remain in motion for at least the specified time to trigger a localization scan.

A settings uplink is sent on port 151. The payload uses the TLV format (Tag Length Value). It is defined as:

TagLengthNumber of CommandsData
0x4CVariable number (uint8_t)Variable number (uint8_t)Commands in TLV format

The settings uplink contains one or more settings in its data section. These settings are again in TLV format and are either device or runner settings:

#Device SettingTagSizeDataFormat
1Device Flags0x400x01bit 0: BLE_FWU_ENABLED
bit 1: GNSS_ENABLE
bit 2: WIFI_ENABLE
bit 3: ACCELERATION_ENABLE
bit 4-7: RFU
bit field
2Asset Tracking Intervals0x410x04data 0: MOVING_INTERVAL
data 1: STEADY_INTERVAL
uint16_t[2]
3Acceleration Sensor Settings0x420x04data 0: ACCELERATION_SENSITIVITY
data 1: ACCELERATION_DELAY
uint16_t[2]
4HEARTBEAT_INTERVAL0x430x01Heartbeat interval in hoursuint8_t
5ADVERTISEMENT_FWU_INTERVAL0x440x01Value in secondsuint8_t
6Battery Voltage0x450x02Battery voltage in mVuint16_t
7Firmware Hash0x460x04First 4 bytes of SHA-1 hash of git commituint8_t[4]
8Reset Count0x490x02Number of resets since last flash eraseuint16_t
9Reset Cause0x4A0x04Value of reset cause registeruint32_t
10Scan Counts0x4B0x04data 0: Number of GNSS scans since last reset
data 1: Number of Wi-Fi scans since last reset
uint16_t[2]
#Runner SettingTagSizeDataFormat
1Alarm Started0x800x02data 0: Duration of started alarm in minutes (min: 0, max: 255)
data 1: Period of alarm beeps in seconds (min: 0, max: 255)
uint8_t[2]
2Location Scan Triggered0x820x00No payload data. A location scan runner command was received and a location scan was started if this tag is present.-

GNSS-NG Localization Message

GNSS-NG localization messages are sent on port 192. These messages are sent after a successful GNSS scan and they are generated by Semtech's geolocation service. The device decides by itself whether it starts an autonomous GNSS scan or an assisted GNSS scan. Before the device is able to perform an assisted GNSS scan, it must have a valid assistance position.

The device obtains an assistance position by performing an autonomous GNSS scan. Afterwards, it locally demodulates time and computes an assistance position. After an autonomous GNSS scan, the device sends a single GNSS-NG message. As soon as the device has a valid assistance position, it performs assisted GNSS scans whenever possible. The device is configured in MOBILE mode, which means it performs 2 GNSS scans with no delay between them. After an assisted GNSS scan, the device sends either one or two GNSS-NG messages, depending on whether one or both scans were successful. If a GNSS scan fails, the device does not send any GNSS-NG messages and starts a Wi-Fi scan instead.

The GNSS-NG messages are forwarded the LoRaCloud solver which computes the final position. The multiframe feature of the LoRaCloud solver is used to combine the results of the two GNSS scans into a single position if two GNSS-NG messages are sent after an assisted GNSS scan.

Please refer to the section GNSS scan & send services of the README of Semtech's geolocation services for more information. A detailed description of the LoRa Edge GNSS-NG (NAV-Group) positioning protocol is available here.

Wi-Fi Localization Message

A Wi-Fi localization message is sent on port 197. This message is sent after a successful Wi-Fi scan and it is generated by the Semtech's geolocation service. The scan simply returns the list of access point MAC addresses that have been detected and sends it to the LoRaCloud solver within one uplink message.

Whenever a location scan is triggered, the device first performs a GNSS scan. If the GNSS scan is successful, the device sends one or two GNSS-NG messages. If the GNSS scan is not successful, the device performs a Wi-Fi scan.

Please refer to the section Wi-Fi scan & send services of the README of Semtech's geolocation services for more information. A detailed description of the LoRa Edge Wi-Fi positioning protocol is available here.

Message Usage

Welcome Messages

A welcome message is sent every time the device successfully joined to a LoRaWAN network. It corresponds to a settings uplink for the tags [0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x49, 0x4A]. Therefore, it contains all settings of the device in addition to the battery voltage, the firmware hash, the reset count and the reset cause.

Heartbeat Messages

A heartbeat message is sent at a fixed interval. The HEARTBEAT_INTERVAL is stored in the settings. A heartbeat message corresponds to a settings uplink for the tags [0x45, 0x4B]. Therefore, it contains the battery voltage and the scan counts. If the HEARTBEAT_INTERVAL is adjusted via a settings downlink, a heartbeat message is sent after a short delay and the new interval is used for the next heartbeat message.

Settings Messages

For every received setting downlink, the device takes the actions for the received commands and sends a settings uplink. The actions are summarized in the following list:

  • Setter command: Is used to change the value of a setting. First, the range of the value is checked. If the value is in the valid range, it is stored in NVM. The current value of the setting is added to the settings uplink.
  • Getter command: Is used to read the value of a setting. The current value of the setting is added to the settings uplink.
  • Runner command: Is used to execute an action with the given runner settings. Some runner commands trigger a settings uplink.

The settings uplink uses the same order of settings as the commands of the downlink that it received before. For example, if the received downlink contains the commands with tags [0x22, 0x20, 0x44, 0x80], the uplink will contain the settings with tags [0x42, 0x40, 0x44, 0x80]. The value of the settings correspond to the value of the applied settings. If one of the commands in the downlink tried to set a setting to a value out of range, the corresponding setting will not be changed. Hence, the settings uplink will contain the last value that was applied successfully instead of the value that was requested by the downlink.

Settings Messages with Alarm Command

If a setting downlink contains the alarm runner command 0x80 an alarm with the specified duration and interval is started. The parameters are stored in RAM, not in NVM. The device exits the alarm mode after the specified duration has elapsed. A running alarm is stopped if an alarm downlink is received with either duration or interval set to 0 (or both). As for other settings downlinks, the device sends a settings uplink after a downlink with an alarm runner command. The uplink confirms the duration and interval that were used to start or stop the alarm.

A settings downlink is sent on port 151. The payload uses the TLV format (Tag Length Value). It is defined as:

TagLengthNumber of CommandsData
0x4CVariable number (uint8_t)Variable number (uint8_t)Commands in TLV format

The settings downlink contains one or more commands in its data section. These commands are again in TLV format and are either setter, getter or runner commands:

#Setter CommandTagSizeDataFormat
1Set Device Flags0x200x01bit 0: BLE_FWU_ENABLED
bit 1: GNSS_ENABLE
bit 2: WIFI_ENABLE
bit 3: ACCELERATION_ENABLE
bit 4-7: RFU
bit field
2Set Asset Tracking Intervals0x210x04data 0: MOVING_INTERVAL
data 1: STEADY_INTERVAL
uint16_t[2]
3Set Acceleration Sensor Settings0x220x04data 0: ACCELERATION_SENSITIVITY
data 1: ACCELERATION_DELAY
uint16_t[2]
4Set HEARTBEAT_INTERVAL0x230x01Heartbeat interval in hoursuint8_t
5Set ADVERTISEMENT_FWU_INTERVAL0x240x01Value in secondsuint8_t
#Getter CommandTagSizeDataFormat
1Get Device Flags0x400x00--
2Get Asset Tracking Intervals0x410x00--
3Get Acceleration Sensor Settings0x420x00--
4Get HEARTBEAT_INTERVAL0x430x00--
5Get ADVERTISEMENT_FWU_INTERVAL0x440x00--
6Get Battery Voltage0x450x00--
7Get Firmware Hash0x460x00--
8Get Reset Count0x490x00--
9Get Reset Cause0x4A0x00--
10Get Scan Counts0x4B0x00--
#Runner CommandTagSizeData / DescriptionFormat
1Run Alarm0x800x02data 0: Duration of alarm in minutes (min: 0, max: 255)
data 1: Period of alarm beeps in seconds (min: 0, max: 255)
uint8_t[2]
2Reset Device0x810x00Triggers a system reset on the device-
3Run Location Scan0x820x00Triggers a location scan on the device-
4Clear Store and Forward Buffer0x830x00Clears the message buffer used by the store and forward service of the LBM stack-