Changes for page Notes for ChirpStack
Last modified by Edwin Chen on 2025/01/30 09:53
Change comment:
Uploaded new attachment "image-20221222113302-1.png", version {1}
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Attachments (0 modified, 9 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Xiaoling1 +XWiki.Kilight - Content
-
... ... @@ -125,12 +125,11 @@ 125 125 126 126 127 127 128 -= 3. Gateway Registration for Basics Station = 128 += 3. Gateway Registration for Basics Station = 129 129 130 +== 3.1 Introduction == 130 130 131 -== 3.1 Introduction == 132 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 153 +== 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 == 159 +== 3.3 Access the gateway GUI == 164 164 161 + 165 165 Access the gateway GUI interface of LoRaWAN~-~->LoRaWAN ~-~- Basic Station 166 166 167 167 [[image:image-20220524164319-11.png]] 168 168 166 + 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 == 182 +== 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 185 +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 188 +== 3.5 Successful Connection == 189 + 190 + 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 == 196 +== 3.6 Trouble Shooting == 197 197 198 + 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,53 @@ 205 205 [[image:image-20220531172857-9.png]] 206 206 207 207 208 -= 4. Downlink = 209 209 210 -= =4.1ChirpstackDownlinkNote==210 += 4. Downlink = 211 211 212 +== 4.1 Convert HEX to Base64 == 213 + 214 + 215 +(% 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.** 216 + 217 +**[[Online HEX to Base64 Converter>>https://base64.guru/converter/encode/hex]]:** 218 + 219 +[[image:image-20221010193350-1.png]] 220 + 221 + 222 + 223 +**[[Online Base64 to Hex converter>>https://base64.guru/converter/decode/hex]]** 224 + 225 +[[image:image-20221010193621-2.png]] 226 + 227 + 228 +== 4.2 Chirpstack Downlink Note == 229 + 230 + 212 212 [[image:image-20220601102543-2.png]] 213 213 214 -Convert the data to Base64 233 +**Convert the data to Base64** 215 215 235 +(% style="display:none" %) (%%) 216 216 217 -[[image:image-20220531173236-10.png]] 218 218 219 - Check ChripStackdownlink DataRate238 +[[image:image-20220531173236-10.png||height="597" width="1215"]] 220 220 240 +**Check ChripStack downlink DataRate** 221 221 242 + 243 + 222 222 [[image:image-20220525101326-11.png]] 223 223 224 -Make sure the RX2DR is the same in the end node 246 +**Make sure the RX2DR is the same in the end node** 225 225 226 226 227 -== 4. 2Loraserver Downlink Note ==249 +== 4.3 Loraserver Downlink Note == 228 228 251 + 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: 255 +**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 269 +**MQTT Connect to ChirpStack** 247 247 271 + 248 248 249 249 ))) 250 250 251 251 ((( 252 -After connect 276 +**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 296 +**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 -))) 299 +**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 303 + 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; 321 + 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; 325 + ascv = sha1.charCodeAt( n ) - 87; 310 310 } 311 311 else 312 312 { 313 - ascv = sha1.charCodeAt(n) - 48; 329 + ascv = sha1.charCodeAt( n ) - 48; 314 314 } 315 315 \\ bit_arr = (bit_arr << 4) | ascv; 316 316 bit_num += 4; ... ... @@ -347,11 +347,13 @@ 347 347 ))) 348 348 349 349 350 -== 4.3 Add the decode function in Chirpstack for the payload == 351 351 367 +== 4.3 Add the decode function in Chirpstack for the payload == 368 + 369 + 352 352 User enters the payload code according to the steps. 353 353 354 -[[image:image-20220531173754-15.png]] 372 +[[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 = 383 += 5. Multiply Uplink in ChirpStack = 366 366 385 + 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]] 392 + 393 + 373 373 ))) 374 374 375 -[[image:image-20220526091912-7.png]] 396 +[[image:image-20220526091912-7.png||height="241" width="1336"]] 376 376 398 + 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. 401 + 402 + 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: 409 + 410 + 385 385 ))) 386 386 387 387 ((( ... ... @@ -391,29 +391,36 @@ 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]]421 +**Duplicate transmission in short time** 397 397 423 +[[image:image-20220601102430-1.png||height="598" width="1319"]] 398 398 399 -== 5.1 Solution == 400 400 426 + 427 +== 5.1 Solution == 428 + 429 + 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 432 + 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. 434 +(% 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.** 435 + 436 + 405 405 ))) 406 406 407 407 [[image:image-20220525104532-24.png]] 408 408 409 409 410 -installation path: 442 +**installation path:** 411 411 412 412 [[image:image-20220525104554-25.png]] 413 413 414 414 447 + 415 415 ((( 416 -2. Environment variable settings: .449 +(% 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) 457 +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\: 463 +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 474 +(% 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.** 475 + 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 486 +(% style="color:blue" %)**4. Compile the ADR configuration file and generate the exe file.** 487 + 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 512 +(% style="color:blue" %)**5. Add the plugin and run the plugin.** 513 + 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,11 +510,61 @@ 510 510 Finish. 511 511 512 512 513 -= 6. TroubleShooting =549 += 6. 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 552 +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. 553 + 554 +This example will be shown how to store/get all the data in two ways: 555 + 556 +**//1). Chirpstack ~-~-> Node-red//** 557 + 558 + 559 +[[image:image-20221012184501-1.png]] 560 + 561 + 562 +Use MQTT in Nore-red to subscribe to topics published by the chirpstack-application and then continuously write to a file 563 + 564 +[[image:image-20221012174220-2.png]] 565 + 566 + 567 +[[image:image-20221012184655-3.png||height="395" width="1049"]] 568 + 569 + 570 +**Each message is continuously logged to a specified file** 571 + 572 +[[image:image-20221012174352-3.png]] 573 + 574 + 575 +**//2). MQTT Sub//** 576 + 577 +If you don't want to store the information via node-red, you can get the output via the subscribe command. 578 + 579 + 580 +**If connecting from the same machine, you can use the following command to receive data:** 581 + 582 +(% class="box infomessage" %) 517 517 ((( 584 +mosquitto_sub -h localhost -t "application/#" -v 585 +))) 586 + 587 + 588 +**Different host** 589 + 590 +(% class="box infomessage" %) 591 +((( 592 +mosquitto_sub -h IPADDRESS -p 8883 ~-~-insecure ~-~-cafile ca.pem ~-~-cert cert.pem ~-~-key key.pem -t "application/#" -v 593 +))) 594 + 595 +[[image:image-20221012173639-1.png]] 596 + 597 + 598 += 7. Trouble Shooting = 599 + 600 +== 7.1 MIC Mismatch or MIC Failed == 601 + 602 + 603 +((( 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
- 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