<
From version < 108.5 >
edited by Xiaoling
on 2022/07/23 13:54
To version < 128.1 >
edited by Kilight Cao
on 2022/12/22 14:15
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Xiaoling
1 +XWiki.Kilight
Content
... ... @@ -53,7 +53,7 @@
53 53  )))
54 54  
55 55  
56 -If the user cannot add network-Servers, re-check the ChirpStack code or the server building process.
56 +(% style="color:red" %)**If the user cannot add network-Servers, re-check the ChirpStack code or the server building process.**
57 57  
58 58  
59 59  [[image:image-20220531171609-1.png]]
... ... @@ -62,15 +62,18 @@
62 62  
63 63  
64 64  
65 -== 2.2 Step 2. Create Gateway-profiles ==
65 +== 2.2  Step 2. Create Gateway-profiles ==
66 66  
67 +
67 67  [[image:image-20220531171651-2.png]]
68 68  
69 69  Create Gateway-profiles
70 70  
71 71  
72 -== 2.3 Step 3. Create Service-profiles ==
73 73  
74 +== 2.3  Step 3. Create Service-profiles ==
75 +
76 +
74 74  [[image:image-20220531171809-3.png]]
75 75  
76 76  Create Service-profiles
... ... @@ -83,29 +83,37 @@
83 83  If the user has completed the preceding steps, proceed to the next step.(% style="display:none" %)
84 84  
85 85  
86 -== 2.4 Step 4. Add the gateway ==
87 87  
90 +== 2.4  Step 4. Add the gateway ==
91 +
92 +
88 88  The example gateway id is: a840411e96744150
89 89  
90 90  (((
91 91  (% style="color:red" %)**Note : The Gateway EUI and server addresses must match the ChirpStack configuration.**
97 +
98 +
92 92  )))
93 93  
94 94  [[image:image-20220531171923-4.png]](% style="display:none" %)
95 95  
96 -
97 97  Add the gateway
98 98  
105 +
106 +
99 99  [[image:image-20220531172031-5.png]]
100 100  
101 101  Configure the gateway
102 102  
103 103  
104 -== 2.5 Step 5. Checking gateway Status ==
105 105  
113 +== 2.5  Step 5. Checking gateway Status ==
114 +
115 +
106 106  [[image:image-20220531172158-6.png]](% style="display:none" %)
107 107  
108 108  
119 +
109 109  gateway Status
110 110  
111 111  [[image:image-20220531172304-7.png]]
... ... @@ -113,39 +113,46 @@
113 113  gateway Status
114 114  
115 115  
116 -= 3. Gateway Registration for Basics Station =
117 117  
118 -== 3.1 Introduction ==
128 += 3.  Gateway Registration for Basics Station =
119 119  
130 +== 3.1  Introduction ==
131 +
132 +
120 120  The [[Semtech Basic Station>>url:https://doc.sm.tc/station/]] backend implements the [[LNS protocol>>url:https://doc.sm.tc/station/tcproto.html]]. It exposes a WebSocket handler to which Basic Station powered gateways can connect.
121 121  
122 122  ChirpStack Open-Source LoRaWAN® Network Server needs to set up a configuration that can use Semtech BasicStation.
123 123  
124 -**Below list the support products and Requirements:**
125 125  
138 +(% style="color:blue" %)**Below list the support products and Requirements:**
139 +
126 126  1. LoRaWAN Gateway model: [[LIG16>>url:http://www.dragino.com/products/lora-lorawan-gateway/item/171-lig16.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]] ,[[LPS8>>url:http://www.dragino.com/products/lora-lorawan-gateway/item/148-lps8.html]]
127 127  1. Firmware version since :[[lgw~~-~~-build-v5.4.1651822913>>url:https://www.dragino.com/downloads/index.php?dir=LoRa_Gateway/LPS8/Firmware/Test_Firmware/lgw--build-v5.4.1651822913-20220506-1543/]]
128 128  
129 -**How to set up chirpStack Basic Station**
143 +(% style="color:blue" %)**How to set up chirpStack Basic Station**
130 130  
131 131  Users can check out the ChirpStack Basic Station [[link>>https://www.chirpstack.io/gateway-bridge/backends/basic-station/]] and [[forum>>https://forum.chirpstack.io/search?q=basic%20station]]
132 132  
133 -**What do you need to prepare**
134 134  
148 +(% style="color:blue" %)**What do you need to prepare**
149 +
135 135  A gateway that can access the internet normally
136 136  
137 137  
138 -== 3.2 Add Gateway ==
153 +== 3.2  Add Gateway ==
139 139  
155 +
140 140  [[image:image-20220524164205-10.png]]
141 141  
142 142  
143 -== 3.3 Access the gateway GUI ==
159 +== 3.3  Access the gateway GUI ==
144 144  
161 +
145 145  Access the gateway GUI interface of LoRaWAN~-~->LoRaWAN ~-~- Basic Station
146 146  
147 147  [[image:image-20220524164319-11.png]]
148 148  
166 +
149 149  User need to Choose the ChirpStack/Senet ~-~- Basic Station , input Server URI and Upload the TLS Certificate
150 150  
151 151  (% class="box" %)
... ... @@ -161,20 +161,23 @@
161 161  [[image:image-20220524164341-12.png]]
162 162  
163 163  
164 -== 3.4 Start Station ==
182 +== 3.4  Start Station ==
165 165  
166 -When the user has finished the configuration, Please click Sace&Apply to start station to connect ChirpStack
167 167  
185 +When the user has finished the configuration, Please click **Sace&Apply** to start station to connect ChirpStack.
168 168  
169 -== 3.5 Successful Connection ==
170 170  
188 +== 3.5  Successful Connection ==
189 +
190 +
171 171  If user completes the above steps, which will see live date in the ChirpStack.
172 172  
173 173  [[image:image-20220524164448-13.png]]
174 174  
175 175  
176 -== 3.6 Trouble Shooting ==
196 +== 3.6  Trouble Shooting ==
177 177  
198 +
178 178  User can check the station log in the logread/system log page.
179 179  
180 180  [[image:image-20220531172837-8.png]]
... ... @@ -185,31 +185,129 @@
185 185  [[image:image-20220531172857-9.png]]
186 186  
187 187  
188 -= 4. Downlink =
209 += 4. How the gateway connects to Chirpstack v4 via gateway-bridge =
189 189  
190 -== 4.1 Chirpstack Downlink Note ==
191 191  
212 +(% style="color:blue" %)**Below list the support products and Requirements:**
213 +
214 +1. LoRaWAN Gateway model: [[LIG16>>url:http://www.dragino.com/products/lora-lorawan-gateway/item/171-lig16.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]] ,[[LPS8>>url:http://www.dragino.com/products/lora-lorawan-gateway/item/148-lps8.html]],[[LPS8N>>url:https://www.dragino.com/products/lora-lorawan-gateway/item/200-lps8n.html]],[[LG308N>>url:https://www.dragino.com/products/lora-lorawan-gateway/item/229-lg308n.html]],[[DLOS8N>>url:https://www.dragino.com/products/lora-lorawan-gateway/item/225-dlos8n.html]]
215 +1. Firmware version since: [[Chirpstack-gateway-bridge>>url:https://www.dragino.com/downloads/index.php?dir=LoRa_Gateway/LPS8/Firmware/Release/Chirpstack-gateway-bridge/]]
216 +
217 +(% style="color:blue" %)**How to set up chirpStack Gateway-bridge**
218 +
219 +Users can check out the ChirpStack gateway-bridge v4 [[link>>https://www.chirpstack.io/docs/chirpstack-gateway-bridge/install/dragino.html]]
220 +
221 +
222 +(% style="color:blue" %)**What do you need to prepare**
223 +
224 +A gateway that can access the internet normally
225 +
226 +== 4.1 Configure Packet Forwarder ==
227 +
228 +In the Dragino gateway web interface, you need to configure the Packet Forwarder so that it forwards its data to the port. localhost:1700 or 127.0.0.1:1700
229 +
230 +* In the **LoRaWAN** menu, click on **LoRaWAN ~-~- Semtech UDP**
231 +* Make sure the following settings are set:
232 +** **Service Provider:** //~-~-Custom/Private LoRaWAN~-~-//
233 +** **LoRaWAN Server Address:** //localhost or 127.0.0.1//
234 +** **Server port for upstream:** //1700//
235 +** **Server port for downstream:** //1700//
236 +
237 + Click **Save & Apply**.
238 +
239 +[[image:image-20221222114220-2.png||height="748" width="931"]]
240 +
241 +
242 +== 4.2 Configuring gateway frequency ==
243 +
244 +Note: Gateway frequencies must match
245 +
246 +[[image:image-20221222134830-3.png||height="408" width="923"]]
247 +
248 +
249 +== 4.3 Modify the gateway-bridge configuration file ==
250 +
251 +
252 +Run the gateway command line command to modify the gateway-bridge configuration file:
253 +
254 +(% class="box infomessage" %)
255 +(((
256 +root@dragino-1d27d4:~~#  vim /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
257 +)))
258 +
259 +[[image:image-20221222113302-1.png]]
260 +
261 +[[image:image-20221222140203-4.png||height="875" width="806"]]
262 +
263 +
264 +(% class="wikigeneratedid" id="H" %)
265 +After the modification, run the following command: **/etc/init.d/chirpstack-gateway-bridge restart**
266 +
267 +== 4.3 (Re)start and stop gateway-bridge ==
268 +
269 +Use the following commands to (re)start and stop the ChirpStack Gateway Bridge Service:
270 +
271 +(% class="box infomessage" %)
272 +(((
273 +**# start**
274 +
275 +/etc/init.d/chirpstack-gateway-bridge start
276 +
277 +**# stop**
278 +
279 +/etc/init.d/chirpstack-gateway-bridge stop
280 +
281 +**# restart**
282 +
283 +/etc/init.d/chirpstack-gateway-bridge restart
284 +)))
285 +
286 += 5.  Downlink =
287 +
288 +== 5.1 Convert HEX to Base64 ==
289 +
290 +
291 +(% style="color:red" %)**Note: Chirpstack uses base64 to downlink, the end node user manual provides HEX format of the downlink commands. So user needs to convert the HEX to Base64.**
292 +
293 +**[[Online HEX to Base64 Converter>>https://base64.guru/converter/encode/hex]]:**
294 +
295 +[[image:image-20221010193350-1.png]]
296 +
297 +
298 +
299 +**[[Online Base64 to Hex converter>>https://base64.guru/converter/decode/hex]]**
300 +
301 +[[image:image-20221010193621-2.png]]
302 +
303 +
304 +== 5.2  Chirpstack Downlink Note ==
305 +
306 +
192 192  [[image:image-20220601102543-2.png]]
193 193  
194 -Convert the data to Base64
309 +**Convert the data to Base64**
195 195  
311 +(% style="display:none" %) (%%)
196 196  
197 -[[image:image-20220531173236-10.png]]
198 198  
199 -Check ChripStack downlink DataRate
314 +[[image:image-20220531173236-10.png||height="597" width="1215"]]
200 200  
316 +**Check ChripStack downlink DataRate**
201 201  
318 +
319 +
202 202  [[image:image-20220525101326-11.png]]
203 203  
204 -Make sure the RX2DR is the same in the end node
322 +**Make sure the RX2DR is the same in the end node**
205 205  
206 206  
207 -== 4.2 Loraserver Downlink Note ==
325 +== 5. Loraserver Downlink Note ==
208 208  
327 +
209 209  User can use MQTT to send downlink payload to ChirpStack to perform downstream to LoRaWAN End
210 210  
211 211  (((
212 -Below is examples:
331 +**Below is examples:**
213 213  )))
214 214  
215 215  (% class="box" %)
... ... @@ -223,13 +223,14 @@
223 223  [[image:image-20220531173419-11.png]]
224 224  
225 225  (((
226 -MQTT Connect to ChirpStack
345 +**MQTT Connect to ChirpStack**
227 227  
347 +
228 228  
229 229  )))
230 230  
231 231  (((
232 -After connect
352 +**After connect**
233 233  )))
234 234  
235 235  (% class="box" %)
... ... @@ -249,22 +249,14 @@
249 249  
250 250  [[image:image-20220531173519-12.png]]
251 251  
252 -MQTT Connect to ChirpStack
372 +**MQTT Connect to ChirpStack**
253 253  
254 254  
255 -(((
256 -(% style="color:red" %)Note: Chirpstack use base64 to downlink, so need to convert the downlink payload from HEX to base64 [[https:~~/~~/base64.us/>>url:https://base64.us/]]
257 -)))
375 +**If we want to send downstream hex 030101 to end node, the BASE64 payload is AwEB**
258 258  
259 -[[image:image-20220531173601-13.png]]
260 -
261 -Choose to Use Hex for Encode
262 -
263 -
264 -If we want send downstream hex 030101 to end node, the BASE64 payload is AwEB
265 -
266 266  [[image:image-20220531173658-14.png]]
267 267  
379 +
268 268  (((
269 269  Downlink payload encode javescript code: 可以在网站上运行以下Javsscript代码:
270 270  )))
... ... @@ -282,15 +282,15 @@
282 282   {
283 283   if(sha1[n] >= 'A' && sha1[n] <= 'Z')
284 284   {
285 - ascv = sha1.charCodeAt(n) - 55;
397 + ascv = sha1.charCodeAt( n ) - 55;
286 286   }
287 287   else if(sha1[n] >= 'a' && sha1[n] <= 'z')
288 288   {
289 - ascv = sha1.charCodeAt(n) - 87;
401 + ascv = sha1.charCodeAt( n ) - 87;
290 290   }
291 291   else
292 292   {
293 - ascv = sha1.charCodeAt(n) - 48;
405 + ascv = sha1.charCodeAt( n ) - 48;
294 294   }
295 295  \\ bit_arr = (bit_arr << 4) | ascv;
296 296   bit_num += 4;
... ... @@ -327,11 +327,13 @@
327 327  )))
328 328  
329 329  
330 -== 4.3 Add the decode function in Chirpstack for the payload ==
331 331  
443 +== 4.3  Add the decode function in Chirpstack for the payload ==
444 +
445 +
332 332  User enters the payload code according to the steps.
333 333  
334 -[[image:image-20220531173754-15.png]]
448 +[[image:image-20220531173754-15.png||height="474" width="1334"]]
335 335  
336 336  
337 337  [[image:image-20220531173856-16.png]]
... ... @@ -342,8 +342,9 @@
342 342  [[image:image-20220531174046-19.png]]
343 343  
344 344  
345 -= 5. Multiply Uplink in ChirpStack =
459 += 6.  Multiply Uplink in ChirpStack =
346 346  
461 +
347 347  (((
348 348  nbtrans field is the value to determine the re-transmission time for unconfirmed uplink data.
349 349  )))
... ... @@ -350,12 +350,17 @@
350 350  
351 351  (((
352 352  ChirpStack will auto adjust nbtrans according to uplink rssi. [[link to source>>url:https://github.com/brocaar/chirpstack-network-server/blob/master/internal/adr/adr.go]]
468 +
469 +
353 353  )))
354 354  
355 -[[image:image-20220526091912-7.png]]
472 +[[image:image-20220526091912-7.png||height="241" width="1336"]]
356 356  
474 +
357 357  (((
358 358  nbtrans is a field of ADR message, in unconfirm mode, it tells end node how many time it needs to transmit for every frame.
477 +
478 +
359 359  )))
360 360  
361 361  [[image:image-20220525104359-21.png]]
... ... @@ -362,6 +362,8 @@
362 362  
363 363  (((
364 364  Above behaviour will cause the platform shows below two cases of error:
485 +
486 +
365 365  )))
366 366  
367 367  (((
... ... @@ -371,29 +371,36 @@
371 371  [[image:image-20220525104437-22.png]]
372 372  
373 373  
374 -Duplicate transmission in short time
375 375  
376 -[[image:image-20220601102430-1.png]]
497 +**Duplicate transmission in short time**
377 377  
499 +[[image:image-20220601102430-1.png||height="598" width="1319"]]
378 378  
379 -== 5.1 Solution ==
380 380  
502 +
503 +== 6.1  Solution ==
504 +
505 +
381 381  This example uses the Windows version as a template, other versions can refer to this. Similiar reference: [[https:~~/~~/confluence.alitecs.de/plugins/servlet/mobile?contentId=79790102#content/view/79790102>>url:https://confluence.alitecs.de/plugins/servlet/mobile?contentId=79790102#content/view/79790102]]
382 382  
508 +
383 383  (((
384 -~1. Install the GO compilation environment: Download the corresponding version of the Go compiler at [[https:~~/~~/go.dev/dl/>>url:https://go.dev/dl/]] and install it.
510 +(% style="color:blue" %)**1.  Install the GO compilation environment: Download the corresponding version of the Go compiler at [[https:~~/~~/go.dev/dl/>>url:https://go.dev/dl/]] and install it.**
511 +
512 +
385 385  )))
386 386  
387 387  [[image:image-20220525104532-24.png]]
388 388  
389 389  
390 -installation path:
518 +**installation path:**
391 391  
392 392  [[image:image-20220525104554-25.png]]
393 393  
394 394  
523 +
395 395  (((
396 -2. Environment variable settings:.
525 +(% style="color:blue" %)**2.  Environment variable settings:**
397 397  )))
398 398  
399 399  (((
... ... @@ -401,13 +401,13 @@
401 401  )))
402 402  
403 403  (((
404 -2)Set the variable name GOROOT and the variable value C:\Go\ (installation directory)
533 +2) Set the variable name GOROOT and the variable value C:\Go\ (installation directory)
405 405  )))
406 406  
407 407  [[image:image-20220524165433-33.png]]
408 408  
409 409  
410 -3)Modify the system variable Path and add C:\Go\bin\:
539 +3) Modify the system variable Path and add C:\Go\bin\:
411 411  
412 412  [[image:image-20220524165452-34.png]]
413 413  
... ... @@ -417,8 +417,9 @@
417 417  [[image:image-20220524165517-35.png]]
418 418  
419 419  
420 -3. Modify the ADR configuration file according to your own needs, adr.setting.go is an example of the ADR configuration file.
421 421  
550 +(% style="color:blue" %)**3.  Modify the ADR configuration file according to your own needs, adr.setting.go is an example of the ADR configuration file.**
551 +
422 422  The name of the plugin: Example ADR plugin:
423 423  
424 424  [[image:image-20220524165540-36.png]]
... ... @@ -428,8 +428,9 @@
428 428  [[image:image-20220524165557-37.png]]
429 429  
430 430  
431 -4. Compile the ADR configuration file and generate the exe file.
432 432  
562 +(% style="color:blue" %)**4.  Compile the ADR configuration file and generate the exe file.**
563 +
433 433  1) Create a folder named adr-setting
434 434  
435 435  2) Open the adr-setting folder
... ... @@ -453,8 +453,9 @@
453 453  [[image:image-20220524165623-38.png]]
454 454  
455 455  
456 -5. Add the plugin and run the plugin.
457 457  
588 +(% style="color:blue" %)**5.  Add the plugin and run the plugin.**
589 +
458 458  (((
459 459  The exe file generated in the previous step is placed in the same root directory as chirpstack-network-server.toml, and the ADR plugin is added to the toml file. The location of the addition is as follows:
460 460  )))
... ... @@ -490,11 +490,61 @@
490 490  Finish.
491 491  
492 492  
493 -= 6. Trouble Shooting =
625 += 7.  How to store/get all data traffic for a specific sensor, including raw payload, and uplink/ downlink history. =
494 494  
495 -== 6.1 MIC Mismatch or MIC Failed ==
496 496  
628 +All data is published to the MQTT topics. if you want to store/get the data, you would have to create an MQTT handler and store the data yourself.
629 +
630 +This example will be shown how to store/get all the data in two ways:
631 +
632 +**//1). Chirpstack ~-~-> Node-red//**
633 +
634 +
635 +[[image:image-20221012184501-1.png]]
636 +
637 +
638 +Use MQTT in Nore-red to subscribe to topics published by the chirpstack-application and then continuously write to a file
639 +
640 +[[image:image-20221012174220-2.png]]
641 +
642 +
643 +[[image:image-20221012184655-3.png||height="395" width="1049"]]
644 +
645 +
646 +**Each message is continuously logged to a specified file**
647 +
648 +[[image:image-20221012174352-3.png]]
649 +
650 +
651 +**//2). MQTT  Sub//**
652 +
653 +If you don't want to store the information via node-red, you can get the output via the subscribe command.
654 +
655 +
656 +**If connecting from the same machine, you can use the following command to receive data:**
657 +
658 +(% class="box infomessage" %)
497 497  (((
660 +mosquitto_sub -h localhost -t "application/#" -v
661 +)))
662 +
663 +
664 +**Different host**
665 +
666 +(% class="box infomessage" %)
667 +(((
668 +mosquitto_sub -h IPADDRESS -p 8883 ~-~-insecure ~-~-cafile ca.pem ~-~-cert cert.pem ~-~-key key.pem -t "application/#" -v
669 +)))
670 +
671 +[[image:image-20221012173639-1.png]]
672 +
673 +
674 += 8.  Trouble Shooting =
675 +
676 +== 8.1  MIC Mismatch or MIC Failed ==
677 +
678 +
679 +(((
498 498  When the device is registered or the device is working normally, the problem of MIC mismatch and MIC failed occurs.
499 499  )))
500 500  
image-20221010193350-1.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Edwin
Size
... ... @@ -1,0 +1,1 @@
1 +42.7 KB
Content
image-20221010193621-2.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Edwin
Size
... ... @@ -1,0 +1,1 @@
1 +34.2 KB
Content
image-20221012173639-1.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoye
Size
... ... @@ -1,0 +1,1 @@
1 +56.2 KB
Content
image-20221012174220-2.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoye
Size
... ... @@ -1,0 +1,1 @@
1 +14.8 KB
Content
image-20221012174352-3.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoye
Size
... ... @@ -1,0 +1,1 @@
1 +93.0 KB
Content
image-20221012184501-1.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoye
Size
... ... @@ -1,0 +1,1 @@
1 +91.3 KB
Content
image-20221012184631-2.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoye
Size
... ... @@ -1,0 +1,1 @@
1 +32.4 KB
Content
image-20221012184655-3.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoye
Size
... ... @@ -1,0 +1,1 @@
1 +45.4 KB
Content
image-20221222113302-1.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Kilight
Size
... ... @@ -1,0 +1,1 @@
1 +76.3 KB
Content
image-20221222114220-2.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Kilight
Size
... ... @@ -1,0 +1,1 @@
1 +64.3 KB
Content
image-20221222134830-3.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Kilight
Size
... ... @@ -1,0 +1,1 @@
1 +54.5 KB
Content
image-20221222140203-4.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Kilight
Size
... ... @@ -1,0 +1,1 @@
1 +91.4 KB
Content
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0