6. How to handle Uplink & Downlink Messages?
Click new > Request > Give a Name for the File > Create Collection to save the file > Save.
After successfully creating a request, you should come to this page.
Head to the Antares Platform and click on Applications > Your Application > Your Device. Copy the Hierarchical URL using the small copy button seen below.
Go back to Postman, change the GET button to POST and paste the link as seen below.
Next, we will set our Headers for the downlink messages. Click on Headers and add in the following:
The access key in Antares Platform can be found as seen below:
Next, we will define the data we want to send to the 1SJ device. We will go to Body > Raw as seen below to define our data.
Add in the Antares downlink message format as defined below:
Alternatively, you may copy paste the code from below:
{
"m2m:cin": {
"con": "{\"type\":\"downlink\", \"data\":\"20\", \"fport\":4}"
}
}
|
|
What does this message mean?
|
Firstly, the Antares downlink message format takes in 3 parameters. The type, data and port number.
Thereafter, it stores it in the content "con" of the m2m:cin path.
In our example, the message type is downlink,
the data we want to send is 20 and the port we want to send this message to is port 4.
|
After defining the type, data and port, we will send the downlink data by clicking Send.
Head back to the Antares Platform and notice the downlink message sent from Antares.