Page tree
Skip to end of metadata
Go to start of metadata


Contents


Basic verbosity


An "Uplink Data Message" is a LoRaWAN message received from a registered device on the Network Server which is sent to the defined "Application Output(s)".

➜ Every received message will be sent the defined endpoint in the configured verbosity in a JSON format.


Every uplink JSON message corresponds to one frame produced by your device, It contains not only the raw application payload, but also additional meta-data.

➜ If APPSKEY is assigned to a device, the data field will be populated with decrypted data, and encdata will be ommited.

➜ If APPSKEY is missing, the encdata field will be populated with encypted payload, and data will be ommited.


To change the verbosity have a look at the Radio Verbosity page.


Message format Typescript interface notation

{
        cmd      : 'rx';    // identifies type of message, rx = uplink message
        EUI      : string;  // device EUI, 16 hex digits (without dashes)
        ts       : number;  // server timestamp as number (milliseconds from Linux epoch)
        ack      : boolean; // acknowledgement flag as set by device
		bat		 : number;  // device battery status, response to the DevStatusReq LoRaWAN MAC Command
        fcnt     : number;  // frame counter, a 32-bit number
        port     : number;  // port as sent by the end device

        encdata? : string;  // data payload (APPSKEY encrypted hex string)
                            // only present if APPSKEY is not assigned to device

        data?    : string;  // data payload (decrypted, plaintext hex string)
                            // only present if APPSKEY is assigned to device
}


Example Message

{
		"cmd"  : "rx",
		"EUI"  : "0102030405060708",
		"ts"   : 1470850675433,
		"ack"  : false,
		"bat"  : 254
		"fcnt" : 1,
		"port" : 1,
		"data" : "0102AABB"
}             


ParameterTypeDescription
cmdstringidentifies type of message, always 'rx' for uplink data messages
EUIstringdevice EUI, 16 hex digits (without dashes)
tsnumberserver timestamp as a number of miliseconds from Linux epoch
ackbooleanacknowledgement flag as set by device
batnumber

device battery status, response of the DevStatusReq LoRaWAN MAC Command

fcntnumberframe counter, a 32-bit integer number
portnumberport number as sent by the end device
encdatastring (optional)encrypted data payload as hexadecimal string, only present if APPSKEY is not assigned to device
datastring (optional)decrypted data payload as hexadecimal string, only present if APPSKEY is assigned to device


Extended verbosity


The LORIOT Network Server can deliver extended radio information to your application.

The extended radio information is reported as seen by the first gateway that received the frame.


Message format Typescript interface notation

 		{
          cmd      : 'rx';    // identifies type of message, rx = uplink message
          EUI      : string;  // device EUI, 16 hex digits (without dashes)
          ts       : number;  // server timestamp as number (miliseconds from Linux epoch)
          ack      : boolean; // NEW! acknowledgement flag as set by device
          fcnt     : number;  // frame counter, a 32-bit number
          port     : number;  // port as sent by the end device

          encdata? : string;  // data payload (APPSKEY encrypted hex string)
                              // only present if APPSKEY is assigned to device

          data?    : string;  // data payload (decrypted ,plaintext hex string)
                              // only present if APPSKEY is not assigned to device

          // extended radio information

          freq     : number;  // radio frequency at which the frame was received, in Hz
          dr       : string;  // radio data rate - spreading factor, bandwidth and coding rate
                              // e.g. SF12 BW125 4/5
                              // UPDATED: previously the field was called 'sf'
          rssi     : number;  // frame rssi, in dBm, as integer number
          snr      : number;  // frame snr, in dB, one decimal place
       }


Example Message

	 {
          "cmd"  : "rx",
          "EUI"  : "0102030405060708",
          "ts"   : 1470850675433,
          "ack"  : false,
          "fcnt" : 1,
          "port" : 1,
          "data" : "0102AABB",
          "freq" : 868500000,
          "dr"   : "SF12 BW125 4/5",
          "rssi" : -130,
          "snr"  : 1.2
      }            


ParameterTypeDescription
cmdstringidentifies type of message, always 'rx' for uplink data messages
EUIstringdevice EUI, 16 hex digits (without dashes)
tsnumberserver timestamp as a number of milliseconds from Linux epoch
ackbooleanacknowledgement flag as set by device
batnumberdevice battery status, response of the DevStatusReq LoRaWAN MAC Command
fcntnumberframe counter, a 32-bit integer number
portnumberport number as sent by the end device
encdatastring (optional)encrypted data payload as hexadecimal string, only present if APPSKEY is not assigned to device
datastring (optional)decrypted data payload as hexadecimal string, only present if APPSKEY is assigned to device
freqnumberradio frequency at which the frame was received, in Hz
drstringradio data rate - spreading factor, bandwidth and coding rate, e.g. SF12 BW125 4/5
rssinumberframe rssi, in dBm, as integer number
snrnumberframe snr, in dB, one decimal place
  • No labels