The first activation method is called Activation By Personalization (ABP). 1
I repeat once again the purpose of the activation process, which is to have on both sides the same 2
network session key, the same application session key and the same device address. 3
The process is very easy and we can do that in two ways. 4
If the device is already provisioned with the keys and device address, then you just have to register 5
a new ABP device with the same information on the LoRaWAN server. 6
Then it's done. 7
Nothing more. 8
Once you've done this, the end device will start transmitting as soon as it powers up. 9
But you can also do the same process the other way around. 10
This time we start a process on the LoRaWAN server. 11
We register a new ABP device. 12
Then we generate a new set of session keys and a new device address. 13
Then we take these generated information and save them into the end device. 14
For this operation, we have to be able to update the end device firmware so you can do this way 15
only if you can program your end device or at least personalize it with a cellular link. 16
For example, if you have another ABP device to register, then you can do exactly the same process 17
and generate a new set of keys and a new device address. 18
For this demonstration, we'll register a new ABP end device on TTAnetwork server. 19
But the step to register 20
an end device, 21
should be the same for any other LoraWAN server. 22
We'll see later the other functionalities of this server. 23
But for the moment, I will only focus on the registration process and activation process. 24
I n the device section, 25
I will register a new ABP end device. Even if this device is part of the TTA repository, 26
I will register it manually to show you all the steps. 27
Anyway, there will be a specific video about the registration process and the LoRaWAN server, so 28
don't worry too much about that. 29
So in our case, I choose the European 868 MHz frequency band. 30
I choose the right LoRaWAN version of my end device. 31
In my case, it's 1.0.3. 32
And in this subsection, I select the right activation mode. 33
For this demonstration, we're dealing with ABP. 34
Okay, now I still have to fill out the LoRaWAN information. 35
And first the server ask for the devEUI. 36
This devEUI information is not always compulsory for ABP activation, but still is better to use 37
it because it's a good way to identify an end device on your server. 38
But if you don't want to use it, then leave it empty. 39
In my case, I use the one written on my end device. 40
Then comes the specific LoRaWAN information that we always need. 41
Device address that I can generate, application session key (AppSKey) and network session key (NwkSKey) that I can generate as 42
well. 43
Then finally, I can give the device a name to personalize it. 44
In my case, I will call it device1-abp. 45
These two keys are the secret keys that must never be revealed to anyone. 46
Obviously you can see mine for this demonstration because I will delete it afterwards. 47
But otherwise, if for some reason these keys are exposed, then the security is compromised. 48
So it's this risk parameters that I will have to configure in the end device, and that's what I'm going 49
to do now. 50
My lorawan end device can be configured from a specific head of file, and the first thing I need to do 51
is to choose the application behavior. 52
So for this demonstration, I will use ABP activation mode and I will send a temperature every 10 53
seconds. 54
That's it. 55
You don't have to worry about the other settings for the moment. 56
Now let's copy the lorawan parameters. 57
So, devAddr_ (dev adress) 58
Network session key (nwkSKey), 59
An application session key (appSKey). 60
There we go. 61
Now I compiled the project and Isend it to my device. 62
And finally I can power it up and my applications is now sending the temperature every 10 seconds. On the left, 63
I've got my device log and I can see that it transmitted 64
the temperature right after the start.That is normal because the end device already has all the session 65
keys to transfer its data. 66
That is what we did previously, and that's exactly what ABP activation is. 67
And on the right in the live data console, I can see the uplink packet. 68
If you can see them there, that means that the packet has been authenticated. 69
That is you using the right network session key. 70
And if the temperature is correct, that means that you're using the right application session key. That prove that 71
the overall ABP activation was successful. 72
If you want, you can try a little experiment. 73
Change one byte of your application session key. 74
Either on your server, or your own device, you will see the lLoRaWAN packet on your server, but the 75
value received will be wrong. 76
And you can also try to change one byte of your network session key. 77
You will see your packet into your gateway log, but you won't see it in your application log. 78
That's because the LoRaWAN packet won't be authenticated.