Changes for page Notes for ChirpStack
Last modified by Edwin Chen on 2025/01/30 09:53
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 14 added, 0 removed)
- image-20221010193350-1.png
- image-20221010193621-2.png
- image-20221012173639-1.png
- image-20221012174220-2.png
- image-20221012174352-3.png
- image-20221012184501-1.png
- image-20221012184631-2.png
- image-20221012184655-3.png
- image-20221222113302-1.png
- image-20221222114220-2.png
- image-20221222134830-3.png
- image-20221222140203-4.png
- image-20221222141754-5.png
- image-20221222141830-6.png
Details
- Page properties
-
- Content
-
... ... @@ -38,7 +38,6 @@ 38 38 ))) 39 39 40 40 41 - 42 42 = 2. Semtech UDP = 43 43 44 44 == 2.1 Step 1. Add the Network-servers == ... ... @@ -61,7 +61,6 @@ 61 61 Add the Network-servers 62 62 63 63 64 - 65 65 == 2.2 Step 2. Create Gateway-profiles == 66 66 67 67 ... ... @@ -70,7 +70,6 @@ 70 70 Create Gateway-profiles 71 71 72 72 73 - 74 74 == 2.3 Step 3. Create Service-profiles == 75 75 76 76 ... ... @@ -86,7 +86,6 @@ 86 86 If the user has completed the preceding steps, proceed to the next step.(% style="display:none" %) 87 87 88 88 89 - 90 90 == 2.4 Step 4. Add the gateway == 91 91 92 92 ... ... @@ -109,7 +109,6 @@ 109 109 Configure the gateway 110 110 111 111 112 - 113 113 == 2.5 Step 5. Checking gateway Status == 114 114 115 115 ... ... @@ -124,13 +124,11 @@ 124 124 gateway Status 125 125 126 126 122 += 3. Gateway Registration for Basics Station = 127 127 128 -= 3. Gateway Registration for Basics Station =124 +== 3.1 Introduction == 129 129 130 130 131 -== 3.1 Introduction == 132 - 133 - 134 134 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. 135 135 136 136 ChirpStack Open-Source LoRaWAN® Network Server needs to set up a configuration that can use Semtech BasicStation. ... ... @@ -141,9 +141,6 @@ 141 141 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]] 142 142 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/]] 143 143 144 - 145 - 146 - 147 147 (% style="color:blue" %)**How to set up chirpStack Basic Station** 148 148 149 149 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]] ... ... @@ -154,18 +154,20 @@ 154 154 A gateway that can access the internet normally 155 155 156 156 147 +== 3.2 Add Gateway == 157 157 158 -== 3.2 Add Gateway == 159 159 160 160 [[image:image-20220524164205-10.png]] 161 161 162 162 163 -== 3.3 Access the gateway GUI == 153 +== 3.3 Access the gateway GUI == 164 164 155 + 165 165 Access the gateway GUI interface of LoRaWAN~-~->LoRaWAN ~-~- Basic Station 166 166 167 167 [[image:image-20220524164319-11.png]] 168 168 160 + 169 169 User need to Choose the ChirpStack/Senet ~-~- Basic Station , input Server URI and Upload the TLS Certificate 170 170 171 171 (% class="box" %) ... ... @@ -181,20 +181,23 @@ 181 181 [[image:image-20220524164341-12.png]] 182 182 183 183 184 -== 3.4 Start Station == 176 +== 3.4 Start Station == 185 185 186 -When the user has finished the configuration, Please click Sace&Apply to start station to connect ChirpStack 187 187 179 +When the user has finished the configuration, Please click **Sace&Apply** to start station to connect ChirpStack. 188 188 189 -== 3.5 Successful Connection == 190 190 182 +== 3.5 Successful Connection == 183 + 184 + 191 191 If user completes the above steps, which will see live date in the ChirpStack. 192 192 193 193 [[image:image-20220524164448-13.png]] 194 194 195 195 196 -== 3.6 Trouble Shooting == 190 +== 3.6 Trouble Shooting == 197 197 192 + 198 198 User can check the station log in the logread/system log page. 199 199 200 200 [[image:image-20220531172837-8.png]] ... ... @@ -205,31 +205,145 @@ 205 205 [[image:image-20220531172857-9.png]] 206 206 207 207 208 -= 4. Downlink =203 += 4. How the gateway connects to Chirpstack v4 via gateway-bridge = 209 209 210 -== 4.1 Chirpstack Downlink Note == 211 211 206 +(% style="color:blue" %)**Below list the support products and Requirements:** 207 + 208 +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]] 209 +1. Firmware version since: [[Chirpstack-gateway-bridge>>url:https://www.dragino.com/downloads/index.php?dir=LoRa_Gateway/LPS8/Firmware/Release/Chirpstack-gateway-bridge/]] 210 + 211 +(% style="color:blue" %)**How to set up chirpStack Gateway-bridge** 212 + 213 +Users can check out the ChirpStack gateway-bridge v4 [[link>>https://www.chirpstack.io/docs/chirpstack-gateway-bridge/install/dragino.html]] 214 + 215 + 216 +(% style="color:blue" %)**What do you need to prepare** 217 + 218 +A gateway that can access the internet normally 219 + 220 + 221 +== 4.1 Configure Packet Forwarder == 222 + 223 + 224 +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 225 + 226 +* In the **LoRaWAN** menu, click on **LoRaWAN ~-~- Semtech UDP** 227 +* Make sure the following settings are set: 228 +** **Service Provider:** //~-~-Custom/Private LoRaWAN~-~-// 229 +** **LoRaWAN Server Address:** //localhost or 127.0.0.1// 230 +** **Server port for upstream:** //1700// 231 +** **Server port for downstream:** //1700// 232 + 233 + Click **Save & Apply**. 234 + 235 +[[image:image-20221222114220-2.png||height="748" width="931"]] 236 + 237 + 238 +== 4.2 Configuring gateway frequency == 239 + 240 + 241 +(% style="color:red" %)**Note: Gateway frequencies must match** 242 + 243 +[[image:image-20221222134830-3.png||height="408" width="923"]] 244 + 245 + 246 +== 4.3 Modify the gateway-bridge configuration file == 247 + 248 + 249 +Run the gateway command line command to modify the gateway-bridge configuration file: 250 + 251 +(% class="box infomessage" %) 252 +((( 253 +root@dragino-1d27d4:~~# vim /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml 254 +))) 255 + 256 +[[image:image-20221222113302-1.png]] 257 + 258 + 259 +[[image:image-20221222140203-4.png||height="875" width="806"]] 260 + 261 + 262 +(% class="wikigeneratedid" id="H" %) 263 +After the modification, run the following command: **/etc/init.d/chirpstack-gateway-bridge restart** 264 + 265 + 266 +== 4.4 (Re)start and stop gateway-bridge == 267 + 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 + 287 +== 4.5 Successful Connection == 288 + 289 + 290 +[[image:image-20221222141754-5.png||height="488" width="1150"]] 291 + 292 + 293 +[[image:image-20221222141830-6.png||height="582" width="1153"]] 294 + 295 + 296 += 5. Downlink = 297 + 298 +== 5.1 Convert HEX to Base64 == 299 + 300 + 301 +(% 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.** 302 + 303 +**[[Online HEX to Base64 Converter>>https://base64.guru/converter/encode/hex]]:** 304 + 305 +[[image:image-20221010193350-1.png]] 306 + 307 + 308 + 309 +**[[Online Base64 to Hex converter>>https://base64.guru/converter/decode/hex]]** 310 + 311 +[[image:image-20221010193621-2.png]] 312 + 313 + 314 +== 5.2 Chirpstack Downlink Note == 315 + 316 + 212 212 [[image:image-20220601102543-2.png]] 213 213 214 -Convert the data to Base64 319 +**Convert the data to Base64** 215 215 321 +(% style="display:none" %) (%%) 216 216 217 -[[image:image-20220531173236-10.png]] 218 218 219 - Check ChripStackdownlink DataRate324 +[[image:image-20220531173236-10.png||height="597" width="1215"]] 220 220 326 +**Check ChripStack downlink DataRate** 221 221 328 + 329 + 222 222 [[image:image-20220525101326-11.png]] 223 223 224 -Make sure the RX2DR is the same in the end node 332 +**Make sure the RX2DR is the same in the end node** 225 225 226 226 227 -== 4.2Loraserver Downlink Note ==335 +== 5.3 Loraserver Downlink Note == 228 228 337 + 229 229 User can use MQTT to send downlink payload to ChirpStack to perform downstream to LoRaWAN End 230 230 231 231 ((( 232 -Below is examples: 341 +**Below is examples:** 233 233 ))) 234 234 235 235 (% class="box" %) ... ... @@ -243,13 +243,14 @@ 243 243 [[image:image-20220531173419-11.png]] 244 244 245 245 ((( 246 -MQTT Connect to ChirpStack 355 +**MQTT Connect to ChirpStack** 247 247 357 + 248 248 249 249 ))) 250 250 251 251 ((( 252 -After connect 362 +**After connect** 253 253 ))) 254 254 255 255 (% class="box" %) ... ... @@ -269,22 +269,14 @@ 269 269 270 270 [[image:image-20220531173519-12.png]] 271 271 272 -MQTT Connect to ChirpStack 382 +**MQTT Connect to ChirpStack** 273 273 274 274 275 -((( 276 -(% 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/]] 277 -))) 385 +**If we want to send downstream hex 030101 to end node, the BASE64 payload is AwEB** 278 278 279 -[[image:image-20220531173601-13.png]] 280 - 281 -Choose to Use Hex for Encode 282 - 283 - 284 -If we want send downstream hex 030101 to end node, the BASE64 payload is AwEB 285 - 286 286 [[image:image-20220531173658-14.png]] 287 287 389 + 288 288 ((( 289 289 Downlink payload encode javescript code: 可以在网站上运行以下Javsscript代码: 290 290 ))) ... ... @@ -302,15 +302,15 @@ 302 302 { 303 303 if(sha1[n] >= 'A' && sha1[n] <= 'Z') 304 304 { 305 - ascv = sha1.charCodeAt(n) - 55; 407 + ascv = sha1.charCodeAt( n ) - 55; 306 306 } 307 307 else if(sha1[n] >= 'a' && sha1[n] <= 'z') 308 308 { 309 - ascv = sha1.charCodeAt(n) - 87; 411 + ascv = sha1.charCodeAt( n ) - 87; 310 310 } 311 311 else 312 312 { 313 - ascv = sha1.charCodeAt(n) - 48; 415 + ascv = sha1.charCodeAt( n ) - 48; 314 314 } 315 315 \\ bit_arr = (bit_arr << 4) | ascv; 316 316 bit_num += 4; ... ... @@ -347,11 +347,12 @@ 347 347 ))) 348 348 349 349 350 -== 4.3 Add the decode function in Chirpstack for the payload == 452 +== 4.3 Add the decode function in Chirpstack for the payload == 351 351 454 + 352 352 User enters the payload code according to the steps. 353 353 354 -[[image:image-20220531173754-15.png]] 457 +[[image:image-20220531173754-15.png||height="474" width="1334"]] 355 355 356 356 357 357 [[image:image-20220531173856-16.png]] ... ... @@ -362,8 +362,9 @@ 362 362 [[image:image-20220531174046-19.png]] 363 363 364 364 365 -= 5. Multiply Uplink in ChirpStack =468 += 6. Multiply Uplink in ChirpStack = 366 366 470 + 367 367 ((( 368 368 nbtrans field is the value to determine the re-transmission time for unconfirmed uplink data. 369 369 ))) ... ... @@ -370,12 +370,17 @@ 370 370 371 371 ((( 372 372 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]] 477 + 478 + 373 373 ))) 374 374 375 -[[image:image-20220526091912-7.png]] 481 +[[image:image-20220526091912-7.png||height="241" width="1336"]] 376 376 483 + 377 377 ((( 378 378 nbtrans is a field of ADR message, in unconfirm mode, it tells end node how many time it needs to transmit for every frame. 486 + 487 + 379 379 ))) 380 380 381 381 [[image:image-20220525104359-21.png]] ... ... @@ -382,6 +382,8 @@ 382 382 383 383 ((( 384 384 Above behaviour will cause the platform shows below two cases of error: 494 + 495 + 385 385 ))) 386 386 387 387 ((( ... ... @@ -391,29 +391,35 @@ 391 391 [[image:image-20220525104437-22.png]] 392 392 393 393 394 -Duplicate transmission in short time 395 395 396 - [[image:image-20220601102430-1.png]]506 +**Duplicate transmission in short time** 397 397 508 +[[image:image-20220601102430-1.png||height="598" width="1319"]] 398 398 399 -== 5.1 Solution == 400 400 511 +== 6.1 Solution == 512 + 513 + 401 401 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]] 402 402 516 + 403 403 ((( 404 -~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. 518 +(% 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.** 519 + 520 + 405 405 ))) 406 406 407 407 [[image:image-20220525104532-24.png]] 408 408 409 409 410 -installation path: 526 +**installation path:** 411 411 412 412 [[image:image-20220525104554-25.png]] 413 413 414 414 531 + 415 415 ((( 416 -2. Environment variable settings: .533 +(% style="color:blue" %)**2. Environment variable settings:** 417 417 ))) 418 418 419 419 ((( ... ... @@ -421,13 +421,13 @@ 421 421 ))) 422 422 423 423 ((( 424 -2)Set the variable name GOROOT and the variable value C:\Go\ (installation directory) 541 +2) Set the variable name GOROOT and the variable value C:\Go\ (installation directory) 425 425 ))) 426 426 427 427 [[image:image-20220524165433-33.png]] 428 428 429 429 430 -3)Modify the system variable Path and add C:\Go\bin\: 547 +3) Modify the system variable Path and add C:\Go\bin\: 431 431 432 432 [[image:image-20220524165452-34.png]] 433 433 ... ... @@ -437,8 +437,9 @@ 437 437 [[image:image-20220524165517-35.png]] 438 438 439 439 440 -3. Modify the ADR configuration file according to your own needs, adr.setting.go is an example of the ADR configuration file. 441 441 558 +(% 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.** 559 + 442 442 The name of the plugin: Example ADR plugin: 443 443 444 444 [[image:image-20220524165540-36.png]] ... ... @@ -448,8 +448,9 @@ 448 448 [[image:image-20220524165557-37.png]] 449 449 450 450 451 -4. Compile the ADR configuration file and generate the exe file. 452 452 570 +(% style="color:blue" %)**4. Compile the ADR configuration file and generate the exe file.** 571 + 453 453 1) Create a folder named adr-setting 454 454 455 455 2) Open the adr-setting folder ... ... @@ -473,8 +473,9 @@ 473 473 [[image:image-20220524165623-38.png]] 474 474 475 475 476 -5. Add the plugin and run the plugin. 477 477 596 +(% style="color:blue" %)**5. Add the plugin and run the plugin.** 597 + 478 478 ((( 479 479 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: 480 480 ))) ... ... @@ -510,14 +510,68 @@ 510 510 Finish. 511 511 512 512 513 -= 6.TroubleShooting =633 += 7. How to store/get all data traffic for a specific sensor, including raw payload, and uplink/ downlink history. = 514 514 515 -== 6.1 MIC Mismatch or MIC Failed == 516 516 636 +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. 637 + 638 +This example will be shown how to store/get all the data in two ways: 639 + 640 +**//1). Chirpstack ~-~-> Node-red//** 641 + 642 + 643 +[[image:image-20221012184501-1.png]] 644 + 645 + 646 +Use MQTT in Nore-red to subscribe to topics published by the chirpstack-application and then continuously write to a file 647 + 648 +[[image:image-20221012174220-2.png]] 649 + 650 + 651 +[[image:image-20221012184655-3.png||height="395" width="1049"]] 652 + 653 + 654 +**Each message is continuously logged to a specified file** 655 + 656 +[[image:image-20221012174352-3.png]] 657 + 658 + 659 +**//2). MQTT Sub//** 660 + 661 +If you don't want to store the information via node-red, you can get the output via the subscribe command. 662 + 663 + 664 +**If connecting from the same machine, you can use the following command to receive data:** 665 + 666 +(% class="box infomessage" %) 517 517 ((( 668 +mosquitto_sub -h localhost -t "application/#" -v 669 +))) 670 + 671 + 672 +**Different host** 673 + 674 +(% class="box infomessage" %) 675 +((( 676 +mosquitto_sub -h IPADDRESS -p 8883 ~-~-insecure ~-~-cafile ca.pem ~-~-cert cert.pem ~-~-key key.pem -t "application/#" -v 677 +))) 678 + 679 +[[image:image-20221012173639-1.png]] 680 + 681 + 682 += 8. Trouble Shooting = 683 + 684 +== 8.1 MIC Mismatch or MIC Failed == 685 + 686 + 687 +((( 518 518 When the device is registered or the device is working normally, the problem of MIC mismatch and MIC failed occurs. 519 519 ))) 520 520 521 521 ((( 522 522 Under normal circumstances, users need to change the APPKEY to solve this problem. 693 + 694 + 695 + 696 + 523 523 )))
- 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
- image-20221222141754-5.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Kilight - Size
-
... ... @@ -1,0 +1,1 @@ 1 +179.1 KB - Content
- image-20221222141830-6.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Kilight - Size
-
... ... @@ -1,0 +1,1 @@ 1 +116.7 KB - Content