Show last authors
1 **Contents: **
2
3 {{toc/}}
4
5
6
7 = 1. Introduce =
8
9 A standard LoRaWAN packet via UDP packet forward to LoRaWAN server is AES128 encryption. In this chapter, we will show how this packet looks like in the server and see the possibility to get the content of this packet.
10
11 [[image:image-20220527085838-1.png]]
12
13 Unencrypt Network modified from LoRaWAN
14
15
16 = 2. Analyze the LoRaWAN packet =
17
18 If the gateway is connected to LoRaWAN server via UDP packet fordward. We can set the server address to a UDP server to get the LoRaWAN packets.
19
20 [[image:image-20220527090005-2.png]]
21
22 UDP Server
23
24
25 We can get one of the LoRaWAN packet and analyze it. See below
26
27 [[image:image-20220527090050-3.png]]
28
29 Analyze the data
30
31
32 (((
33 From above screen shot, we can see most of the meaning except this** (% style="color:#4f81bd" %)"data":"QHxqASaAygwCXrumS1oFsgRq"(%%)**(% style="color:#4f81bd" %).(%%) This is the AES128 encryption data we mention above, it is base64 format. To decode this data, we need to have the** (% style="color:#4f81bd" %)APP Session Key(%%)**(% style="color:#4f81bd" %) (%%)and (% style="color:#4f81bd" %)**Network Session Key**(%%) of this end node. If we have these two keys, we are able to decode this packet by some LoRaWAN decode website like: [[LoRaWAN Decode Website>>url:https://lorawan-packet-decoder-0ta6puiniaut.runkit.sh/]].
34 )))
35
36
37 (((
38 Below is an example, from
39 )))
40
41 [[image:image-20220527090122-4.png]]
42
43 Decode the packet
44
45
46 = 3. Difference between OTAA and ABP mode =
47
48 There are two mode for End Node:
49
50 * OTAA: Over the air activation. In this mode, the end node will send a Join Request to server, server will reply with a Join Accept and the end node will parse this Join Accept message to get the Dev Addr / APP Session Key(AppSkey / Network Session Key(NwkSKey). Because the AppSkey and NwkSkey is dynamic, OTAA mode provide more security.
51 * ABP: Activation by personalization. There is no hand-shake with LoRaWAN server for activition. The end node will use fix Dev Addr / APP Session Key(AppSkey / Network Session Key(NwkSKey) to upload the packet. So the packet can be decode if someone know these fix keys.
52
53
54 = 4. Get and decode the packet =
55
56 According to above, it is possible to get the payload from sensor without LoRaWAN server:
57
58 1. Setting the end node to ABP mode
59 1. Add decode program and add the keys of the sensor. So to get the payload. There is an example for such application, see [[Communication with ABP End Node>>doc:Main.Communicate with ABP End Node without LoRaWAN Network Server --- LG308.WebHome]]
60
61
62 = 5. Use an unencrypt firmware =
63
64 If user doesn't care about the security of the data and use Dragino end node, it is possible that we provide a firmware without AES128 encrytion, so the server no need to decode packet. Please note this software is no LoRaWAN compatible and no security.
65
66 (((
67 The software will disable encryption, so the LoRaWAN payload raw** (% style="color:#4f81bd" %)"data":"QHxqASaAygwCXrumS1oFsgRq"(%%)** will looks like (% style="color:#4f81bd" %)**"data":"4068370126000000000c9e11223361898841"**(%%), and the meaning is as below:
68 )))
69
70 [[image:image-20220527090341-5.png]]
71
72 Unencrypt packet
73
74
75 = 6. limitation =
76
77 * None standard LoRaWAN protocol, it is not compatible with LoRaWAN server.
78 * No device management / ADR management defined in LoRaWAN protocol
79 * No security.
80 * No Downlink
81 * Only use for ABP
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0