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


Contents


Basic Message Format 


The LORIOT Network Server can deliver detailed radio information from all gateways that received a given frame.

Please keep in mind this messages has higher latency than the standard data 'rx' message, as it has to wait for all the gateways to report the status.

Based on the configured verbosity level for the application, various details are reported per-gateway.

Message format Typescript interface notation

{
    cmd      : 'gw';    // identifies type of message, gw = gateway information
    EUI      : string;  // device EUI, 16 hex digits (without dashes)
    ts       : number;  // server timestamp as number (milliseconds 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)
                        // only present if APPSKEY is assigned to device
                        // string format based on application setup (default is hex string)

    data?    : string;  // data payload
                        // only present if APPSKEY is not assigned to device
                        // string format based on application setup (default is hex string)

    // extended radio information

    freq     : number;  // radio frequency
    dr       : string;  // radio spreading factor, bandwidth and coding rate
                        // e.g. SF12 BW125 4/5
    gws      : array;   // array of gateway information objects
                        // see the verbosity levels below
}


Example Message

{
    "cmd"  : "gw",
    "EUI"  : "0102030405060708",
    "ts"   : 1470850675433,
    "ack"  : false,
    "fcnt" : 1,
    "port" : 1,
    "data" : "0102AABB",
    "freq" : 868500000,
    "dr"   : "SF12 BW125 4/5",
    "gws"  : [
    	{
    		"rssi"  : -130,
    		"snr"   : 1.2,
    		"ts"    : 43424140,
    		"gweui" : "1122334455667788.0",
    		"lat"   : 47.284687,
    		"lon"   :  8.565746
    	}
    ]
}


ParameterTypeDescription
cmdstringidentifies type of message, always 'gw' for gateway information messages
EUIstringdevice EUI, 16 hex digits (without dashes)
tsnumberserver timestamp as a number of milliseconds from Linux epoch
ackbooleanNEW! acknowledgement flag as set by device
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
gwsarrayarray of gateway information objects, see the verbosity levels below


Gateway verbosity level


Within the LORIOT application, use the features section to select the preferred verbosity level reported for your gateway:

Radio data



Message format Typescript interface notation

{
    rssi     : number;  // radio rssi, in dBm
    snr      : number;	// radio snr, in dB, single decimal digit precision
    ts       : number;  // timestamp (gateway internal counter)
}


ParameterTypeDescription
rssinumberframe rssi, in dBm, as integer number
snrnumberframe snr, in dB, one decimal place
tsnumbergateway internal counter


Gateway ID data



Message format Typescript interface notation

{
    rssi     : number;  // radio rssi
    snr      : number;	// radio snr
    ts       : number;  // timestamp (gateway internal counter)
    gweui    : string;  // gateway extended EUI as EUI.RADIO
                        // e.g. "1122334455667788.0"
}


ParameterTypeDescription
rssinumberframe rssi, in dBm, as integer number
snrnumberframe snr, in dB, one decimal place
tsnumbergateway internal counter
gweuistringgateway extended EUI as EUI.RADIO, e.g. 1122334455667788.0


Location data



Message format Typescript interface notation

{
    rssi     : number;  // radio rssi
    snr      : number;	// radio snr
    ts       : number;  // timestamp (gateway internal counter)
	time	 : string 	// gateway rx UTC time, ISO 8601, up to nanosecond precision 
	tmms?	 : number  	// gateway rx GPS time, milliseconds since Jan 6th 1980
						   available for GPS-enabled gateways only
    gweui    : string;  // gateway extended EUI as EUI.RADIO
                        // e.g. "1122334455667788.0"
    lat      : number;  // gateway latitude
    lon      : number;  // gateway longitude
}


ParameterTypeDescription
rssinumberframe rssi, in dBm, as integer number
snrnumberframe snr, in dB, one decimal place
tsnumbergateway internal counter
timestringtimestamp of packet reception by gateway, in ISO 8601 format , UTC, up to nanosecond precision for GPS-enabled gateways, otherwise micro or milliseconds
tmmsnumbertimestamp of packet reception by gateways, in GPS time, number of milliseconds since Jan 6th 1980
gweuistringgateway extended EUI as EUI.RADIO, e.g. 1122334455667788.0
latnumbergateway latitude, fractional degrees
lonnumbergateway longitude, fractional degrees


If a gateway has a GPS receiver connected, the lat and lon field are filled with real GPS coordinates. If there is no GPS receiver connected the lat and lon field are filled with the user defined coordinates.



  • No labels