Changes for page How to send none encryption LoRaWAN Packet
Last modified by Xiaoling on 2023/04/19 17:49
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 4 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,32 +1,76 @@ 1 -{{box cssClass="floatinginfobox" title="**Contents**"}} 1 + **Contents: ** 2 + 2 2 {{toc/}} 3 -{{/box}} 4 4 5 -= Paragraph1 =5 += 1. Introduce = 6 6 7 - Loremipsumdolorsitamet,consecteturadipiscingelit,sed doeiusmod temporincididunt ut laboreet doloremagna aliqua.Utenim ad minimveniam,quisnostrudexercitationullamcolaborisnisiut aliquipex eaommodo consequat.Duisauteiruredolorinreprehenderitinvoluptatevelitesse cillum dolore eu fugiatnulla pariatur.Excepteursintoccaecatcupidatat nonproident,sunt in culpa quiofficiadeseruntmollitanim idestlaborum.7 +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. 8 8 9 - == Sub-paragraph ==9 +[[image:image-20220527085838-1.png]] 10 10 11 - Lorem ipsum dolor sit amet, consecteturadipiscing elit,sed do eiusmodtemporincididunt ut labore et doloremagna aliqua. Ut enim ad minim veniam, quis nostrudexercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eufugiat nulla pariatur. Excepteur sint occaecat cupidatatnon proident, sunt in culpa qui officia deserunt mollit animid est laborum.11 +Unencrypt Network modified from LoRaWAN 12 12 13 -== Sub-paragraph == 14 14 15 - Loremipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Ut enimad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquipexea commodo consequat. Duis aute irure dolor in reprehenderitin voluptatevelit esse cillum dolore eu fugiat nullapariatur. Excepteursint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.14 += 2. Analyze the LoRaWAN packet = 16 16 17 - ===Sub-subparagraph===16 +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. 18 18 19 - Loremipsumdolor sitamet, consectetur adipiscinglit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Utenim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.18 +[[image:image-20220527090005-2.png]] 20 20 20 +UDP Server 21 21 22 -= Paragraph 2 = 23 23 24 - Loremipsum dolor sit amet,consecteturadipiscingelit,sed doeiusmod tempor incididunt ut laboreet doloremagna aliqua. Utnimad minim veniam, quis nostrud exercitationullamco laboris nisi ut aliquipex eaommodo consequat.Duisaute irure dolor inreprehenderitinvoluptate velitessecillum dolore eu fugiatnulla pariatur.Excepteursint occaecat cupidatat non proident, sunt in culpa quiofficia deserunt mollit anim id est laborum.23 +We can get one of the LoRaWAN packet and analyze it. See below 25 25 26 - == Sub-paragraph ==25 +[[image:image-20220527090050-3.png]] 27 27 28 - Lorem ipsum dolor sit amet, consecteturadipiscing elit, seddo eiusmodtempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderitin voluptate velit esse cillumdolore eu fugiatnullapariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.27 +Analyze the data 29 29 30 -== Sub-paragraph == 31 31 32 -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 30 +((( 31 +From above screen shot, we can see most of the meaning except this** (% style="color:#4F81BD" %)"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/]]. 32 +))) 33 + 34 + 35 +((( 36 +Below is an example, from 37 +))) 38 + 39 +[[image:image-20220527090122-4.png]] 40 + 41 +Decode the packet 42 + 43 += 3. Difference between OTAA and ABP mode = 44 + 45 +There are two mode for End Node: 46 + 47 +* 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. 48 +* 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. 49 + 50 += 4. Get and decode the packet = 51 + 52 +According to above, it is possible to get the payload from sensor without LoRaWAN server: 53 + 54 +1. Setting the end node to ABP mode 55 +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]] 56 + 57 += 5. Use an unencrypt firmware = 58 + 59 +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. 60 + 61 +((( 62 +The software will disable encryption, so the LoRaWAN payload raw "data":"QHxqASaAygwCXrumS1oFsgRq" will looks like "data":"4068370126000000000c9e11223361898841", and the meaning is as below: 63 +))) 64 + 65 +[[image:https://wiki.dragino.com/images/thumb/d/d6/None_Encryption_4.png/600px-None_Encryption_4.png||height="70" width="600"]] 66 + 67 +Unencrypt packet 68 + 69 + 70 += 6. limitation = 71 + 72 +* None standard LoRaWAN protocol, it is not compatible with LoRaWAN server. 73 +* No device management / ADR management defined in LoRaWAN protocol 74 +* No security. 75 +* No Downlink 76 +* Only use for ABP
- 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