Last modified by Xiaoling on 2025/04/23 15:57

From version 28.4
edited by Xiaoling
on 2022/05/23 10:46
Change comment: There is no comment for this version
To version 4.1
edited by Xiaoling
on 2022/05/19 17:37
Change comment: Uploaded new attachment "1652953055962-143.png", version {1}

Summary

Details

Page properties
Content
... ... @@ -1,6 +1,7 @@
1 1  (% style="text-align:center" %)
2 2  [[image:1652947681187-144.png||height="385" width="385"]]
3 3  
4 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image001.jpg]]
4 4  
5 5  
6 6  
... ... @@ -26,7 +26,7 @@
26 26  )))
27 27  
28 28  (((
29 -RS485-BL can interface to RS485 sensor, 3.3v/5v UART sensor or interrupt sensor. RS485-BL provides **a 3.3v output** and** a 5v output** to power external sensors. Both output voltages are controllable to minimize the total system power consumption.
30 +RS485-BL can interface to RS485 sensor, 3.3v/5v UART sensor or interrupt sensor. RS485-BL provides **a 3.3v output** and** a 5v output** to power external sensors. Both output voltages are controllable to minimize the total system power consumption.
30 30  )))
31 31  
32 32  (((
... ... @@ -49,7 +49,7 @@
49 49  Each RS485-BL pre-load with a set of unique keys for LoRaWAN registration, register these keys to LoRaWAN server and it will auto connect after power on.
50 50  )))
51 51  
52 -[[image:1652953304999-717.png||height="424" width="733"]]
53 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image002.png]]
53 53  
54 54  == 1.2 Specifications ==
55 55  
... ... @@ -56,7 +56,7 @@
56 56  **Hardware System:**
57 57  
58 58  * STM32L072CZT6 MCU
59 -* SX1276/78 Wireless Chip 
60 +* SX1276/78 Wireless Chip
60 60  * Power Consumption (exclude RS485 device):
61 61  ** Idle: 6uA@3.3v
62 62  
... ... @@ -110,295 +110,264 @@
110 110  * Smart Cities
111 111  * Smart Factory
112 112  
113 -== 1.5 Firmware Change log ==
114 114  
115 -[[RS485-BL Image files – Download link and Change log>>url:http://www.dragino.com/downloads/index.php?dir=LoRa_End_Node/RS485-BL/Firmware/||style="background-color: rgb(255, 255, 255);"]]
115 +1.
116 +11. Firmware Change log
116 116  
117 -== 1.6 Hardware Change log ==
118 +[[RS485-BL Image files – Download link and Change log>>url:http://www.dragino.com/downloads/index.php?dir=LoRa_End_Node/RS485-BL/Firmware/]]
118 118  
119 -(((
120 +
121 +1.
122 +11. Hardware Change log
123 +
124 +
120 120  v1.4
121 -)))
122 122  
123 -(((
124 124  ~1. Change Power IC to TPS22916
125 -)))
126 126  
127 127  
128 -(((
129 129  v1.3
130 -)))
131 131  
132 -(((
133 133  ~1. Change JP3 from KF350-8P to KF350-11P, Add one extra interface for I2C and one extra interface for one-wire
134 -)))
135 135  
136 136  
137 -(((
138 138  v1.2
139 -)))
140 140  
141 -(((
142 -Release version ​​​​​
143 -)))
137 +Release version
144 144  
145 -= 2. Pin mapping and Power ON Device =
146 146  
147 -(((
140 +
141 +
142 +
143 +1. Pin mapping and Power ON Device
144 +
148 148  The RS485-BL is powered on by 8500mAh battery. To save battery life, RS485-BL is shipped with power off. User can put the jumper to power on RS485-BL.
149 -)))
150 150  
151 -[[image:1652953055962-143.png||height="387" width="728"]]
152 152  
148 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image003.png]]
153 153  
150 +
151 +
154 154  The Left TXD and RXD are TTL interface for external sensor. TTL level is controlled by 3.3/5v Jumper.
155 155  
156 -= 3. Operation Mode =
157 157  
158 -== 3.1 How it works? ==
159 159  
160 -(((
156 +
157 +
158 +
159 +1. Operation Mode
160 +11. How it works?
161 +
161 161  The RS485-BL is configured as LoRaWAN OTAA Class A mode by default. It has OTAA keys to join network. To connect a local LoRaWAN network, user just need to input the OTAA keys in the network server and power on the RS485-BL. It will auto join the network via OTAA.
162 -)))
163 163  
164 -== 3.2 Example to join LoRaWAN network ==
165 165  
166 -Here shows an example for how to join the TTN V3 Network. Below is the network structure, we use [[LG308>>url:http://www.dragino.com/products/lora-lorawan-gateway/item/140-lg308.html]] as LoRaWAN gateway here. 
165 +1.
166 +11. Example to join LoRaWAN network
167 167  
168 -[[image:1652953414711-647.png||height="337" width="723"]]
168 +Here shows an example for how to join the TTN V3 Network. Below is the network structure, we use [[LG308>>url:http://www.dragino.com/products/lora-lorawan-gateway/item/140-lg308.html]] as LoRaWAN gateway here.
169 169  
170 -(((
170 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image004.png]]
171 +
172 +
171 171  The RS485-BL in this example connected to two RS485 devices for demonstration, user can connect to other RS485 devices via the same method.
172 -)))
173 173  
174 -(((
175 +
175 175  The LG308 is already set to connect to [[TTN V3 network >>url:https://www.thethingsnetwork.org/]]. So what we need to now is only configure the TTN V3:
176 -)))
177 177  
178 -(((
179 179  **Step 1**: Create a device in TTN V3 with the OTAA keys from RS485-BL.
180 -)))
181 181  
182 -(((
183 183  Each RS485-BL is shipped with a sticker with unique device EUI:
184 -)))
185 185  
186 -[[image:1652953462722-299.png]]
182 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image005.png]]
187 187  
188 -(((
184 +
185 +
186 +
189 189  User can enter this key in their LoRaWAN Server portal. Below is TTN V3 screen shot:
190 -)))
191 191  
192 -(((
193 193  Add APP EUI in the application.
194 -)))
195 195  
191 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image006.png]]
196 196  
193 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image007.png]]
197 197  
195 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image008.png]]
198 198  
199 -[[image:image-20220519174512-1.png]]
197 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image009.png]]
200 200  
201 -[[image:image-20220519174512-2.png||height="328" width="731"]]
202 202  
203 -[[image:image-20220519174512-3.png||height="556" width="724"]]
204 204  
205 -[[image:image-20220519174512-4.png]]
206 206  
202 +
203 +
204 +
205 +
206 +
207 +
208 +
209 +
210 +
211 +
212 +
213 +
214 +
207 207  You can also choose to create the device manually.
208 208  
209 -[[image:1652953542269-423.png||height="710" width="723"]]
217 +|(((
218 +
219 +)))
210 210  
221 +
222 +
223 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image010.png]]
224 +
211 211  Add APP KEY and DEV EUI
212 212  
213 -[[image:1652953553383-907.png||height="514" width="724"]]
227 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image011.png]]
214 214  
215 215  
216 -(((
217 217  **Step 2**: Power on RS485-BL and it will auto join to the TTN V3 network. After join success, it will start to upload message to TTN V3 and user can see in the panel.
218 -)))
219 219  
220 -[[image:1652953568895-172.png||height="232" width="724"]]
232 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image012.png]]
221 221  
222 -== 3.3 Configure Commands to read data ==
223 223  
224 -(((
235 +
236 +
237 +1.
238 +11. Configure Commands to read data
239 +
225 225  There are plenty of RS485 and TTL level devices in the market and each device has different command to read the valid data. To support these devices in flexible, RS485-BL supports flexible command set. User can use [[AT Commands or LoRaWAN Downlink>>path:#AT_COMMAND]] Command to configure how RS485-BL should read the sensor and how to handle the return from RS485 or TTL sensors.
226 -)))
227 227  
228 -=== 3.3.1 onfigure UART settings for RS485 or TTL communication ===
229 229  
243 +1.
244 +11.
245 +111. Configure UART settings for RS485 or TTL communication
246 +
230 230  RS485-BL can connect to either RS485 sensors or TTL sensor. User need to specify what type of sensor need to connect.
231 231  
232 -**~1. RS485-MODBUS mode:**
249 +1. RS485-MODBUS mode:
233 233  
234 234  AT+MOD=1 ~/~/ Support RS485-MODBUS type sensors. User can connect multiply RS485 , Modbus sensors to the A / B pins.
235 235  
236 -**2. TTL mode:**
237 237  
254 +1. TTL mode:
255 +
238 238  AT+MOD=2 ~/~/ Support TTL Level sensors, User can connect one TTL Sensor to the TXD/RXD/GND pins.
239 239  
258 +
240 240  RS485-BL default UART settings is **9600, no parity, stop bit 1**. If the sensor has a different settings, user can change the RS485-BL setting to match.
241 241  
242 -(% border="1" style="background-color:#ffffcc; color:green; width:795px" %)
243 -|(((
244 -**AT Commands**
245 -)))|(% style="width:285px" %)(((
246 -**Description**
247 -)))|(% style="width:347px" %)(((
248 -**Example**
249 -)))
250 -|(((
251 -AT+BAUDR
252 -)))|(% style="width:285px" %)(((
253 -Set the baud rate (for RS485 connection). Default Value is: 9600.
254 -)))|(% style="width:347px" %)(((
255 -(((
261 +
262 +|**AT Commands**|**Description**|**Example**
263 +|AT+BAUDR|Set the baud rate (for RS485 connection). Default Value is: 9600.|(((
256 256  AT+BAUDR=9600
257 -)))
258 258  
259 -(((
260 260  Options: (1200,2400,4800,14400,19200,115200)
261 261  )))
262 -)))
263 -|(((
264 -AT+PARITY
265 -)))|(% style="width:285px" %)(((
266 -(((
268 +|AT+PARITY|(((
267 267  Set UART parity (for RS485 connection)
268 -)))
269 269  
270 -(((
271 271  Default Value is: no parity.
272 -)))
273 -)))|(% style="width:347px" %)(((
274 -(((
272 +)))|(((
275 275  AT+PARITY=0
276 -)))
277 277  
278 -(((
279 279  Option: 0: no parity, 1: odd parity, 2: even parity
280 280  )))
281 -)))
282 -|(((
283 -AT+STOPBIT
284 -)))|(% style="width:285px" %)(((
285 -(((
277 +|AT+STOPBIT|(((
286 286  Set serial stopbit (for RS485 connection)
287 -)))
288 288  
289 -(((
290 290  Default Value is: 1bit.
291 -)))
292 -)))|(% style="width:347px" %)(((
293 -(((
281 +)))|(((
294 294  AT+STOPBIT=0 for 1bit
295 -)))
296 296  
297 -(((
298 298  AT+STOPBIT=1 for 1.5 bit
299 -)))
300 300  
301 -(((
302 302  AT+STOPBIT=2 for 2 bits
303 303  )))
304 -)))
305 305  
306 -=== 3.3.2 Configure sensors ===
307 307  
308 -(((
309 -Some sensors might need to configure before normal operation. User can configure such sensor via PC or through RS485-BL AT Commands (% style="color:#4f81bd" %)**AT+CFGDEV**.
310 -)))
311 311  
312 -(((
313 -When user issue an (% style="color:#4f81bd" %)**AT+CFGDEV**(%%) command, Each (% style="color:#4f81bd" %)**AT+CFGDEV**(%%) equals to send a command to the RS485 or TTL sensors. This command will only run when user input it and won’t run during each sampling.
314 -)))
315 315  
316 -(% border="1" style="background-color:#ffffcc; color:green; width:806px" %)
317 -|**AT Commands**|(% style="width:418px" %)**Description**|(% style="width:256px" %)**Example**
318 -|AT+CFGDEV|(% style="width:418px" %)(((
292 +
293 +1.
294 +11.
295 +111. Configure sensors
296 +
297 +Some sensors might need to configure before normal operation. User can configure such sensor via PC or through RS485-BL AT Commands AT+CFGDEV.
298 +
299 +
300 +When user issue an AT+CFGDEV command, Each AT+CFGDEV equals to send a command to the RS485 or TTL sensors. This command will only run when user input it and won’t run during each sampling.
301 +
302 +|**AT Commands**|**Description**|**Example**
303 +|AT+CFGDEV|(((
319 319  This command is used to configure the RS485/TTL devices; they won’t be used during sampling.
320 320  
321 -AT+CFGDEV=xx xx xx xx xx xx xx xx xx xx xx xx,
306 +AT+CFGDEV=xx xx xx xx xx xx xx xx xx xx xx xx,m
322 322  
323 -mm: 0: no CRC, 1: add CRC-16/MODBUS in the end of this command
324 -)))|(% style="width:256px" %)AT+CFGDEV=xx xx xx xx xx xx xx xx xx xx xx xx,m
308 +m: 0: no CRC, 1: add CRC-16/MODBUS in the end of this command
309 +)))|AT+CFGDEV=xx xx xx xx xx xx xx xx xx xx xx xx,m
325 325  
326 326  Detail of AT+CFGDEV command see [[AT+CFGDEV detail>>path:#AT_CFGDEV]].
327 327  
328 -=== 3.3.3 Configure read commands for each sampling ===
329 329  
330 -(((
314 +
315 +
316 +
317 +1.
318 +11.
319 +111. Configure read commands for each sampling
320 +
331 331  RS485-BL is a battery powered device; it will sleep most of time. And wake up on each period and read RS485 / TTL sensor data and uplink.
332 -)))
333 333  
334 -(((
323 +
335 335  During each sampling, we need to confirm what commands we need to send to the sensors to read data. After the RS485/TTL sensors send back the value, it normally includes some bytes and we only need a few from them for a shorten payload.
336 -)))
337 337  
338 -(((
326 +
339 339  To save the LoRaWAN network bandwidth, we might need to read data from different sensors and combine their valid value into a short payload.
340 -)))
341 341  
342 -(((
329 +
343 343  This section describes how to achieve above goals.
344 -)))
345 345  
346 -(((
332 +
347 347  During each sampling, the RS485-BL can support 15 commands to read sensors. And combine the return to one or several uplink payloads.
348 -)))
349 349  
350 -(((
335 +
351 351  **Command from RS485-BL to Sensor:**
352 -)))
353 353  
354 -(((
355 355  RS485-BL can send out pre-set max 15 strings via **AT+COMMAD1**, **ATCOMMAND2**,…, to **AT+COMMANDF** . All commands are of same grammar.
356 -)))
357 357  
358 -(((
340 +
359 359  **Handle return from sensors to RS485-BL**:
360 -)))
361 361  
362 -(((
363 363  After RS485-BL send out a string to sensor, RS485-BL will wait for the return from RS485 or TTL sensor. And user can specify how to handle the return, by **AT+DATACUT or AT+SEARCH commands**
364 -)))
365 365  
366 -* (((
367 -**AT+DATACUT**
368 -)))
369 369  
370 -(((
346 +* **AT+DATACUT**
347 +
371 371  When the return value from sensor have fix length and we know which position the valid value we should get, we can use AT+DATACUT command.
372 -)))
373 373  
374 -* (((
375 -**AT+SEARCH**
376 -)))
377 377  
378 -(((
351 +* **AT+SEARCH**
352 +
379 379  When the return value from sensor is dynamic length and we are not sure which bytes the valid data is, instead, we know what value the valid value following. We can use AT+SEARCH to search the valid value in the return string.
380 -)))
381 381  
382 -(((
355 +
383 383  **Define wait timeout:**
384 -)))
385 385  
386 -(((
387 387  Some RS485 device might has longer delay on reply, so user can use AT+CMDDL to set the timeout for getting reply after the RS485 command is sent. For example, AT+CMDDL1=1000 to send the open time to 1000ms
388 -)))
389 389  
390 -(((
360 +
391 391  After we got the valid value from each RS485 commands, we need to combine them together with the command **AT+DATAUP**.
392 -)))
393 393  
363 +
394 394  **Examples:**
395 395  
396 396  Below are examples for the how above AT Commands works.
397 397  
368 +
398 398  **AT+COMMANDx : **This command will be sent to RS485/TTL devices during each sampling, Max command length is 14 bytes. The grammar is:
399 399  
400 -(% border="1" class="table-bordered" style="background-color:#4f81bd; color:white; width:501px" %)
401 -|(% style="width:498px" %)(((
371 +|(((
402 402  **AT+COMMANDx=xx xx xx xx xx xx xx xx xx xx xx xx,m**
403 403  
404 404  **xx xx xx xx xx xx xx xx xx xx xx xx: The RS485 command to be sent**
... ... @@ -410,43 +410,46 @@
410 410  
411 411  In the RS485-BL, we should use this command AT+COMMAND1=01 03 0B B8 00 02,1 for the same.
412 412  
383 +
413 413  **AT+SEARCHx**: This command defines how to handle the return from AT+COMMANDx.
414 414  
415 -(% border="1" class="table-bordered" style="background-color:#4f81bd; color:white; width:580px" %)
416 -|(% style="width:577px" %)(((
386 +|(((
417 417  **AT+SEARCHx=aa,xx xx xx xx xx**
418 418  
419 419  * **aa: 1: prefix match mode; 2: prefix and suffix match mode**
420 420  * **xx xx xx xx xx: match string. Max 5 bytes for prefix and 5 bytes for suffix**
391 +
392 +
421 421  )))
422 422  
423 -**Examples:**
395 +Examples:
424 424  
425 425  1. For a return string from AT+COMMAND1: 16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49
426 426  
427 427  If we set AT+SEARCH1=1,1E 56 34.      (max 5 bytes for prefix)
428 428  
429 -The valid data will be all bytes after 1E 56 34 , so it is (% style="background-color:yellow" %)**2e 30 58 5f 36 41 30 31 00 49**
401 +The valid data will be all bytes after 1E 56 34 , so it is 2e 30 58 5f 36 41 30 31 00 49
430 430  
431 -[[image:1653271044481-711.png]]
403 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image013.png]]
432 432  
405 +
433 433  1. For a return string from AT+COMMAND1:  16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49
434 434  
435 435  If we set AT+SEARCH1=2, 1E 56 34+31 00 49
436 436  
437 -Device will search the bytes between 1E 56 34 and 31 00 49. So it is(% style="background-color:yellow" %) **2e 30 58 5f 36 41 30**
410 +Device will search the bytes between 1E 56 34 and 31 00 49. So it is 2e 30 58 5f 36 41 30
438 438  
439 -[[image:1653271276735-972.png]]
412 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image014.png]]
440 440  
414 +
441 441  **AT+DATACUTx : **This command defines how to handle the return from AT+COMMANDx, max return length is 45 bytes.
442 442  
443 -(% style="background-color:#4f81bd; color:white; width:729px" %)
444 -|(% style="width:726px" %)(((
417 +|(((
445 445  **AT+DATACUTx=a,b,c**
446 446  
447 447  * **a: length for the return of AT+COMMAND**
448 448  * **b:1: grab valid value by byte, max 6 bytes. 2: grab valid value by bytes section, max 3 sections.**
449 -* **c: define the position for valid value.  **
422 +* **c: define the position for valid value. **
450 450  )))
451 451  
452 452  Examples:
... ... @@ -453,130 +453,95 @@
453 453  
454 454  * Grab bytes:
455 455  
456 -[[image:1653271581490-837.png||height="313" width="722"]]
429 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image015.png]]
457 457  
458 458  * Grab a section.
459 459  
460 -[[image:1653271648378-342.png||height="326" width="720"]]
433 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image016.png]]
461 461  
462 462  * Grab different sections.
463 463  
464 -[[image:1653271657255-576.png||height="305" width="730"]]
437 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image017.png]]
465 465  
466 -(((
467 -(% style="color:red" %)**Note:**
468 -)))
469 469  
470 -(((
440 +Note:
441 +
471 471  AT+SEARCHx and AT+DATACUTx can be used together, if both commands are set, RS485-BL will first process AT+SEARCHx on the return string and get a temporary string, and then process AT+DATACUTx on this temporary string to get the final payload. In this case, AT+DATACUTx need to set to format AT+DATACUTx=0,xx,xx where the return bytes set to 0.
472 -)))
473 473  
474 -(((
475 -**Example:**
476 -)))
444 +Example:
477 477  
478 -(((
479 -(% style="color:red" %)AT+COMMAND1=11 01 1E D0,0
480 -)))
446 +AT+COMMAND1=11 01 1E D0,0
481 481  
482 -(((
483 -(% style="color:red" %)AT+SEARCH1=1,1E 56 34
484 -)))
448 +AT+SEARCH1=1,1E 56 34
485 485  
486 -(((
487 -(% style="color:red" %)AT+DATACUT1=0,2,1~~5
488 -)))
450 +AT+DATACUT1=0,2,1~~5
489 489  
490 -(((
491 -(% style="color:red" %)Return string from AT+COMMAND1: 16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49
492 -)))
452 +Return string from AT+COMMAND1: 16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49
493 493  
494 -(((
495 -(% style="color:red" %)String after SEARCH command: 2e 30 58 5f 36 41 30 31 00 49
496 -)))
454 +String after SEARCH command: 2e 30 58 5f 36 41 30 31 00 49
497 497  
498 -(((
499 -(% style="color:red" %)Valid payload after DataCUT command: 2e 30 58 5f 36
500 -)))
456 +Valid payload after DataCUT command: 2e 30 58 5f 36
501 501  
502 -[[image:1653271763403-806.png]]
458 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image018.png]]
503 503  
504 -=== 3.3.4 Compose the uplink payload ===
505 505  
506 -(((
461 +
462 +
463 +1.
464 +11.
465 +111. Compose the uplink payload
466 +
507 507  Through AT+COMMANDx and AT+DATACUTx we got valid value from each RS485 commands, Assume these valid value are RETURN1, RETURN2, .., to RETURNx. The next step is how to compose the LoRa Uplink Payload by these RETURNs. The command is **AT+DATAUP.**
508 -)))
509 509  
510 -(((
511 -(% style="color:#4f81bd" %)**Examples: AT+DATAUP=0**
512 -)))
513 513  
514 -(((
515 -Compose the uplink payload with value returns in sequence and send with (% style="color:red" %)**A SIGNLE UPLINK**.
516 -)))
470 +**Examples: AT+DATAUP=0**
517 517  
518 -(((
472 +Compose the uplink payload with value returns in sequence and send with **A SIGNLE UPLINK**.
473 +
519 519  Final Payload is
520 -)))
521 521  
522 -(((
523 -(% style="color:#4f81bd" %)Battery Info+PAYVER + VALID Value from RETURN1 + Valid Value from RETURN2 + … + RETURNx
524 -)))
476 +Battery Info+PAYVER + VALID Value from RETURN1 + Valid Value from RETURN2 + … + RETURNx
525 525  
526 -(((
527 527  Where PAYVER is defined by AT+PAYVER, below is an example screen shot.
528 -)))
529 529  
530 -[[image:1653272787040-634.png||height="515" width="719"]]
480 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image019.png]]
531 531  
532 -(((
533 -(% style="color:#4f81bd" %)**Examples: AT+DATAUP=1**
534 -)))
535 535  
536 -(((
537 -Compose the uplink payload with value returns in sequence and send with (% style="color:red" %)**Multiply UPLINKs**.
538 -)))
539 539  
540 -(((
484 +**Examples: AT+DATAUP=1**
485 +
486 +Compose the uplink payload with value returns in sequence and send with **Multiply UPLINKs**.
487 +
541 541  Final Payload is
542 -)))
543 543  
544 -(((
545 -(% style="color:#4f81bd" %)Battery Info+PAYVER + PAYLOAD COUNT + PAYLOAD# + DATA
546 -)))
490 +Battery Info+PAYVER + PAYLOAD COUNT + PAYLOAD# + DATA
547 547  
548 -1. (((
549 -Battery Info (2 bytes): Battery voltage
550 -)))
551 -1. (((
552 -PAYVER (1 byte): Defined by AT+PAYVER
553 -)))
554 -1. (((
555 -PAYLOAD COUNT (1 byte): Total how many uplinks of this sampling.
556 -)))
557 -1. (((
558 -PAYLOAD# (1 byte): Number of this uplink. (from 0,1,2,3…,to PAYLOAD COUNT)
559 -)))
560 -1. (((
561 -DATA: Valid value: max 6 bytes(US915 version here, Notice*!) for each uplink so each uplink <= 11 bytes. For the last uplink, DATA will might less than 6 bytes
562 -)))
492 +1. Battery Info (2 bytes): Battery voltage
493 +1. PAYVER (1 byte): Defined by AT+PAYVER
494 +1. PAYLOAD COUNT (1 byte): Total how many uplinks of this sampling.
495 +1. PAYLOAD# (1 byte): Number of this uplink. (from 0,1,2,3…,to PAYLOAD COUNT)
496 +1. DATA: Valid value: max 6 bytes(US915 version here, [[Notice*!>>path:#max_byte]]) for each uplink so each uplink <= 11 bytes. For the last uplink, DATA will might less than 6 bytes
563 563  
564 -[[image:1653272817147-600.png||height="437" width="717"]]
498 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image020.png]]
565 565  
500 +
566 566  So totally there will be 3 uplinks for this sampling, each uplink includes 6 bytes DATA
567 567  
568 -DATA1=RETURN1 Valid Value = (% style="background-color:#4f81bd; color:white" %) 20 20 0a 33 90 41
503 +DATA1=RETURN1 Valid Value = 20 20 0a 33 90 41
569 569  
570 -DATA2=1^^st^^ ~~ 6^^th^^ byte of Valid value of RETURN10= (% style="background-color:#4f81bd; color:white" %)02 aa 05 81 0a 20
505 +DATA2=1^^st^^ ~~ 6^^th^^ byte of Valid value of RETURN10= 02 aa 05 81 0a 20
571 571  
572 -DATA3=7^^th^^ ~~ 11^^th^^ bytes of Valid value of RETURN10 =(% style="background-color:#4f81bd; color:white" %) 20 20 20 2d 30
507 +DATA3=7^^th^^ ~~ 11^^th^^ bytes of Valid value of RETURN10 = 20 20 20 2d 30
573 573  
509 +
510 +
574 574  Below are the uplink payloads:
575 575  
576 -[[image:1653272901032-107.png]]
513 +[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image021.png]]
577 577  
578 -(% style="color:red" %)Notice: the Max bytes is according to the max support bytes in different Frequency Bands for lowest SF. As below:
579 579  
516 +Notice: the Max bytes is according to the max support bytes in different Frequency Bands for lowest SF. As below:
517 +
580 580   ~* For AU915/AS923 bands, if UplinkDwell time=0, max 51 bytes for each uplink ( so 51 -5 = 46 max valid date)
581 581  
582 582   * For AU915/AS923 bands, if UplinkDwell time=1, max 11 bytes for each uplink ( so 11 -5 = 6 max valid date).
... ... @@ -585,67 +585,53 @@
585 585  
586 586   ~* For all other bands: max 51 bytes for each uplink  ( so 51 -5 = 46 max valid date).
587 587  
588 -=== 3.3.5 Uplink on demand ===
589 589  
590 -(((
527 +
528 +1.
529 +11.
530 +111. Uplink on demand
531 +
591 591  Except uplink periodically, RS485-BL is able to uplink on demand. The server sends downlink command to RS485-BL and RS485 will uplink data base on the command.
592 -)))
593 593  
594 -(((
595 595  Downlink control command:
596 -)))
597 597  
598 -(((
599 -**0x08 command**: Poll an uplink with current command set in RS485-BL.
600 -)))
536 +[[0x08 command>>path:#downlink_08]]: Poll an uplink with current command set in RS485-BL.
601 601  
602 -(((
603 -**0xA8 command**: Send a command to RS485-BL and uplink the output from sensors.
604 -)))
538 +[[0xA8 command>>path:#downlink_A8]]: Send a command to RS485-BL and uplink the output from sensors.
605 605  
606 -=== 3.3.6 Uplink on Interrupt ===
607 607  
608 -Put the interrupt sensor between 3.3v_out and GPIO ext.
609 609  
610 -[[image:1653273818896-432.png]]
542 +1.
543 +11.
544 +111. Uplink on Interrupt
611 611  
612 -(((
546 +Put the interrupt sensor between 3.3v_out and GPIO ext.[[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image022.png]]
547 +
613 613  AT+INTMOD=0  Disable Interrupt
614 -)))
615 615  
616 -(((
617 617  AT+INTMOD=1  Interrupt trigger by rising or falling edge.
618 -)))
619 619  
620 -(((
621 621  AT+INTMOD=2  Interrupt trigger by falling edge. ( Default Value)
622 -)))
623 623  
624 -(((
625 625  AT+INTMOD=3  Interrupt trigger by rising edge.
626 -)))
627 627  
628 -== 3.4 Uplink Payload ==
629 629  
630 -(% border="1" style="background-color:#4f81bd; color:white; width:850px" %)
631 -|**Size(bytes)**|(% style="width:130px" %)**2**|(% style="width:93px" %)**1**|(% style="width:509px" %)**Length depends on the return from the commands**
632 -|Value|(% style="width:130px" %)(((
633 -(((
557 +1.
558 +11. Uplink Payload
559 +
560 +
561 +|**Size(bytes)**|**2**|**1**|**Length depends on the return from the commands**
562 +|Value|(((
634 634  Battery(mV)
635 -)))
636 636  
637 -(((
638 638  &
639 -)))
640 640  
641 -(((
642 642  Interrupt _Flag
643 -)))
644 -)))|(% style="width:93px" %)(((
568 +)))|(((
645 645  PAYLOAD_VER
646 646  
647 647  
648 -)))|(% style="width:509px" %)If the valid payload is too long and exceed the maximum support payload length in server, server will show payload not provided in the LoRaWAN server.
572 +)))|If the valid payload is too long and exceed the maximum support payload length in server, server will show payload not provided in the LoRaWAN server.
649 649  
650 650  Below is the decoder for the first 3 bytes. The rest bytes are dynamic depends on different RS485 sensors.
651 651  
... ... @@ -682,7 +682,7 @@
682 682  
683 683  [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image023.png]]
684 684  
685 -1.
609 +1.
686 686  11. Configure RS485-BL via AT or Downlink
687 687  
688 688  User can configure RS485-BL via [[AT Commands >>path:#_​Using_the_AT]]or LoRaWAN Downlink Commands
... ... @@ -693,10 +693,12 @@
693 693  
694 694  * **Sensor Related Commands**: These commands are special designed for RS485-BL.  User can see these commands below:
695 695  
620 +
696 696  1.
697 697  11.
698 698  111. Common Commands:
699 699  
625 +
700 700  They should be available for each of Dragino Sensors, such as: change uplink interval, reset device. For firmware v1.3, user can find what common commands it supports: [[http:~~/~~/wiki.dragino.com/index.php?title=End_Device_AT_Commands_and_Downlink_Commands>>url:http://wiki.dragino.com/index.php?title=End_Device_AT_Commands_and_Downlink_Commands]]
701 701  
702 702  
... ... @@ -704,6 +704,7 @@
704 704  11.
705 705  111. Sensor related commands:
706 706  
633 +
707 707  ==== Choose Device Type (RS485 or TTL) ====
708 708  
709 709  RS485-BL can connect to either RS485 sensors or TTL sensor. User need to specify what type of sensor need to connect.
... ... @@ -744,6 +744,7 @@
744 744  * XX XX XX XX: RS485 command total NN bytes
745 745  * YY: How many bytes will be uplink from the return of this RS485 command, if YY=0, RS485-BL will execute the downlink command without uplink; if YY>0, RS485-BL will uplink total YY bytes from the output of this RS485 command
746 746  
674 +
747 747  **Example 1:**
748 748  
749 749  To connect a Modbus Alarm with below commands.
... ... @@ -852,6 +852,7 @@
852 852  
853 853  * AT+MBFUN=0: Disable Modbus fast reading.
854 854  
783 +
855 855  Example:
856 856  
857 857  * AT+MBFUN=1 and AT+DATACUT1/AT+DATACUT2 are not configure (0,0,0).
... ... @@ -936,7 +936,7 @@
936 936  
937 937  Etc. AT+CMDEAR=1,10 means erase AT+COMMAND1/AT+DATACUT1 to AT+COMMAND10/AT+DATACUT10
938 938  
939 -Example screen shot after clear all RS485 commands. 
868 +Example screen shot after clear all RS485 commands.
940 940  
941 941  
942 942  
... ... @@ -980,6 +980,7 @@
980 980  * A7 01 00 60   same as AT+BAUDR=9600
981 981  * A7 01 04 80  same as AT+BAUDR=115200
982 982  
912 +
983 983  A7 02 aa: Same as  AT+PARITY=aa  (aa value: 00 , 01 or 02)
984 984  
985 985  A7 03 aa: Same as  AT+STOPBIT=aa  (aa value: 00 , 01 or 02)
... ... @@ -1010,15 +1010,17 @@
1010 1010  1.
1011 1011  11. Buttons
1012 1012  
943 +
1013 1013  |**Button**|**Feature**
1014 1014  |**RST**|Reboot RS485-BL
1015 1015  
947 +
1016 1016  1.
1017 1017  11. +3V3 Output
1018 1018  
1019 1019  RS485-BL has a Controllable +3V3 output, user can use this output to power external sensor.
1020 1020  
1021 -The +3V3 output will be valid for every sampling. RS485-BL will enable +3V3 output before all sampling and disable the +3V3 after all sampling. 
953 +The +3V3 output will be valid for every sampling. RS485-BL will enable +3V3 output before all sampling and disable the +3V3 after all sampling.
1022 1022  
1023 1023  
1024 1024  The +3V3 output time can be controlled by AT Command.
... ... @@ -1036,7 +1036,7 @@
1036 1036  
1037 1037  RS485-BL has a Controllable +5V output, user can use this output to power external sensor.
1038 1038  
1039 -The +5V output will be valid for every sampling. RS485-BL will enable +5V output before all sampling and disable the +5v after all sampling. 
971 +The +5V output will be valid for every sampling. RS485-BL will enable +5V output before all sampling and disable the +5v after all sampling.
1040 1040  
1041 1041  
1042 1042  The 5V output time can be controlled by AT Command.
... ... @@ -1057,6 +1057,7 @@
1057 1057  |**LEDs**|**Feature**
1058 1058  |**LED1**|Blink when device transmit a packet.
1059 1059  
992 +
1060 1060  1.
1061 1061  11. Switch Jumper
1062 1062  
... ... @@ -1078,6 +1078,7 @@
1078 1078  
1079 1079  1. Case Study
1080 1080  
1014 +
1081 1081  User can check this URL for some case studies.
1082 1082  
1083 1083  [[http:~~/~~/wiki.dragino.com/index.php?title=APP_RS485_COMMUNICATE_WITH_SENSORS>>url:http://wiki.dragino.com/index.php?title=APP_RS485_COMMUNICATE_WITH_SENSORS]]
... ... @@ -1165,6 +1165,7 @@
1165 1165  * For bug fix
1166 1166  * Change LoRaWAN bands.
1167 1167  
1102 +
1168 1168  Below shows the hardware connection for how to upload an image to RS485-BL:
1169 1169  
1170 1170  [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image030.png]]
... ... @@ -1208,6 +1208,7 @@
1208 1208  1.
1209 1209  11. How many RS485-Slave can RS485-BL connects?
1210 1210  
1146 +
1211 1211  The RS485-BL can support max 32 RS485 devices. Each uplink command of RS485-BL can support max 16 different RS485 command. So RS485-BL can support max 16 RS485 devices pre-program in the device for uplink. For other devices no pre-program, user can use the [[downlink message (type code 0xA8) to poll their info>>path:#downlink_A8]].
1212 1212  
1213 1213  
... ... @@ -1218,7 +1218,7 @@
1218 1218  
1219 1219  Please see this link for debug:
1220 1220  
1221 -[[http:~~/~~/wiki.dragino.com/index.php?title=Main_Page#LoRaWAN_Communication_Debug>>url:http://wiki.dragino.com/index.php?title=Main_Page#LoRaWAN_Communication_Debug]] 
1157 +[[http:~~/~~/wiki.dragino.com/index.php?title=Main_Page#LoRaWAN_Communication_Debug>>url:http://wiki.dragino.com/index.php?title=Main_Page#LoRaWAN_Communication_Debug]]
1222 1222  
1223 1223  
1224 1224  
... ... @@ -1233,6 +1233,7 @@
1233 1233  
1234 1234  1. Order Info
1235 1235  
1172 +
1236 1236  **Part Number: RS485-BL-XXX**
1237 1237  
1238 1238  **XXX:**
... ... @@ -1248,6 +1248,7 @@
1248 1248  * **RU864**: frequency bands RU864
1249 1249  * **KZ865: **frequency bands KZ865
1250 1250  
1188 +
1251 1251  1. Packing Info
1252 1252  
1253 1253  **Package Includes**:
... ... @@ -1256,6 +1256,7 @@
1256 1256  * Stick Antenna for LoRa RF part x 1
1257 1257  * Program cable x 1
1258 1258  
1197 +
1259 1259  **Dimension and weight**:
1260 1260  
1261 1261  * Device Size: 13.5 x 7 x 3 cm
... ... @@ -1263,6 +1263,7 @@
1263 1263  * Package Size / pcs : 14.5 x 8 x 5 cm
1264 1264  * Weight / pcs : 170g
1265 1265  
1205 +
1266 1266  1. Support
1267 1267  
1268 1268  * Support is provided Monday to Friday, from 09:00 to 18:00 GMT+8. Due to different timezones we cannot offer live support. However, your questions will be answered as soon as possible in the before-mentioned schedule.
1652953304999-717.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -139.7 KB
Content
1652953414711-647.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -119.3 KB
Content
1652953462722-299.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -202.7 KB
Content
1652953542269-423.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -118.5 KB
Content
1652953553383-907.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -94.0 KB
Content
1652953568895-172.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -109.3 KB
Content
1652954654347-831.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -138.7 KB
Content
1653271044481-711.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -27.8 KB
Content
1653271276735-972.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -26.6 KB
Content
1653271581490-837.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -138.7 KB
Content
1653271648378-342.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -131.4 KB
Content
1653271657255-576.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -142.6 KB
Content
1653271763403-806.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -27.7 KB
Content
1653272787040-634.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -294.0 KB
Content
1653272817147-600.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -143.3 KB
Content
1653272901032-107.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -197.8 KB
Content
1653273818896-432.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -31.6 KB
Content
image-20220519174512-1.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -32.2 KB
Content
image-20220519174512-2.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -42.7 KB
Content
image-20220519174512-3.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -36.3 KB
Content
image-20220519174512-4.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Xiaoling
Size
... ... @@ -1,1 +1,0 @@
1 -19.1 KB
Content