User's Manual

www.dragino.com
RS485 to LoRaWAN Converter User Manual 22 / 30
For example,
To connect a Modbus Alarm with below commands.
The command to active alarm is: 0A 05 00 04 00 01 4C B0. Where 0A 05 00 04 00 01 is the Modbus
command to read the register 00 40 where stored the DI status. The 4C B0 is the CRC-16/MODBUS which
calculate manually.
The command to deactivate alarm is: 0A 05 00 04 00 00 8D 70. Where 0A 05 00 04 00 00 is the Modbus
command to read the register 00 40 where stored the DI status. The 8D 70 is the CRC-16/MODBUS which
calculate manually.
So if user want to use downlink command to control to RS485 Alarm, he can use:
A8 01 06 0A 05 00 04 00 01 00: to activate the RS485 Alarm
A8 01 06 0A 05 00 04 00 00 00: to deactivate the RS485 Alarm
A8 is type code and 01 means add CRC-16/MODBUS at the end, the 3
rd
byte is 06, means the next 6 bytes are the
command to be sent to the RS485 network, the final byte 00 means this command dont need to acquire output.
Set Payload version
This is the first byte of the uplink payload. RS485-LN can connect to different sensors. User can
set the PAYVER field to tell server how to decode the current payload.
AT Command:
AT+PAYVER: Set PAYVER field = 1
Downlink Payload:
0xAE 01 Set PAYVER field = 0x01
0xAE 0F Set PAYVER field = 0x0F
Set RS485 Sampling Commands
AT+COMMANDx or AT+DATACUTx
These two commands are use to configure how the RS485-LN polling data from Modbus device.
Detail of usage please see : polling RS485 device.
AT Command:
AT+COMMANDx: Configure RS485 read command to sensor.
AT+DATACUTx: Configure how to handle return from RS485 devices.
Downlink Payload:
0xAF downlink command can be used to set AT+COMMANDx or AT+DATACUTx.
Note: if user use AT+COMMANDx to add a new command, he also need to send AT+DATACUTx
downlink.
Format: AF MM NN LL XX XX XX XX YY
Where:
MM: the ATCOMMAND or AT+DATACUT to be set. Value from 01 ~ 0F,