So far, we've worked on the complete LoRaWAN transmission from the end-device to the Application Server. 1
Once the user data have reached the Application Server, we studied in a previous chapter how to export 2
them. 3
For that, we use the HTTP and the MQTT protocols. 4
We did exactly the same thing for the downlink stream. 5
So on the other way around, we transmitted some command to the LoRaWAN server in order to reach the LoRaWAN 6
end-device. 7
This is the downlink stream. 8
But what we did was a little bit bare metal because we received the uplink JSON data directly in a terminal 9
or in a debug window. 10
And in the same way for the downlink, we wrote the JSON object from our terminal using CURL command. 11
That was okay to test and try the connection with our LoRaWAN server, but I bet that your client won't 12
like it if we leave it this way. 13
So from now on, we need to improve the data representation. 14
So let's see all the services that an IoT platform needs to run. 15
We'll first look at the uplink stream. 16
The first step that the IoT platform needs to do is to retrieve the data from the LoRaWAN server. 17
We've seen that already. 18
So the IoT platform needs to support the MQTT or the HTTP protocol. 19
Then secondly, we need to store the data. 20
What we usually do is to save the value with their timestamp in a database. 21
Third, when the data is saved, we may have to process the census value. 22
For example, we may want to extract a specific value or to compute a calculation with all the data 23
received. 24
And finally, the final user always wants to have an easy access to this data. 25
So we need to represent them in a relevant format. 26
It can be a table, a graph, a goat or whatever, but all these representations have to be displayed 27
and accessible through a web interface, or even better, with the mobile application. 28
This front end is the only interface with the user. 29
So here, there must be only relevant information targeting the client use case. 30
And that's definitely here that developers needs to be really careful with the user experience. 31
Now, when we go through the downlink stream, we'll have exactly the same journey, but of course in 32
the other way around. 33
From a graphic user interface, the user should be able to send a specific value to the End-device. 34
It can be as simple as clicking a button or moving a slide bar. 35
Then we'll probably want to record the transmitted value so we can store them in a database. 36
And once this request is processed, the IoT platform must again be able to send the data over MQTT 37
or HTPP to the LoRaWAN server. 38
So in this chapter we'll work on all these different steps, but there is something important that we 39
need to understand before we start. 40
Is that all these services have nothing to do with LoRaWAN . 41
As soon as we are on the other side of the Application Server, the payload is decrypted. 42
So when this is done, the LoRaWAN protocol has its job completed. 43
So from that point we leave the LoRaWAN world and we use other protocols like MQTT. 44
However, if our network is designed with what we call End-to-End security, that means that the decryption 45
is executed on the IoT platform itself. 46
In that situation only, we could say that the IoT platform runs the LoRaWAN protocol, but most of 47
the time this is not the case. 48
Finally, during our demonstration, we'll often use the same application that we've used so far. 49
Our own device will send a temperature on one byte. 50
Great. 51
So let's now see the solution that we can consider to design our IoT platform.