So now let's make a demonstration about this lorawan device classes. 1
We will start with a class A end device, and then after we'll switch to class C. 2
So first let me explain the application we're going to use. Again we will consider a one byte transmission 3
representing a temperature sensor. 4
This temperature is sent on the application server each time we press the button. So we have a total 5
control of when the end device would transmit. Then we'll focus on the downlink capabilities. 6
So basically we'll program the downlink on the application server. 7
It will be scheduled on the network server. 8
and here comes the big question. When will the downlink frame be sent? 9
Obviously, the behavior will be different when we use a class A or class C end device. 10
You get to the class A end device will be able to receive only on the RX1 or RX2 slot. 11
So just after transmission. 12
And on the other hand, the Class C end device will be able to receive whenever it wants. 13
That is, there is no specific time slot for the reception of downlink packet. 14
What ever 15
a device on the network server. 16
If you want to set up a Class A Lorawan transmission, we have to first register a class A end device 17
on the network server. 18
Secondly, configure the end device as a class A on the device itself. 19
To prepare this demonstration, we have enregister the class A end device called device one OTAA on the Lorawan server. 20
On this part of Lorawan server call TTN class A is the default class. 21
So there is no need to explicitly specify. On the device side, 22
I configured it as a class A end device. 23
Again, the configuration method depends on your end device. 24
In my case is just a text. 25
file. 26
So I just have to define the macro class A in the corresponding field. 27
and you can see that I've also written all the Lorawan information, but for that part, we'll explain 28
it later. 29
So right now we just need to concentrate on the class. 30
We are now ready. For demonstration, 31
I have the following Windows organization. On the left, 32
I have my device log for my cellular link. 33
Thanks to that, i will know exactly when it sends uplink data. And as soon as there will be a reception 34
that will also be ready 35
on a log. When it would be the case, it will tell me exactly when and what was received. 36
Now ont the right, 37
I have a window with two tops. 38
The first tops represents the getway traffic and the second tops is represent the traffic on my registered end 39
device on the server. 40
So let's go, 41
I pull up my end device. 42
When it starts up, there is a joint procedure. 43
We'll see that later. 44
Then it falls in my application. 45
It's a very simple application. 46
It's just wait for me to press the push button each time I press it, then a temperature data is sent. 47
This frame is transmitted from my device here, it goes all the way through my gateway. 48
I can see it in my gateway log here, my network server and finally my application server here. 49
On this version of TTN, I see two frames. 50
It's a little bit confusing, but don't worry. 51
They have the sames, 52
There is only one to consider. 53
Each time a frame is sent, a counter increments, we can see the different value here one, two, three 54
and so on. 55
And on the end device, we have exactly the same counter one, two, three. 56
and so. There is no downlink for the moment. 57
Since I haven't transmitted anything from my application server. 58
But that's what I'm going to do now. 59
For that, all of Lorawan server offer a downlink messaging to. We need to go to the messaging tab and 60
downlink tab. 61
With this tool, you can choose the application port number called export. 62
And there is another field with the value you want to send called payload. For the port number and the 63
payload. 64
We can choose any value right now. 65
So let's choose, for example, Fport is equal to 20, this is a decimal value and a payload of AA. 66
This is a negative symbol value. 67
Then it discard all downlink. 68
bytes. 69
On the end device, 70
do we see any data coming from the network server? 71
Of course not, because we know that we have to send if we want to receive data. 72
Moreover, on the server we can see that a new downlink has been scheduled ready to be sounds. 73
So I just hit the end device push button to launch a new uplink. 74
And right after I get my downlink, I can check the right value and the right port. 75
I can also see that this downlink has been received on the RX1 window. 76
It could have been either RX1 or RX2, but it's up to the network server to choose and there is nothing 77
I can do about it. 78
Okay. 79
Now I'm wondering how the downlink message can find its way through the network. 80
In other words, how the network server knew that my device was under these gateway coverage. 81
Because you can imagine that this downlink message hasn't been broadcasted on all gateway on earth 82
fortunately. The answer is that the network server simply choose the gateway used during the uplink, 83
and if there were several then the network server would choose the one with the best RSSI during the 84
uplink reception. That will increase the chance of receiving. 85
Let's try another downlink frame. 86
I hit the end device push button and here we go. 87
It's here. 88
I can check the gateway used for my uplink. 89
That's this one. 90
And I can take the gateway during the downlink. 91
It's indeed the same one. 92
So we are done with this demonstration with Class A end device, and in the next video we'll see what 93
happens for the Class C.