Changes for page How to send none encryption LoRaWAN Packet
Last modified by Xiaoling on 2023/04/19 17:49
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 5 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,16 +1,26 @@ 1 + **Table of** **Contents: ** 2 + 3 +{{toc/}} 4 + 5 + 6 + 1 1 = 1. Introduce = 2 2 9 + 3 3 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. 4 4 5 -[[image:https://wiki.dragino.com/images/thumb/3/36/Unencrypt_Network_3.png/600px-Unencrypt_Network_3.png||height="476" width="600"]] 6 6 13 +[[image:image-20220527085838-1.png]] 14 + 7 7 Unencrypt Network modified from LoRaWAN 8 8 17 + 9 9 = 2. Analyze the LoRaWAN packet = 10 10 20 + 11 11 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. 12 12 13 -[[image: https://wiki.dragino.com/images/thumb/5/57/None_Encryption_1.png/600px-None_Encryption_1.png||height="259" width="600"]]23 +[[image:image-20220527090005-2.png]] 14 14 15 15 UDP Server 16 16 ... ... @@ -17,48 +17,66 @@ 17 17 18 18 We can get one of the LoRaWAN packet and analyze it. See below 19 19 20 -[[image: https://wiki.dragino.com/images/thumb/b/b9/None_Encryption_2.png/600px-None_Encryption_2.png||height="497" width="600"]]30 +[[image:image-20220527090050-3.png]] 21 21 22 22 Analyze the data 23 23 24 -From above screen shot, we can see most of the meaning except this "data":"QHxqASaAygwCXrumS1oFsgRq". This is the AES128 encryption data we mention above, it is base64 format. To decode this data, we need to have the APP Session Key and 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/]]. 25 25 35 +((( 36 +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/]]. 37 +))) 26 26 39 + 40 +((( 27 27 Below is an example, from 42 +))) 28 28 29 -[[image: https://wiki.dragino.com/images/thumb/4/4c/None_Encryption_3.png/600px-None_Encryption_3.png||height="388" width="600"]]44 +[[image:image-20220527090122-4.png]] 30 30 31 31 Decode the packet 32 32 48 + 49 + 33 33 = 3. Difference between OTAA and ABP mode = 34 34 52 + 35 35 There are two mode for End Node: 36 36 37 37 * 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. 38 -* 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 .56 +* 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 39 39 40 40 59 + 60 + 41 41 = 4. Get and decode the packet = 42 42 63 + 43 43 According to above, it is possible to get the payload from sensor without LoRaWAN server: 44 44 45 45 1. Setting the end node to ABP mode 46 -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>> url:https://wiki.dragino.com/index.php/Communication_with_ABP_End_Node]]67 +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>>Communicate with ABP End Node without LoRaWAN Network Server --- LG308]] 47 47 48 48 70 + 71 + 49 49 = 5. Use an unencrypt firmware = 50 50 74 + 51 51 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. 52 52 53 -The software will disable encryption, so the LoRaWAN payload raw "data":"QHxqASaAygwCXrumS1oFsgRq" will looks like "data":"4068370126000000000c9e11223361898841", and the meaning is as below: 77 +((( 78 +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: 79 +))) 54 54 55 -[[image: https://wiki.dragino.com/images/thumb/d/d6/None_Encryption_4.png/600px-None_Encryption_4.png||height="70" width="600"]]81 +[[image:image-20220527090341-5.png]] 56 56 57 57 Unencrypt packet 58 58 59 59 86 + 60 60 = 6. limitation = 61 61 89 + 62 62 * None standard LoRaWAN protocol, it is not compatible with LoRaWAN server. 63 63 * No device management / ADR management defined in LoRaWAN protocol 64 64 * No security.
- image-20220527085838-1.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +146.1 KB - Content
- image-20220527090005-2.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +75.2 KB - Content
- image-20220527090050-3.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +107.8 KB - Content
- image-20220527090122-4.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +220.7 KB - Content
- image-20220527090341-5.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +31.8 KB - Content