Changes for page Notes for ChirpStack
Last modified by Edwin Chen on 2025/01/30 09:53
Change comment:
Uploaded new attachment "image-20221222114220-2.png", version {1}
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Attachments (0 modified, 10 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Xiaoling1 +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.1Introduction ==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,53 @@ 185 185 [[image:image-20220531172857-9.png]] 186 186 187 187 188 -= 4. Downlink = 189 189 190 -= =4.1ChirpstackDownlinkNote==210 += 4. Downlink = 191 191 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 + 192 192 [[image:image-20220601102543-2.png]] 193 193 194 -Convert the data to Base64 233 +**Convert the data to Base64** 195 195 235 +(% style="display:none" %) (%%) 196 196 197 -[[image:image-20220531173236-10.png]] 198 198 199 - Check ChripStackdownlink DataRate238 +[[image:image-20220531173236-10.png||height="597" width="1215"]] 200 200 240 +**Check ChripStack downlink DataRate** 201 201 242 + 243 + 202 202 [[image:image-20220525101326-11.png]] 203 203 204 -Make sure the RX2DR is the same in the end node 246 +**Make sure the RX2DR is the same in the end node** 205 205 206 206 207 -== 4. 2Loraserver Downlink Note ==249 +== 4.3 Loraserver Downlink Note == 208 208 251 + 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: 255 +**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 269 +**MQTT Connect to ChirpStack** 227 227 271 + 228 228 229 229 ))) 230 230 231 231 ((( 232 -After connect 276 +**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 296 +**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 -))) 299 +**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 303 + 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; 321 + 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; 325 + ascv = sha1.charCodeAt( n ) - 87; 290 290 } 291 291 else 292 292 { 293 - ascv = sha1.charCodeAt(n) - 48; 329 + 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 367 +== 4.3 Add the decode function in Chirpstack for the payload == 368 + 369 + 332 332 User enters the payload code according to the steps. 333 333 334 -[[image:image-20220531173754-15.png]] 372 +[[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 = 383 += 5. Multiply Uplink in ChirpStack = 346 346 385 + 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]] 392 + 393 + 353 353 ))) 354 354 355 -[[image:image-20220526091912-7.png]] 396 +[[image:image-20220526091912-7.png||height="241" width="1336"]] 356 356 398 + 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. 401 + 402 + 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: 409 + 410 + 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]]421 +**Duplicate transmission in short time** 377 377 423 +[[image:image-20220601102430-1.png||height="598" width="1319"]] 378 378 379 -== 5.1 Solution == 380 380 426 + 427 +== 5.1 Solution == 428 + 429 + 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 432 + 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. 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 + 385 385 ))) 386 386 387 387 [[image:image-20220525104532-24.png]] 388 388 389 389 390 -installation path: 442 +**installation path:** 391 391 392 392 [[image:image-20220525104554-25.png]] 393 393 394 394 447 + 395 395 ((( 396 -2. Environment variable settings: .449 +(% 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) 457 +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\: 463 +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 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 + 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 486 +(% style="color:blue" %)**4. Compile the ADR configuration file and generate the exe file.** 487 + 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 512 +(% style="color:blue" %)**5. Add the plugin and run the plugin.** 513 + 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. TroubleShooting =549 += 6. 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 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" %) 497 497 ((( 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 +((( 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