In the LoRa frame, 1
The field PHY payload carries the upper layer protocol. And in our case, the protocol carried by the LoRa 2
packet is the LoRa MAC, 3
so the LoRaWAN protocol. 4
Let's see what's in there. 5
If we look at the specification, we can see that the PHY payload is composed of three fields: A MAC Header, 6
a MAC Payload, and a MIC. 7
The MAC Header is used to indicate the type of frame (a Join, Data up or down, if it's confirmed or unconfirmed... 8
and so on.) 9
It's been calculated on the device and will be checked on the server. 10
Great. 11
So now, we can ask ourselves what is in the MAC payload? 12
Well, in the MAC payload there is another header called Frame Header, a field called Frame Port, and 13
the last field call Frame Payload. 14
The Frame Header contains many useful information like the device adress for identification in the 15
network. 16
The Frame Counter that we explained earlier used for replay attack and a few other information to indicate 17
if the device needs to use the ADR algorithm. 18
If the frame is acknowledging a previous transmission and so on. 19
But between all these fields, the most important one for the end user is the Frame Payload. Because 20
it's the user data. 21
So here, we have the overall LoRaWAN frame and the user data is in the top right corner of my figure. 22
But there is one last thing to explain, because right now if we read the Frame Payload in this LoRa frame, 23
then there is no way to understand its content because it's encrypted. 24
That will be the job of the last layer, which is the Application Layer. 25
And we'll see that in the next video.