Last modified by Xiaoling on 2023/04/20 18:14
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,19 +1,14 @@ 1 - **Contents:**1 + 2 2 3 - {{toc/}}3 += Introduction = 4 4 5 - 6 -= 1. Introduction = 7 - 8 8 The Dragino LoRaWAN gateway can commuicate with LoRaWAN ABP End Node without the need of LoRaWAN server. It can be used in some cases such as: 9 9 10 10 * No internet connection. 11 11 * User wants to get data forward in gateway and forward to their server base on MQTT/HTTP, etc. (Combine ABP communication method and [[MQTT forward together>>url:https://wiki.dragino.com/index.php/MQTT_Forward_Instruction]]). 12 12 13 -((( 14 14 15 15 The basic of this feature is the decoding of LoRaWAN ABP End Node. Requirements: 16 -))) 17 17 18 18 1. LoRaWAN End Node in ABP mode. Make sure your end node works in this mode. End node most are default set to OTAA mode 19 19 1. LoRaWAN Gateway model: [[LPS8>>url:http://www.dragino.com/products/lora-lorawan-gateway/item/148-lps8.html]], [[LG308>>url:http://www.dragino.com/products/lora-lorawan-gateway/item/140-lg308.html]], [[DLOS8>>url:http://www.dragino.com/products/lora-lorawan-gateway/item/160-dlos8.html]] ,[[LIG16>>url:http://www.dragino.com/products/lora-lorawan-gateway/item/171-lig16.html]] ... ... @@ -20,11 +20,14 @@ 20 20 1. Firmware version for below instruction:[[Since LG02_LG08~~-~~-build-v5.4.1593400722-20200629-1120>>url:http://www.dragino.com/downloads/index.php?dir=LoRa_Gateway/LPS8/Firmware/Release/]] 21 21 22 22 23 -= 2.How it works =18 += How it works = 24 24 25 25 26 -Video Instruction: [[https:~~/~~/youtu.be/ZBjXwmp7rwM>>url:https://youtu.be/ZBjXwmp7rwM]] 21 +\\Video Instruction: [[https:~~/~~/youtu.be/ZBjXwmp7rwM>>url:https://youtu.be/ZBjXwmp7rwM]] 27 27 23 + 24 +\\ 25 + 28 28 Assume we have the LoRaWAN tracker LGT92 which works in ABP mode and US915 band. It has below keys: 29 29 30 30 {{{AT+NWKSKEY=72 32 63 95 dd 8f e2 b2 13 66 e4 35 93 8f 55 df ... ... @@ -36,18 +36,18 @@ 36 36 37 37 We need to input above keys in LG308 and enable ABP decryption. 38 38 39 -[[image:https://wiki.dragino.com/images/thumb/5/55/LG308_MQTT_1.png/600px-LG308_MQTT_1.png||height="329" width="600"]] 37 +[[~[~[image:https://wiki.dragino.com/images/thumb/5/55/LG308_MQTT_1.png/600px-LG308_MQTT_1.png~|~|height="329" width="600"~]~]>>url:https://wiki.dragino.com/index.php/File:LG308_MQTT_1.png]] 40 40 41 41 Input the ABP keys in LG308 42 42 43 43 44 -== 2.1Upstream ==42 +== Upstream == 45 45 46 46 Now when this End Node (Dev Addr=2602111D) send a uplink packet. When this packet arrive LG308, LG308 will decode it and put the decode data on the file /var/iot/channels/2602111D . So we have this data for further process with other applications in LG308. 47 47 48 48 We can see the log of LG308 to know this packet arrive 49 49 50 -[[image:https://wiki.dragino.com/images/thumb/1/16/ABP_DECODE_2.png/600px-ABP_DECODE_2.png||height="205" width="600"]] 48 +[[~[~[image:https://wiki.dragino.com/images/thumb/1/16/ABP_DECODE_2.png/600px-ABP_DECODE_2.png~|~|height="205" width="600"~]~]>>url:https://wiki.dragino.com/index.php/File:ABP_DECODE_2.png]] 51 51 52 52 LG308 log by "logread -f" command 53 53 ... ... @@ -76,7 +76,7 @@ 76 76 {{{Notice 2: The upstream payload length should match the LoRaWAN length requirement (max length depends on Frequency and DR), otherwise the gateway can't decode the payload. 77 77 }}} 78 78 79 -=== 2.2.1Decode Method ===77 +=== Decode Method === 80 80 81 81 The decode methods: ASCII String, Decode_LHT65 doesn't affect how the sensor data is stored, they are to define how should the sensor data to be sent. 82 82 ... ... @@ -106,7 +106,7 @@ 106 106 Above scripts are store in /etc/lora/decoder/. User can put their scripts here and select it in the UI. 107 107 108 108 109 -=== 2.2.2How to Decode My End Node ===107 +=== How to Decode My End Node === 110 110 111 111 1/ Configure the ABP keys for your end node in the gateway. enable ABP decode in Web UI 112 112 ... ... @@ -128,8 +128,9 @@ 128 128 * the last line return is what will be used for MQTT 129 129 * User can use other language ,not limited to Lua, just make sure the return is what you want to send. 130 130 131 -== 2.2 Downstream == 132 132 130 +== Downstream == 131 + 133 133 In LG308, we can create a file in the directory /var/iot/push for downstream purpose. We recommend using each command to generate this file. This file will be used for transmission and auto-deleted after used 134 134 135 135 The file should use below format: ... ... @@ -222,7 +222,7 @@ 222 222 2:3132333435363738 --> ASCII string "12345678" 223 223 }}} 224 224 225 -= 3.Example 1: Communicate with LT-22222-L =224 += Example 1: Communicate with LT-22222-L = 226 226 227 227 Script can be download from: [[Example Script 1>>url:http://www.dragino.com/downloads/index.php?dir=LoRa_Gateway/LPS8/Firmware/customized_script/&file=talk_to_lt-22222-l_v0.1.sh]] 228 228 ... ... @@ -263,7 +263,7 @@ 263 263 264 264 ~1. Input keys 265 265 266 -[[image:https://wiki.dragino.com/images/thumb/b/bf/LPS8_LT-22222_1.png/600px-LPS8_LT-22222_1.png||height="335" width="600"]] 265 +[[~[~[image:https://wiki.dragino.com/images/thumb/b/bf/LPS8_LT-22222_1.png/600px-LPS8_LT-22222_1.png~|~|height="335" width="600"~]~]>>url:https://wiki.dragino.com/index.php/File:LPS8_LT-22222_1.png]] 267 267 268 268 Input Keys in LPS8 269 269 ... ... @@ -271,26 +271,26 @@ 271 271 272 272 3. Choose Built-in server 273 273 274 -[[image:https://wiki.dragino.com/images/thumb/d/d7/LPS8_LT-22222_2.png/600px-LPS8_LT-22222_2.png||height="264" width="600"]] 273 +[[~[~[image:https://wiki.dragino.com/images/thumb/d/d7/LPS8_LT-22222_2.png/600px-LPS8_LT-22222_2.png~|~|height="264" width="600"~]~]>>url:https://wiki.dragino.com/index.php/File:LPS8_LT-22222_2.png]] 275 275 276 276 Choose Built-in server 277 277 278 278 4. Run the script. 279 279 280 -[[image:https://wiki.dragino.com/images/thumb/3/39/LPS8_LT-22222_3.png/600px-LPS8_LT-22222_3.png||height="389" width="600"]] 279 +[[~[~[image:https://wiki.dragino.com/images/thumb/3/39/LPS8_LT-22222_3.png/600px-LPS8_LT-22222_3.png~|~|height="389" width="600"~]~]>>url:https://wiki.dragino.com/index.php/File:LPS8_LT-22222_3.png]] 281 281 282 282 Run the script 283 283 284 284 5. Output: 285 285 286 -[[image:https://wiki.dragino.com/images/thumb/f/fe/LPS8_LT-22222_4.png/600px-LPS8_LT-22222_4.png||height="433" width="600"]] 285 +[[~[~[image:https://wiki.dragino.com/images/thumb/f/fe/LPS8_LT-22222_4.png/600px-LPS8_LT-22222_4.png~|~|height="433" width="600"~]~]>>url:https://wiki.dragino.com/index.php/File:LPS8_LT-22222_4.png]] 287 287 288 288 Output from LPS8 289 289 290 290 291 -= 4.Example 2: Communicate to TCP Server =290 += Example 2: Communicate to TCP Server = 292 292 293 -[[image:https://wiki.dragino.com/images/thumb/7/75/LPS8_TCP_0.png/600px-LPS8_TCP_0.png||height="370" width="600"]] 292 +[[~[~[image:https://wiki.dragino.com/images/thumb/7/75/LPS8_TCP_0.png/600px-LPS8_TCP_0.png~|~|height="370" width="600"~]~]>>url:https://wiki.dragino.com/index.php/File:LPS8_TCP_0.png]] 294 294 295 295 Network Structure 296 296 ... ... @@ -305,13 +305,13 @@ 305 305 306 306 Assume we already set up ABP keys in the gateway: 307 307 308 -[[image:https://wiki.dragino.com/images/thumb/b/bf/LPS8_LT-22222_1.png/600px-LPS8_LT-22222_1.png||height="335" width="600"]] 307 +[[~[~[image:https://wiki.dragino.com/images/thumb/b/bf/LPS8_LT-22222_1.png/600px-LPS8_LT-22222_1.png~|~|height="335" width="600"~]~]>>url:https://wiki.dragino.com/index.php/File:LPS8_LT-22222_1.png]] 309 309 310 310 Input Keys in LPS8 311 311 312 312 run socket tool in PC 313 313 314 -[[image:https://wiki.dragino.com/images/thumb/4/4b/LPS8_TCP_2.png/600px-LPS8_TCP_2.png||height="212" width="600"]] 313 +[[~[~[image:https://wiki.dragino.com/images/thumb/4/4b/LPS8_TCP_2.png/600px-LPS8_TCP_2.png~|~|height="212" width="600"~]~]>>url:https://wiki.dragino.com/index.php/File:LPS8_TCP_2.png]] 315 315 316 316 Socket tool 317 317 ... ... @@ -318,7 +318,7 @@ 318 318 319 319 Input Server address and port 320 320 321 -[[image:https://wiki.dragino.com/images/thumb/c/c6/LPS8_TCP_3.png/600px-LPS8_TCP_3.png||height="306" width="600"]] 320 +[[~[~[image:https://wiki.dragino.com/images/thumb/c/c6/LPS8_TCP_3.png/600px-LPS8_TCP_3.png~|~|height="306" width="600"~]~]>>url:https://wiki.dragino.com/index.php/File:LPS8_TCP_3.png]] 322 322 323 323 Input Server address and port 324 324 ... ... @@ -325,7 +325,7 @@ 325 325 326 326 See value receive in socket tool. : 327 327 328 -[[image:https://wiki.dragino.com/images/thumb/2/20/LPS8_TCP_4.png/600px-LPS8_TCP_4.png||height="219" width="600"]] 327 +[[~[~[image:https://wiki.dragino.com/images/thumb/2/20/LPS8_TCP_4.png/600px-LPS8_TCP_4.png~|~|height="219" width="600"~]~]>>url:https://wiki.dragino.com/index.php/File:LPS8_TCP_4.png]] 329 329 330 330 value receive in socket tool 331 331