<
From version < 1.4 >
edited by Xiaoling
on 2022/05/16 11:44
To version < 1.5 >
edited by Xiaoling
on 2022/05/16 13:58
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -6,7 +6,9 @@
6 6  
7 7  The ChirpStack open-source LoRaWAN Network Server stack provides open-source components for LoRaWAN networks And the Chirpstack supports the users in building a private LoRaWAN Server. For more info please refer to this [[link>>url:https://www.chirpstack.io/]]
8 8  
9 +(((
9 9  The dragino gateway can connect the ChirpStack server via Semtech UDP or Semtech Basic Station.
11 +)))
10 10  
11 11  **Prerequisite**
12 12  
... ... @@ -20,10 +20,12 @@
20 20  
21 21  (% class="box" %)
22 22  (((
25 +(((
23 23  Semtech UDP : **All Model**
24 24  Basic Station : , , 
25 25  **Note** : the firmware needs >  if use the Bais station
26 26  )))
30 +)))
27 27  
28 28  = 2. Semtech UDP =
29 29  
... ... @@ -65,7 +65,9 @@
65 65  
66 66  The example gateway id is: a840411e96744150
67 67  
72 +(((
68 68  (% style="color:red" %)**Note : The Gateway EUI and server addresses must match the ChirpStack configuration.**
74 +)))
69 69  
70 70  [[image:https://wiki.dragino.com/images/thumb/c/c6/Add_the_gateway.png/600px-Add_the_gateway.png||height="363" width="600"]]
71 71  
... ... @@ -107,7 +107,9 @@
107 107  
108 108  User can use MQTT to send downlink payload to ChirpStack to perform downstream to LoRaWAN End
109 109  
116 +(((
110 110  Below is examples:
118 +)))
111 111  
112 112  (% class="box" %)
113 113  (((
... ... @@ -119,9 +119,13 @@
119 119  
120 120  [[image:https://wiki.dragino.com/images/thumb/0/06/ChirpStack_Down_1.png/600px-ChirpStack_Down_1.png||height="578" width="600"]]
121 121  
130 +(((
122 122  MQTT Connect to ChirpStack
132 +)))
123 123  
134 +(((
124 124  After connect
136 +)))
125 125  
126 126  (% class="box" %)
127 127  (((
... ... @@ -154,7 +154,9 @@
154 154  
155 155  [[image:https://wiki.dragino.com/images/thumb/d/d2/ChirpStack_Down_4.png/600px-ChirpStack_Down_4.png||alt="ChirpStack Down 4.png" height="344" width="600"]]
156 156  
169 +(((
157 157  Downlink payload encode javescript code: 可以在网站上运行以下Javsscript代码:
171 +)))
158 158  
159 159  (% class="box" %)
160 160  (((
... ... @@ -165,8 +165,7 @@
165 165   var cnt = 0;
166 166   var bit_arr = 0;
167 167   var bit_num = 0;
168 -
169 - for(var n = 0; n < sha1.length; ++n)
182 +\\ for(var n = 0; n < sha1.length; ++n)
170 170   {
171 171   if(sha1[n] >= 'A' && sha1[n] <= 'Z')
172 172   {
... ... @@ -180,8 +180,7 @@
180 180   {
181 181   ascv = sha1.charCodeAt(n) - 48;
182 182   }
183 -
184 - bit_arr = (bit_arr << 4) | ascv;
196 +\\ bit_arr = (bit_arr << 4) | ascv;
185 185   bit_num += 4;
186 186   if(bit_num >= 6)
187 187   {
... ... @@ -190,16 +190,13 @@
190 190   bit_arr &= ~~(-1 << bit_num);
191 191   }
192 192   }
193 -
194 - if(bit_num > 0)
205 +\\ if(bit_num > 0)
195 195   {
196 196   bit_arr <<= 6 - bit_num;
197 197   base64_rep += digits[bit_arr];
198 198   }
199 -
200 - var padding = base64_rep.length % 4;   
201 -
202 - if(padding > 0)
210 +\\ var padding = base64_rep.length % 4;   
211 +\\ if(padding > 0)
203 203   {
204 204   for(var n = 0; n < 4 - padding; ++n)
205 205   {
... ... @@ -208,15 +208,12 @@
208 208   }
209 209   return base64_rep;
210 210  }
211 -
212 -console.log(sha1_to_base64("data"));
213 -
214 -data is downlink payload required by end node.
220 +\\console.log(sha1_to_base64("data"));
221 +\\data is downlink payload required by end node.
215 215  e.g console.log(sha1_to_base64("030101"));
216 216   ​result: AwEB     
217 217   AwEB is the 0x030101's base 64 Encode.
218 -
219 -​e.g console.log(sha1_to_base64("030000"));
225 +\\​e.g console.log(sha1_to_base64("030000"));
220 220   ​result: AwAA     
221 221   AwAA is 0x030000's base 64 Encode.
222 222  )))
... ... @@ -245,7 +245,9 @@
245 245  
246 246  [[image:https://wiki.dragino.com/images/thumb/6/63/Nbtrans_1.png/600px-Nbtrans_1.png||alt="Nbtrans 1.png" height="103" width="600"]]
247 247  
254 +(((
248 248  nbtrans is a field of ADR message, in unconfirm mode, it tells end node how many time it needs to transmit for every frame.
256 +)))
249 249  
250 250  [[image:https://wiki.dragino.com/images/thumb/1/17/Nbtrans_2.png/300px-Nbtrans_2.png||alt="Nbtrans 2.png" height="462" width="300"]]
251 251  
... ... @@ -267,7 +267,9 @@
267 267  
268 268  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]]
269 269  
278 +(((
270 270  ~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.
280 +)))
271 271  
272 272  [[image:https://wiki.dragino.com/images/3/37/Chirpstacksolution-1.png||alt="Chirpstacksolution-1.png" height="199" width="554"]]
273 273  
... ... @@ -275,11 +275,17 @@
275 275  
276 276  [[image:https://wiki.dragino.com/images/c/ca/Chirpstacksolution-2.png||alt="Chirpstacksolution-2.png" height="283" width="361"]]
277 277  
288 +(((
278 278  2. Environment variable settings:.
290 +)))
279 279  
292 +(((
280 280  1) Open Computer -> Properties -> Advanced System Settings -> Environment Variables and add a "new" system variable:
294 +)))
281 281  
296 +(((
282 282  2)Set the variable name GOROOT and the variable value C:\Go\ (installation directory)
298 +)))
283 283  
284 284  [[image:https://wiki.dragino.com/images/f/f9/Chirpstacksolution-3.png||alt="Chirpstacksolution-3.png" height="152" width="554"]]
285 285  
... ... @@ -327,25 +327,35 @@
327 327  
328 328  5. Add the plugin and run the plugin.
329 329  
346 +(((
330 330  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:
348 +)))
331 331  
332 332  [[image:https://wiki.dragino.com/images/8/82/Chirpstacksolution-9.png||alt="Chirpstacksolution-9.png" height="73" width="554"]]
333 333  
334 334  (((
353 +(((
335 335  For example: adr_plugins=[“adr-setting”]
336 336  )))
356 +)))
337 337  
338 338  * (((
359 +(((
339 339  Adding a single plugin format is adr_plugins=["filename"]
340 340  )))
362 +)))
341 341  
342 342  * (((
365 +(((
343 343  Adding multiple plugins The format is adr_plugins=["file name 1", "file name 2",...]
344 344  )))
368 +)))
345 345  
346 346  (((
371 +(((
347 347  Finally, re-run chirpstack-network-server.exe, and then select the plugin you just compiled in Device-profiles,
348 348  )))
374 +)))
349 349  
350 350  [[image:https://wiki.dragino.com/images/3/39/Chirpstacksolution-10.png||alt="Chirpstacksolution-10.png" height="275" width="554"]]
351 351  
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0