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

From version 40.34
edited by Xiaoling
on 2022/06/06 09:53
Change comment: There is no comment for this version
To version 41.6
edited by Xiaoling
on 2022/06/06 10:56
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -94,7 +94,6 @@
94 94  * 127 dB Dynamic Range RSSI.
95 95  * Automatic RF Sense and CAD with ultra-fast AFC. ​​​
96 96  
97 -
98 98  == 1.3 Features ==
99 99  
100 100  * LoRaWAN Class A & Class C protocol (default Class A)
... ... @@ -106,7 +106,6 @@
106 106  * Support Modbus protocol
107 107  * Support Interrupt uplink
108 108  
109 -
110 110  == 1.4 Applications ==
111 111  
112 112  * Smart Buildings & Home Automation
... ... @@ -116,7 +116,6 @@
116 116  * Smart Cities
117 117  * Smart Factory
118 118  
119 -
120 120  == 1.5 Firmware Change log ==
121 121  
122 122  [[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);"]]
... ... @@ -261,83 +261,132 @@
261 261  
262 262  === 3.3.1 onfigure UART settings for RS485 or TTL communication ===
263 263  
261 +(((
264 264  RS485-BL can connect to either RS485 sensors or TTL sensor. User need to specify what type of sensor need to connect.
263 +)))
265 265  
265 +(((
266 266  **~1. RS485-MODBUS mode:**
267 +)))
267 267  
269 +(((
268 268  AT+MOD=1 ~/~/ Support RS485-MODBUS type sensors. User can connect multiply RS485 , Modbus sensors to the A / B pins.
271 +)))
269 269  
273 +(((
270 270  **2. TTL mode:**
275 +)))
271 271  
277 +(((
272 272  AT+MOD=2 ~/~/ Support TTL Level sensors, User can connect one TTL Sensor to the TXD/RXD/GND pins.
279 +)))
273 273  
281 +(((
274 274  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.
283 +)))
275 275  
276 -(% border="1" style="background-color:#ffffcc; color:green; width:795px" %)
277 -|(((
285 +(% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:510px" %)
286 +|=(% style="width: 120px;" %)(((
287 +(((
278 278  **AT Commands**
279 -)))|(% style="width:285px" %)(((
289 +)))
290 +)))|=(% style="width: 190px;" %)(((
291 +(((
280 280  **Description**
281 -)))|(% style="width:347px" %)(((
293 +)))
294 +)))|=(% style="width: 190px;" %)(((
295 +(((
282 282  **Example**
283 283  )))
284 -|(((
298 +)))
299 +|(% style="width:120px" %)(((
300 +(((
285 285  AT+BAUDR
286 -)))|(% style="width:285px" %)(((
302 +)))
303 +)))|(% style="width:190px" %)(((
304 +(((
287 287  Set the baud rate (for RS485 connection). Default Value is: 9600.
288 -)))|(% style="width:347px" %)(((
306 +)))
307 +)))|(% style="width:190px" %)(((
289 289  (((
309 +(((
290 290  AT+BAUDR=9600
291 291  )))
312 +)))
292 292  
293 293  (((
315 +(((
294 294  Options: (1200,2400,4800,14400,19200,115200)
295 295  )))
296 296  )))
297 -|(((
319 +)))
320 +|(% style="width:120px" %)(((
321 +(((
298 298  AT+PARITY
299 -)))|(% style="width:285px" %)(((
323 +)))
324 +)))|(% style="width:190px" %)(((
300 300  (((
326 +(((
301 301  Set UART parity (for RS485 connection)
302 302  )))
329 +)))
303 303  
304 304  (((
332 +(((
305 305  Default Value is: no parity.
306 306  )))
307 -)))|(% style="width:347px" %)(((
335 +)))
336 +)))|(% style="width:190px" %)(((
308 308  (((
338 +(((
309 309  AT+PARITY=0
310 310  )))
341 +)))
311 311  
312 312  (((
344 +(((
313 313  Option: 0: no parity, 1: odd parity, 2: even parity
314 314  )))
315 315  )))
316 -|(((
348 +)))
349 +|(% style="width:120px" %)(((
350 +(((
317 317  AT+STOPBIT
318 -)))|(% style="width:285px" %)(((
352 +)))
353 +)))|(% style="width:190px" %)(((
319 319  (((
355 +(((
320 320  Set serial stopbit (for RS485 connection)
321 321  )))
358 +)))
322 322  
323 323  (((
361 +(((
324 324  Default Value is: 1bit.
325 325  )))
326 -)))|(% style="width:347px" %)(((
364 +)))
365 +)))|(% style="width:190px" %)(((
327 327  (((
367 +(((
328 328  AT+STOPBIT=0 for 1bit
329 329  )))
370 +)))
330 330  
331 331  (((
373 +(((
332 332  AT+STOPBIT=1 for 1.5 bit
333 333  )))
376 +)))
334 334  
335 335  (((
379 +(((
336 336  AT+STOPBIT=2 for 2 bits
337 337  )))
338 338  )))
383 +)))
339 339  
340 340  
386 +
341 341  === 3.3.2 Configure sensors ===
342 342  
343 343  (((
... ... @@ -348,19 +348,20 @@
348 348  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.
349 349  )))
350 350  
351 -(% border="1" style="background-color:#ffffcc; color:green; width:806px" %)
352 -|**AT Commands**|(% style="width:418px" %)**Description**|(% style="width:256px" %)**Example**
353 -|AT+CFGDEV|(% style="width:418px" %)(((
397 +(% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:510px" %)
398 +|=(% style="width: 120px;" %)**AT Commands**|=(% style="width: 190px;" %)**Description**|=(% style="width: 190px;" %)**Example**
399 +|AT+CFGDEV|(% style="width:120px" %)(((
354 354  This command is used to configure the RS485/TTL devices; they won’t be used during sampling.
355 355  
356 356  AT+CFGDEV=xx xx xx xx xx xx xx xx xx xx xx xx,
357 357  
358 358  mm: 0: no CRC, 1: add CRC-16/MODBUS in the end of this command
359 -)))|(% style="width:256px" %)AT+CFGDEV=xx xx xx xx xx xx xx xx xx xx xx xx,m
405 +)))|(% style="width:190px" %)AT+CFGDEV=xx xx xx xx xx xx xx xx xx xx xx xx,m
360 360  
361 361  Detail of AT+CFGDEV command see [[AT+CFGDEV detail>>||anchor="HRS485DebugCommand28AT2BCFGDEV29"]].
362 362  
363 363  
410 +
364 364  === 3.3.3 Configure read commands for each sampling ===
365 365  
366 366  (((
... ... @@ -427,117 +427,209 @@
427 427  After we got the valid value from each RS485 commands, we need to combine them together with the command **AT+DATAUP**.
428 428  )))
429 429  
477 +(((
430 430  **Examples:**
479 +)))
431 431  
481 +(((
432 432  Below are examples for the how above AT Commands works.
483 +)))
433 433  
485 +(((
434 434  **AT+COMMANDx : **This command will be sent to RS485/TTL devices during each sampling, Max command length is 14 bytes. The grammar is:
487 +)))
435 435  
436 -(% border="1" class="table-bordered" style="background-color:#4f81bd; color:white; width:501px" %)
489 +(% border="1" class="table-bordered" style="background-color:#4f81bd; color:white; width:500px" %)
437 437  |(% style="width:498px" %)(((
491 +(((
438 438  **AT+COMMANDx=xx xx xx xx xx xx xx xx xx xx xx xx,m**
493 +)))
439 439  
495 +(((
440 440  **xx xx xx xx xx xx xx xx xx xx xx xx: The RS485 command to be sent**
497 +)))
441 441  
499 +(((
442 442  **m: 0: no CRC, 1: add CRC-16/MODBUS in the end of this command**
443 443  )))
502 +)))
444 444  
504 +(((
445 445  For example, if we have a RS485 sensor. The command to get sensor value is: 01 03 0B B8 00 02 46 0A. Where 01 03 0B B8 00 02 is the Modbus command to read the register 0B B8 where stored the sensor value. The 46 0A is the CRC-16/MODBUS which calculate manually.
506 +)))
446 446  
508 +(((
447 447  In the RS485-BL, we should use this command AT+COMMAND1=01 03 0B B8 00 02,1 for the same.
510 +)))
448 448  
512 +(((
449 449  **AT+SEARCHx**: This command defines how to handle the return from AT+COMMANDx.
514 +)))
450 450  
451 -(% border="1" class="table-bordered" style="background-color:#4f81bd; color:white; width:580px" %)
516 +(% border="1" class="table-bordered" style="background-color:#4f81bd; color:white; width:500px" %)
452 452  |(% style="width:577px" %)(((
518 +(((
453 453  **AT+SEARCHx=aa,xx xx xx xx xx**
520 +)))
454 454  
455 -* **aa: 1: prefix match mode; 2: prefix and suffix match mode**
456 -* **xx xx xx xx xx: match string. Max 5 bytes for prefix and 5 bytes for suffix**
522 +* (((
523 +**aa: 1: prefix match mode; 2: prefix and suffix match mode**
457 457  )))
525 +* (((
526 +**xx xx xx xx xx: match string. Max 5 bytes for prefix and 5 bytes for suffix**
527 +)))
528 +)))
458 458  
530 +(((
459 459  **Examples:**
532 +)))
460 460  
534 +(((
461 461  1)For a return string from AT+COMMAND1: 16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49
536 +)))
462 462  
538 +(((
463 463  If we set AT+SEARCH1=1,1E 56 34.      (max 5 bytes for prefix)
540 +)))
464 464  
542 +(((
465 465  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**
544 +)))
466 466  
546 +(((
467 467  [[image:1653271044481-711.png]]
548 +)))
468 468  
550 +(((
469 469  2)For a return string from AT+COMMAND1:  16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49
552 +)))
470 470  
554 +(((
471 471  If we set AT+SEARCH1=2, 1E 56 34+31 00 49
556 +)))
472 472  
558 +(((
473 473  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**
560 +)))
474 474  
562 +(((
475 475  [[image:1653271276735-972.png]]
564 +)))
476 476  
566 +(((
477 477  **AT+DATACUTx : **This command defines how to handle the return from AT+COMMANDx, max return length is 45 bytes.
568 +)))
478 478  
479 -(% style="background-color:#4f81bd; color:white; width:729px" %)
570 +(% style="background-color:#4f81bd; color:white; width:510px" %)
480 480  |(% style="width:726px" %)(((
572 +(((
481 481  **AT+DATACUTx=a,b,c**
574 +)))
482 482  
483 -* **a: length for the return of AT+COMMAND**
484 -* **b:1: grab valid value by byte, max 6 bytes. 2: grab valid value by bytes section, max 3 sections.**
485 -* **c: define the position for valid value.  **
576 +* (((
577 +**a: length for the return of AT+COMMAND**
486 486  )))
579 +* (((
580 +**b:1: grab valid value by byte, max 6 bytes. 2: grab valid value by bytes section, max 3 sections.**
581 +)))
582 +* (((
583 +**c: define the position for valid value.  **
584 +)))
585 +)))
487 487  
587 +(((
488 488  **Examples:**
589 +)))
489 489  
490 -* Grab bytes:
591 +* (((
592 +Grab bytes:
593 +)))
491 491  
595 +(((
492 492  [[image:1653271581490-837.png||height="313" width="722"]]
597 +)))
493 493  
599 +(((
600 +
601 +)))
494 494  
495 -* Grab a section.
603 +* (((
604 +Grab a section.
605 +)))
496 496  
607 +(((
497 497  [[image:1653271648378-342.png||height="326" width="720"]]
609 +)))
498 498  
611 +(((
612 +
613 +)))
499 499  
500 -* Grab different sections.
615 +* (((
616 +Grab different sections.
617 +)))
501 501  
619 +(((
502 502  [[image:1653271657255-576.png||height="305" width="730"]]
621 +)))
503 503  
504 504  (((
624 +(((
505 505  (% style="color:red" %)**Note:**
506 506  )))
627 +)))
507 507  
508 508  (((
630 +(((
509 509  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.
510 510  )))
633 +)))
511 511  
512 512  (((
636 +(((
513 513  **Example:**
514 514  )))
639 +)))
515 515  
516 516  (((
642 +(((
517 517  (% style="color:red" %)AT+COMMAND1=11 01 1E D0,0
518 518  )))
645 +)))
519 519  
520 520  (((
648 +(((
521 521  (% style="color:red" %)AT+SEARCH1=1,1E 56 34
522 522  )))
651 +)))
523 523  
524 524  (((
654 +(((
525 525  (% style="color:red" %)AT+DATACUT1=0,2,1~~5
526 526  )))
657 +)))
527 527  
528 528  (((
660 +(((
529 529  (% style="color:red" %)Return string from AT+COMMAND1: 16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49
530 530  )))
663 +)))
531 531  
532 532  (((
666 +(((
533 533  (% style="color:red" %)String after SEARCH command: 2e 30 58 5f 36 41 30 31 00 49
534 534  )))
669 +)))
535 535  
536 536  (((
672 +(((
537 537  (% style="color:red" %)Valid payload after DataCUT command: 2e 30 58 5f 36
538 538  )))
675 +)))
539 539  
677 +(((
540 540  [[image:1653271763403-806.png]]
679 +)))
541 541  
542 542  
543 543  === 3.3.4 Compose the uplink payload ===
... ... @@ -544,10 +544,14 @@
544 544  
545 545  (((
546 546  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.**
686 +
687 +
547 547  )))
548 548  
549 549  (((
550 550  (% style="color:#037691" %)**Examples: AT+DATAUP=0**
692 +
693 +
551 551  )))
552 552  
553 553  (((
... ... @@ -680,26 +680,8 @@
680 680  
681 681  == 3.4 Uplink Payload ==
682 682  
683 -(% border="1" style="background-color:#4f81bd; color:white; width:850px" %)
684 -|**Size(bytes)**|(% style="width:130px" %)**2**|(% style="width:93px" %)**1**|(% style="width:509px" %)**Length depends on the return from the commands**
685 -|Value|(% style="width:130px" %)(((
686 -(((
687 -Battery(mV)
688 -)))
826 +[[image:image-20220606105412-1.png]]
689 689  
690 -(((
691 -&
692 -)))
693 -
694 -(((
695 -Interrupt _Flag
696 -)))
697 -)))|(% style="width:93px" %)(((
698 -PAYLOAD_VER
699 -
700 -
701 -)))|(% 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.
702 -
703 703  Below is the decoder for the first 3 bytes. The rest bytes are dynamic depends on different RS485 sensors.
704 704  
705 705  (((
... ... @@ -766,6 +766,7 @@
766 766  * (% style="color:#4f81bd" %)**Sensor Related Commands**(%%): These commands are special designed for RS485-BL.  User can see these commands below:
767 767  
768 768  
894 +
769 769  === 3.5.1 Common Commands: ===
770 770  
771 771  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: [[End Device AT Commands and Downlink Command>>doc:Main.End Device AT Commands and Downlink Command.WebHome]]
... ... @@ -797,6 +797,7 @@
797 797  
798 798  
799 799  
926 +
800 800  ==== **RS485 Debug Command (AT+CFGDEV)** ====
801 801  
802 802  This command is used to configure the RS485 or TTL sensors; they won’t be used during sampling.
... ... @@ -848,6 +848,7 @@
848 848  
849 849  
850 850  
978 +
851 851  ==== **Set Payload version** ====
852 852  
853 853  This is the first byte of the uplink payload. RS485-BL can connect to different sensors. User can set the PAYVER field to tell server how to decode the current payload.
... ... @@ -1125,7 +1125,6 @@
1125 1125  |=(% style="width: 89px;" %)**Button**|=(% style="width: 141px;" %)**Feature**
1126 1126  |(% style="width:89px" %)**RST**|(% style="width:141px" %)Reboot RS485-BL
1127 1127  
1128 -
1129 1129  == 3.7 +3V3 Output ==
1130 1130  
1131 1131  RS485-BL has a Controllable +3V3 output, user can use this output to power external sensor.
... ... @@ -1166,7 +1166,6 @@
1166 1166  |=**LEDs**|=(% style="width: 274px;" %)**Feature**
1167 1167  |**LED1**|(% style="width:274px" %)Blink when device transmit a packet.
1168 1168  
1169 -
1170 1170  == 3.10 Switch Jumper ==
1171 1171  
1172 1172  (% border="1" style="background-color:#ffffcc; color:green; width:515px" %)
... ... @@ -1354,8 +1354,6 @@
1354 1354  * (% style="color:blue" %)**RU864**(%%): frequency bands RU864
1355 1355  * (% style="color:blue" %)**KZ865**(%%): frequency bands KZ865
1356 1356  
1357 -
1358 -
1359 1359  = 9. Packing Info =
1360 1360  
1361 1361  (((
image-20220606105412-1.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +13.9 KB
Content