User Manual for LoRaWAN End Nodes - RS485-LN – RS485 to LoRaWAN Converter User Manual
Each RS485 commands include two parts:
1. What commands RS485-LN will send to the RS485 sensors. There are total 15 commands from
AT
+COMMAD1
,
ATCOMMAND2
,…, to
AT+COMMANDF
. All commands are of same grammar.
2. How to get wanted value the from RS485 sensors returns from by 1). There are total 15 AT Commands to
handle the return, commands are
AT+DATACUT1
,
AT+DATACUT2
,…,
AT+DATACUTF
corresponding to the
commands from 1). All commands are of same grammar.
3. 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
After we got the valid value from each RS485 commands, we need to combine them together with the command
AT+DATAUP
.
Below are examples for the how above AT Commands works.
AT+COMMANDx
:
This command will be sent to RS485 devices during each sampling, Max command length is
14 bytes. The grammar is:
AT+COMMANDx=xx xx xx xx xx xx xx xx xx xx xx xx,m
xx xx xx xx xx xx xx xx xx xx xx xx: The RS485 command to be sent
m: 0: no CRC, 1: add CRC-16/MODBUS in the end of this command
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.
In the RS485-LN, we should use this command AT+COMMAND1=01 03 0B B8 00 02,1 for the same.
AT+DATACUTx
:
This command defines how to handle the return from AT+COMMANDx, max return length is
45 bytes.
AT+DATACUTx=a,b,c
•
a: length for the return of AT+COMMAND
•
b:1: grab valid value by byte, max 6 bytes. 2: grab valid value by bytes section, max 3 sections.
•
c: define the position for valid value.
Examples:
•
Grab bytes
Page 17 / 38 - last modified by Bei Jinggeng on 2022/07/08 16:50