<
From version < 102.14 >
edited by Xiaoling
on 2023/04/25 13:41
To version < 97.3 >
edited by Xiaoling
on 2022/11/30 14:59
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -28,7 +28,7 @@
28 28  
29 29  
30 30  
31 -= 1. Introduction =
31 += 1.Introduction =
32 32  
33 33  == 1.1 What is RS485-LN RS485 to LoRaWAN Converter ==
34 34  
... ... @@ -128,6 +128,7 @@
128 128  [[RS485-LN Image files – Download link and Change log>>url:http://www.dragino.com/downloads/index.php?dir=RS485-LN/]]
129 129  
130 130  
131 +
131 131  == 1.6 Hardware Change log ==
132 132  
133 133  
... ... @@ -288,17 +288,17 @@
288 288  To use RS485-LN to read data from RS485 sensors, connect the RS485-LN A/B traces to the sensors. And user need to make sure RS485-LN use the match UART setting to access the sensors. The related commands for UART settings are:
289 289  
290 290  
291 -(% border="1" cellspacing="5" style="background-color:#f2f2f2; width:510px" %)
292 -|=(% style="width: 119px; background-color: rgb(217, 226, 243); color: rgb(0, 112, 192);" %)(((
292 +(% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:510px" %)
293 +|=(% style="width: 110px;" %)(((
293 293  **AT Commands**
294 -)))|=(% style="width: 116px; background-color: rgb(217, 226, 243); color: rgb(0, 112, 192);" %)(((
295 +)))|=(% style="width: 210px;" %)(((
295 295  **Description**
296 -)))|=(% style="width: 190px;background-color:#D9E2F3;color:#0070C0" %)(((
297 +)))|=(% style="width: 190px;" %)(((
297 297  **Example**
298 298  )))
299 -|(% style="width:119px" %)(((
300 +|(% style="width:110px" %)(((
300 300  AT+BAUDR
301 -)))|(% style="width:116px" %)(((
302 +)))|(% style="width:190px" %)(((
302 302  Set the baud rate (for RS485 connection). Default Value is: 9600.
303 303  )))|(% style="width:190px" %)(((
304 304  (((
... ... @@ -309,9 +309,9 @@
309 309  Options: (1200,2400,4800,14400,19200,115200)
310 310  )))
311 311  )))
312 -|(% style="width:119px" %)(((
313 +|(% style="width:110px" %)(((
313 313  AT+PARITY
314 -)))|(% style="width:116px" %)(((
315 +)))|(% style="width:190px" %)(((
315 315  Set UART parity (for RS485 connection)
316 316  )))|(% style="width:190px" %)(((
317 317  (((
... ... @@ -322,9 +322,9 @@
322 322  Option: 0: no parity, 1: odd parity, 2: even parity
323 323  )))
324 324  )))
325 -|(% style="width:119px" %)(((
326 +|(% style="width:110px" %)(((
326 326  AT+STOPBIT
327 -)))|(% style="width:116px" %)(((
328 +)))|(% style="width:190px" %)(((
328 328  (((
329 329  Set serial stopbit (for RS485 connection)
330 330  )))
... ... @@ -359,9 +359,9 @@
359 359  )))
360 360  )))
361 361  
362 -(% border="1" cellspacing="5" style="background-color:#f2f2f2; width:510px" %)
363 -|=(% style="width: 122px; background-color:#D9E2F3;color:#0070C0" %)**AT Commands**|=(% style="width: 198px; background-color:#D9E2F3;color:#0070C0" %)**Description**|=(% style="width: 190px;background-color:#D9E2F3;color:#0070C0" %)**Example**
364 -|(% style="width:122px" %)AT+CFGDEV|(% style="width:196px" %)(((
363 +(% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:510px" %)
364 +|=(% style="width: 110px;" %)**AT Commands**|=(% style="width: 210px;" %)**Description**|=(% style="width: 190px;" %)**Example**
365 +|AT+CFGDEV|(% style="width:110px" %)(((
365 365  (((
366 366  This command is used to configure the RS485/TTL devices; they won’t be used during sampling.
367 367  )))
... ... @@ -407,7 +407,7 @@
407 407  
408 408  (% style="color:#037691" %)**AT+COMMANDx **(%%)**: **This command will be sent to RS485 devices during each sampling, Max command length is 14 bytes. The grammar is:
409 409  
410 -(% border="1" style="background-color:#f2f2f2; width:499px" %)
411 +(% border="1" style="background-color:#4bacc6; color:white; width:499px" %)
411 411  |(% style="width:496px" %)(((
412 412  **AT+COMMANDx=xx xx xx xx xx xx xx xx xx xx xx xx,m**
413 413  
... ... @@ -423,7 +423,7 @@
423 423  
424 424  (% style="color:#037691" %)**AT+DATACUTx **(%%)**: **This command defines how to handle the return from AT+COMMANDx, max return length is 100 bytes.
425 425  
426 -(% border="1" style="background-color:#f2f2f2; width:510px" %)
427 +(% border="1" style="background-color:#4bacc6; color:white; width:510px" %)
427 427  |(% style="width:510px" %)(((
428 428  **AT+DATACUTx=a,b,c**
429 429  
... ... @@ -565,11 +565,11 @@
565 565  == 3.4 Uplink Payload ==
566 566  
567 567  
568 -(% border="1" cellspacing="5" style="background-color:#f2f2f2; width:510px" %)
569 -|=(% scope="row" style="width: 60px;background-color:#D9E2F3;color:#0070C0" %)(((
569 +(% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:500px" %)
570 +|=(% scope="row" style="width: 60px;" %)(((
570 570  Size(bytes)
571 -)))|(% style="background-color:#d9e2f3; color:#0070c0; width:80px" %)**1**|(% style="background-color:#d9e2f3; color:#0070c0; width:360px" %)(((
572 -**Length depends on the return from the commands**
572 +)))|(% style="width:80px" %)1|(% style="width:360px" %)(((
573 +Length depends on the return from the commands
573 573  )))
574 574  |=(% style="width: 90px;" %)(((
575 575  Value
... ... @@ -614,6 +614,7 @@
614 614  )))
615 615  
616 616  
618 +
617 617  === 3.5.1 Common Commands ===
618 618  
619 619  
... ... @@ -759,6 +759,7 @@
759 759  
760 760  
761 761  
764 +
762 762  ==== (% style="color:blue" %)**Set Payload version**(%%) ====
763 763  
764 764  
... ... @@ -801,6 +801,7 @@
801 801  
802 802  
803 803  
807 +
804 804  ==== (% style="color:blue" %)**Set RS485 Sampling Commands**(%%) ====
805 805  
806 806  
... ... @@ -885,6 +885,7 @@
885 885  
886 886  
887 887  
892 +
888 888  ==== (% style="color:blue" %)**Fast command to handle MODBUS device**(%%) ====
889 889  
890 890  
... ... @@ -928,6 +928,7 @@
928 928  
929 929  
930 930  
936 +
931 931  ==== (% style="color:blue" %)**RS485 command timeout**(%%) ====
932 932  
933 933  
... ... @@ -964,7 +964,7 @@
964 964  )))
965 965  
966 966  (((
967 -(% style="color:#4472c4" %)** 0x AA aa bb cc**(%%) Same as: AT+CMDDLaa=hex (bb cc)
973 +(% style="color:#4472c4" %)** 0x AA aa bb cc**(%%) Same as: AT+CMDDLaa=hex(bb cc)*1000
968 968  )))
969 969  
970 970  (((
... ... @@ -974,11 +974,12 @@
974 974  )))
975 975  
976 976  (((
977 -**0xAA 01 03 E8**  ~-~-> Same as  **AT+CMDDL1=1000 ms**
983 +**0xAA 01 00 01**  ~-~-> Same as  **AT+CMDDL1=1000 ms**
978 978  )))
979 979  
980 980  
981 981  
988 +
982 982  ==== (% style="color:blue" %)**Uplink payload mode**(%%) ====
983 983  
984 984  
... ... @@ -1033,6 +1033,7 @@
1033 1033  
1034 1034  
1035 1035  
1043 +
1036 1036  ==== (% style="color:blue" %)**Manually trigger an Uplink**(%%) ====
1037 1037  
1038 1038  
... ... @@ -1062,6 +1062,7 @@
1062 1062  
1063 1063  
1064 1064  
1073 +
1065 1065  ==== (% style="color:blue" %)**Clear RS485 Command**(%%) ====
1066 1066  
1067 1067  
... ... @@ -1110,6 +1110,7 @@
1110 1110  
1111 1111  
1112 1112  
1122 +
1113 1113  ==== (% style="color:blue" %)**Set Serial Communication Parameters**(%%) ====
1114 1114  
1115 1115  
... ... @@ -1193,7 +1193,7 @@
1193 1193  
1194 1194  
1195 1195  
1196 -==== (% style="color:blue" %)**Encrypted payload(Since Version 1.4.0)**(%%) ====
1206 +==== (% style="color:blue" %)**Encrypted payload**(%%) ====
1197 1197  
1198 1198  (((
1199 1199  
... ... @@ -1209,9 +1209,10 @@
1209 1209  
1210 1210  
1211 1211  
1212 -==== (% style="color:blue" %)**Get sensor value(Since Version 1.4.0)**(%%) ====
1213 1213  
1223 +==== (% style="color:blue" %)**Get sensor value**(%%) ====
1214 1214  
1225 +
1215 1215  * (((
1216 1216  (% style="color:#037691" %)** AT Command:**
1217 1217  )))
... ... @@ -1222,9 +1222,10 @@
1222 1222  
1223 1223  
1224 1224  
1225 -==== (% style="color:blue" %)**Resets the downlink packet count(Since Version 1.4.0)**(%%) ====
1226 1226  
1237 +==== (% style="color:blue" %)**Resets the downlink packet count**(%%) ====
1227 1227  
1239 +
1228 1228  * (((
1229 1229  (% style="color:#037691" %)** AT Command:**
1230 1230  )))
... ... @@ -1235,9 +1235,10 @@
1235 1235  
1236 1236  
1237 1237  
1238 -==== (% style="color:blue" %)**When the limit bytes are exceeded, upload in batches(Since Version 1.4.0)**(%%) ====
1239 1239  
1251 +==== (% style="color:blue" %)**When the limit bytes are exceeded, upload in batches**(%%) ====
1240 1240  
1253 +
1241 1241  * (((
1242 1242  (% style="color:#037691" %)** AT Command:**
1243 1243  )))
... ... @@ -1255,9 +1255,10 @@
1255 1255  
1256 1256  
1257 1257  
1258 -==== (% style="color:blue" %)**Copy downlink to uplink (Since Version 1.4.0)**(%%) ====
1259 1259  
1272 +==== (% style="color:blue" %)** Copy downlink to uplink **(%%) ====
1260 1260  
1274 +
1261 1261  * (((
1262 1262  (% style="color:#037691" %)** AT Command:**
1263 1263  )))
... ... @@ -1279,9 +1279,10 @@
1279 1279  
1280 1280  
1281 1281  
1282 -==== (% style="color:blue" %)**Query version number and frequency band 、TDC(Since Version 1.4.0)**(%%) ====
1283 1283  
1297 +==== (% style="color:blue" %)**Query version number and frequency band 、TDC**(%%) ====
1284 1284  
1299 +
1285 1285  (((
1286 1286  * (% style="color:#037691" %)**Downlink Payload:**
1287 1287  
... ... @@ -1296,9 +1296,10 @@
1296 1296  
1297 1297  
1298 1298  
1299 -==== (% style="color:blue" %)** Monitor RS485 communication of other devices(Since Version 1.4.0)**(%%) ====
1300 1300  
1315 +==== (% style="color:blue" %)** Monitor RS485 communication of other devices**(%%) ====
1301 1301  
1317 +
1302 1302  * (((
1303 1303  (% style="color:#037691" %)** AT Command:**
1304 1304  )))
... ... @@ -1340,32 +1340,34 @@
1340 1340  To enable the listening mode, use can run the command (% style="color:#4472c4" %)** AT+RXMODE**.
1341 1341  )))
1342 1342  
1359 +(((
1360 +
1361 +)))
1343 1343  
1344 -
1345 -(% border="1" cellspacing="5" style="background-color:#f2f2f2; width:510px" %)
1346 -|=(% style="width: 156px; background-color:#D9E2F3;color:#0070C0" %)(((
1363 +(% border="1" cellspacing="10" style="background-color:#ffffcc; width:500px" %)
1364 +|=(% style="width: 100px;" %)(((
1347 1347  **Command example**
1348 -)))|=(% style="width: 355px; background-color:#D9E2F3;color:#0070C0" %)(((
1366 +)))|=(% style="width: 400px;" %)(((
1349 1349  **Function**
1350 1350  )))
1351 -|(% style="width:156px" %)(((
1369 +|(% style="width:100px" %)(((
1352 1352  AT+RXMODE=1,10
1353 -)))|(% style="width:352px" %)(((
1371 +)))|(% style="width:400px" %)(((
1354 1354  Enable listening mode 1, if RS485-LN has received more than 10 RS485 commands from the network. RS485-LN will send these commands via LoRaWAN uplinks.
1355 1355  )))
1356 -|(% style="width:156px" %)(((
1374 +|(% style="width:100px" %)(((
1357 1357  AT+RXMODE=2,500
1358 -)))|(% style="width:352px" %)(((
1376 +)))|(% style="width:400px" %)(((
1359 1359  Enable listening mode 2, RS485-LN will capture and send a 500ms content once from the first detect of character. Max value is 65535 ms
1360 1360  )))
1361 -|(% style="width:156px" %)(((
1379 +|(% style="width:100px" %)(((
1362 1362  AT+RXMODE=0,0
1363 -)))|(% style="width:352px" %)(((
1381 +)))|(% style="width:400px" %)(((
1364 1364  Disable listening mode. This is the default settings.
1365 1365  )))
1366 -|(% style="width:156px" %)(((
1384 +|(% style="width:100px" %)(((
1367 1367  
1368 -)))|(% style="width:352px" %)(((
1386 +)))|(% style="width:400px" %)(((
1369 1369  A6 aa bb cc  same as AT+RXMODE=aa,(bb<<8 | cc)
1370 1370  )))
1371 1371  
... ... @@ -1413,21 +1413,25 @@
1413 1413  (% aria-label="image-20220602171200-9.png image widget" contenteditable="false" role="region" tabindex="-1" %)[[image:image-20220602171200-9.png||data-widget="image"]](% style="background-image:url(http://wiki.dragino.com/xwiki/webjars/wiki%3Axwiki/application-ckeditor-webjar/1.61/plugins/widget/images/handle.png); background:rgba(220,220,220,0.5); display:none" %)[[image:data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==||draggable="true" height="15" role="presentation" title="Click and drag to move" width="15"]](% title="Click and drag to resize" %)​
1414 1414  )))
1415 1415  
1434 +(((
1435 +
1436 +)))
1416 1416  
1417 -
1418 1418  (((
1439 +(((
1419 1419  (% style="color:red" %)**Notice: Listening mode can work with the default polling mode of RS485-LN. When RS485-LN is in to send the RS485 commands (from AT+COMMANDx), the listening mode will be interrupt for a while.**
1420 1420  )))
1442 +)))
1421 1421  
1422 1422  
1423 1423  == 3.7 Buttons ==
1424 1424  
1425 1425  
1426 -(% border="1.5" cellspacing="4" style="background-color:#f2f2f2; width:430px" %)
1427 -|=(% style="width: 50px;background-color:#D9E2F3;color:#0070C0" %)**Button**|=(% style="width: 380px;background-color:#D9E2F3;color:#0070C0" %)**Feature**
1428 -|(% style="width:50px" %)ACT|(% style="width:361px" %)If RS485 joined in network, press this button for more than 1 second, RS485 will upload a packet, and the SYS LED will give a (% style="color:blue" %)**Blue blink**
1429 -|(% style="width:50px" %)RST|(% style="width:361px" %)Reboot RS485
1430 -|(% style="width:50px" %)PRO|(% style="width:361px" %)Use for upload image, see [[How to Update Image>>||anchor="H6.1Howtoupgradetheimage3F"]]
1448 +(% border="1.5" cellspacing="4" style="background-color:#ffffcc; width:430px" %)
1449 +|=(% style="width: 50px;" %)**Button**|=(% style="width: 380px;" %)**Feature**
1450 +|(% style="width:50px" %)**ACT**|(% style="width:361px" %)If RS485 joined in network, press this button for more than 1 second, RS485 will upload a packet, and the SYS LED will give a (% style="color:blue" %)**Blue blink**
1451 +|(% style="width:50px" %)**RST**|(% style="width:361px" %)Reboot RS485
1452 +|(% style="width:50px" %)**PRO**|(% style="width:361px" %)Use for upload image, see [[How to Update Image>>||anchor="H6.1Howtoupgradetheimage3F"]]
1431 1431  
1432 1432  
1433 1433  
... ... @@ -1434,10 +1434,10 @@
1434 1434  == 3.8 LEDs ==
1435 1435  
1436 1436  
1437 -(% border="1.5" cellspacing="4" style="background-color:#f2f2f2; width:430px" %)
1438 -|=(% style="width: 50px;background-color:#D9E2F3;color:#0070C0" %)**LEDs**|=(% style="width: 380px;background-color:#D9E2F3;color:#0070C0" %)**Feature**
1439 -|PWR|Always on if there is power
1440 -|SYS|After device is powered on, the SYS will (% style="color:green" %)**fast blink in GREEN**(%%) for 5 times, means RS485-LN start to join LoRaWAN network. If join success, SYS will be (% style="color:green" %)**on GREEN for 5 seconds** (%%)**. **SYS will (% style="color:green" %)**blink Blue**(%%) on every upload and (% style="color:green" %)**blink Green**(%%) once receive a downlink message.
1459 +(% border="1.5" cellspacing="4" style="background-color:#ffffcc; width:430px" %)
1460 +|=(% style="width: 50px;" %)**LEDs**|=(% style="width: 380px;" %)**Feature**
1461 +|**PWR**|Always on if there is power
1462 +|**SYS**|After device is powered on, the SYS will (% style="color:green" %)**fast blink in GREEN**(%%) for 5 times, means RS485-LN start to join LoRaWAN network. If join success, SYS will be (% style="color:green" %)**on GREEN for 5 seconds** (%%)**. **SYS will (% style="color:green" %)**blink Blue**(%%) on every upload and (% style="color:green" %)**blink Green**(%%) once receive a downlink message.
1441 1441  
1442 1442  
1443 1443  
... ... @@ -1494,6 +1494,8 @@
1494 1494  
1495 1495  * (% style="color:#037691" %)**AT+NJM=0**
1496 1496  * (% style="color:#037691" %)**ATZ**
1519 +
1520 +
1497 1497  )))
1498 1498  
1499 1499  
... ... @@ -1695,7 +1695,7 @@
1695 1695  
1696 1696  RS485-LN sent below command:
1697 1697  
1698 -(% style="color:blue" %)**AT+CFGDEV=01 03 00 20 00 01,1**(%%) to RS485 network, and PC is able to get this command and return commands from MTU to show in the serial tool.
1722 +(% style="color:blue" %)**AT+CFGDEV=01 03 20 00 01 85 c0,1**(%%) to RS485 network, and PC is able to get this command and return commands from MTU to show in the serial tool.
1699 1699  
1700 1700  
1701 1701  We can see the output from the Serial port tool to analyze. And check if they are expected result.
... ... @@ -1745,12 +1745,6 @@
1745 1745  [[image:image-20221130104310-14.png||height="371" width="823"]]
1746 1746  
1747 1747  
1748 -== 6.8 Where to get the decoder for RS485-LN? ==
1749 -
1750 -
1751 -The decoder for RS485-LN needs to be written by yourself. Because the sensor to which the user is connected is custom, the read device data bytes also need custom parsing, so there is no universal decoder. We can only provide [[templates>>https://github.com/dragino/dragino-end-node-decoder/tree/main/RS485-LN]] for decoders (no intermediate data parsing part involved)
1752 -
1753 -
1754 1754  = 7. Trouble Shooting =
1755 1755  
1756 1756  == 7.1 Downlink doesn't work, how to solve it? ==
... ... @@ -1785,7 +1785,7 @@
1785 1785  
1786 1786  
1787 1787  
1788 -= 9. Packing Info =
1806 += 9.Packing Info =
1789 1789  
1790 1790  
1791 1791  **Package Includes**:
Copyright ©2010-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0