0
1
00:00:00,930 --> 00:00:03,960
Gateways are between the end device and the network server.
1

2
00:00:03,960 --> 00:00:08,280
On the end-device and on the server side I've represented 
2

3
00:00:08,280 --> 00:00:09,450
the message as layers.
3

4
00:00:10,350 --> 00:00:16,050
When we use this representation, we consider that each layer add a service to the one below.
4

5
00:00:16,740 --> 00:00:21,120
So let's take the example of our temperature sensor with one byte user payload.
5

6
00:00:22,200 --> 00:00:28,260
This temperature belongs to the application layer and is encrypted with a key called AppSKey.
6

7
00:00:29,010 --> 00:00:34,050
Then, the layer below will add the LoRaWAN header. In the Lorawan header,
7

8
00:00:34,290 --> 00:00:41,100
the main service is the authentication process and this is done thanks to another key call network session key.
8

9
00:00:42,690 --> 00:00:49,080
And finally, this lorawan message will be modulated in Lora and a message sent as a radio frequency
9

10
00:00:49,080 --> 00:00:49,410
packet.
10

11
00:00:50,220 --> 00:00:56,250
I remind you that the transmitted message is not sent towards a specific gateway. All gateways in the
11

12
00:00:56,250 --> 00:00:59,760
coverage area will receive this packet and demodulate it.
12

13
00:01:00,810 --> 00:01:07,350
On this diagram I've drawn one gateway and we can see that its job is simply to demodulate the message.
13

14
00:01:08,100 --> 00:01:10,380
Once it has recovered the PHY payload,
14

15
00:01:10,650 --> 00:01:16,530
so the exact content of the lora frame, then it sends it on an IP network (over internet).
15

16
00:01:17,580 --> 00:01:23,070
A gateway doesn't analyze the lora frame, so it doesn't authenticate the packet,
16

17
00:01:23,070 --> 00:01:25,230
neither decrypts it. 
17

18
00:01:25,500 --> 00:01:30,330
Anyway, they don't have the network session keys and the application session keys, so there is no way they
18

19
00:01:30,330 --> 00:01:31,050
can manage it.
19

20
00:01:32,220 --> 00:01:39,060
So we need to consider the gateway as a simple Lora entity with emission and reception capabilities. They
20

21
00:01:39,060 --> 00:01:44,550
receive the radio frequency message on one side and transmitted to Internet on the other side.
21

22
00:01:45,360 --> 00:01:52,650
The IP network is usually called the backhaul, and it's often Ethernet, Wi-Fi or 4G connection.
22

23
00:01:53,580 --> 00:01:58,770
And finally on the right, it would be up to the network server to authentic the packet.
23

24
00:01:59,100 --> 00:02:04,440
Then the final user payload will end up to the application, server ready to be decrypted.
24

25
00:02:05,040 --> 00:02:10,200
If everything goes right, the temperature value should obviously be the one sent by the end device.
