Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Nwave Cloud allows clients to inject LoRaWAN messages for further processing. This makes it possible to integrate LoRaWAN parking sensors with Nwave Analytics services without the need to use public LoRaWAN clouds.

Currently, Nwave Cloud provides an injection method through the HTTP interface. This is the simplest way for development and debugging.

Nwave provides an HTTP endpoint for the injection: https://in.lorawan.source.nwave.io/v1/injest.

The endpoint receives only POST requests and requires using of an authorization token. Follow this instruction for token generating.

The basic request body can contain only required message object fields:

{	
	"dev_eui": "00E8BF3B00100030",
	"received_at": "2021-12-15T08:09:56.936592Z",
	"uplink_message": {
		"f_port": 2,
		"f_cnt": 81,
		"f_payload": "0A1234"		
	}		
}

received_at must contain real time of message reception by LoRaWAN station. This field is used for data analytics.

Also, Nwave Cloud supports additional message object fields. You can send them to make debugging and analysis easier.

The next example demonstrates a message object with required and all additional message fields:

{	
	"dev_eui": "00E8BF3B00100030",
	"received_at": "2021-12-15T08:09:56.936592Z",
	"uplink_message": {
		"f_port": 2,
		"f_cnt": 81,
		"f_payload": "0A1234",
		
		"trace_id": "e07d7812-869a-4f8d-bc17-2cd9c4bde94f",
		
		"bandwidth": 125000,
		"spreading_factor": 9,
		"coding_rate": "4/5",
		"frequency": "868300000",
		"confirmed": true,
		
		"rx_metadata": [
			{
				"gateway_eui": "0000024B0B03157A"
				"rssi": -115,
				"snr": -0.5,
				"location": {
					"latitude": 51.52485927633408,
					"longitude": -0.13254563502660632
				}
			},
			{
				...
			}
		]		
	}		
}

Additional fields do not need to be sent altogether. You can send only part of them. For example, if you don’t need to signal strength analytics, but you want to have a chance to trace your messages, you can send only required fields and trace_id:

{	
	"dev_eui": "00E8BF3B00100030",
	"received_at": "2021-12-15T08:09:56.936592Z",
	"uplink_message": {
		"f_port": 2,
		"f_cnt": 81,
		"f_payload": "0A1234",
		
		"trace_id": "e07d7812-869a-4f8d-bc17-2cd9c4bde94f"
	}		
}

Here is the example of cURL command for injecting a message to the Nwave Cloud:

curl -XPOST -H 'x-Auth-Token: <Your API Key>' -d '{	
	"dev_eui": "00E8BF3B00100030",
	"received_at": "2021-12-15T08:09:56.936592Z",
	"uplink_message": {
		"f_port": 2,
		"f_cnt": 81,
		"f_payload": "0A1234",
		
		"trace_id": "e07d7812-869a-4f8d-bc17-2cd9c4bde94f"
	}		
}' 'https://in.lorawan.source.nwave.io/v1/injest'

  • No labels