www.dragino.com RS485-LN -- RS485 to LoRaWAN Converter User Manual Document Version: 1.0.1 Image Version: v1.0 Version Description Date 1.0 Release 2019-Dec-8 1.0.
www.dragino.com 1. Introduction .............................................................................................................................. 4 1.1 What is RS485-LN RS485 to LoRaWAN Converter ...................................................................... 4 1.2 Specifications.............................................................................................................................. 5 1.3 Features ...............................................................
www.dragino.com 8. Packing Info ............................................................................................................................ 27 9. Support ................................................................................................................................... 28 10. Reference................................................................................................................................
www.dragino.com 1. Introduction 1.1 What is RS485-LN RS485 to LoRaWAN Converter The Dragino RS485-LN is a RS485 to LoRaWAN Converter. It converts the RS485 signal into LoRaWAN wireless signal which simplify the IoT installation and reduce the installation/maintaining cost. RS485-LN allows user to monitor / control RS485 devices and reach extremely long ranges. It provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption.
www.dragino.com 1.2 Specifications Hardware System: STM32L072CZT6 MCU SX1276/78 Wireless Chip Power Consumption (exclude RS485 device): Idle: 32mA@12v 20dB Transmit: 65mA@12v Interface for Model: RS485 Power Input 7~ 24V DC. LoRa Spec: Frequency Range: Band 1 (HF): 862 ~ 1020 Mhz Band 2 (LF): 410 ~ 528 Mhz 168 dB maximum link budget. +20 dBm - 100 mW constant RF output vs. +14 dBm high efficiency PA. Programmable bit rate up to 300 kbps.
www.dragino.com 1.
www.dragino.com 1.5 Firmware Change log RS485-LN Image files – Download link Image v1.0 Release 2. Power ON Device The RS485-LN can be powered by 7 ~ 24V DC power source. Connection as below Power Source VIN to RS485-LN VIN+ Power Source GND to RS485-LN VIN- Once there is power, the RS485-LN will be on.
www.dragino.com 3. Operation Mode 3.1 How it works? The RS485-LN is configured as LoRaWAN OTAA Class C 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-LN. It will auto join the network via OTAA. In case user can’t set the OTAA keys in the network server and has to use the existing keys from server. User can use AT Command to set the keys in the devices. 3.
www.dragino.com The LG308 is already set to connect to TTN network . So what we need to now is only configure the TTN: Step 1: Create a device in TTN with the OTAA keys from RS485-LN.
www.dragino.com User can enter this key in their LoRaWAN Server portal. Below is TTN screen shot: Add APP EUI in the application. Add APP KEY and DEV EUI Step 2: Power on RS485-LN and it will auto join to the TTN network. After join success, it will start to upload message to TTN and user can see in the panel.
www.dragino.com 3.3 Configure Commands to read data There are plenty of RS485 devices in the market and each device has different command to read the valid data. To support these devices in flexible, RS485-LN supports flexible command set. User can use AT Commands to configure what commands RS485-LN should send for each sampling and how to handle the output from RS485 devices.
www.dragino.com suf: Add suffix If valid payload from command 1 is : EF If valid payload from command 2 is AB Then, final payload is: AT+PAYLOAD Command Final Payload for sampling AT+DATAUP=1,2 EF AB AT+DATAUP=1:12,2:56 12 EF 56 AB AT+DATAUP=1:12:34,2:56:78 12 EF 34 56 AB 78 AT+DATAUP=1::34,2::78 EF 34 AB 78 Set PAYLOAD version (size: 1 byte) Command1 and Command2 will auto run before each uplink.
www.dragino.
www.dragino.com Example screen shot: AT+DATAUP=1,2 The uplink screen shot is: 3.4 Uplink Payload Size(bytes) 1 Length depends on the return from the commands Value PAYLOAD_VER 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. 3.
www.dragino.com A8 mm xx xx xx xx xx mm: 1: add CRC-16/MODBUS ; 0: no CRC xx: The command want to sent Set Command1 (Same as AT+COMMAND1) A9 Not fix AA 4 AB Not fix AC 4 AD 3 or 7 AE 2 A9 mm xx xx xx xx xx mm: 1: add CRC-16/MODBUS ; 0: no CRC xx: The command1 to be sent. Cut command1 (Same as AT+DATACUT1): AA mm nn kk mm: total length nn:start kk:end Set Command2 (Same as AT+COMMAND2) A9 mm xx xx xx xx xx mm: 1: add CRC-16/MODBUS ; 0: no CRC xx: The command1 to be sent.
www.dragino.
www.dragino.com Type Code 0xA8 0xA8 downlink command can be used to control the RS485 devices via LoRaWAN. For example, The RS485 Alarm we use here use Modbus RTU to communicate. 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.
www.dragino.com 4. Use AT Command 4.1 Access AT Command RS485-LN supports AT Command set. User can use a USB to TTL adapter plus the 3.5mm Program Cable to connect to RS485-LN to use AT command, as below. In PC, User needs to set serial tool(such as putty, SecureCRT) baud rate to 9600 to access to access serial console of RS485-LN.
www.dragino.
www.dragino.com 4.2 Common AT Command Sequence 4.2.1 Multi-channel ABP mode (Use with SX1301/LG308) If device has not joined network yet: AT+FDR AT+NJM=0 ATZ If device already joined network: AT+NJM=0 ATZ 4.2.2 Single-channel ABP mode (Use with LG01/LG02) AT+FDR Reset Parameters to Factory Default, Keys Reserve AT+NJM=0 Set to ABP mode AT+ADR=0 Set the Adaptive Data Rate Off AT+DR=5 Set Data Rate AT+TDC=60000 Set transmit interval to 60 seconds AT+CHS=868400000 Set transmit frequency to 868.
www.dragino.com The RS485-LN LoRaWAN Controller is shipped with a 3.5mm cable, the cable is used to upload image to RS485-LN to: Support new features For bug fix Change LoRaWAN bands. Below shows the hardware connection for how to upload an image to RS485-LN: Step1: Download flash loader. Step2: Download the LT Image files. Step3: Open flashloader; choose the correct COM port to update.
www.dragino.
www.dragino.com Notice: In case user has lost the program cable. User can hand made one from a 3.5mm cable. The pin mapping is: 5.2 How to change the LoRa Frequency Bands/Region? User can follow the introduction for how to upgrade image. When download the images, choose the required image file for download.
www.dragino.com 5.3 How to set up RS485-LN to work in other 8 channel mode in US915, AU915, CN470 bands? By default, the frequency bands US915, AU915, CN470 works in 8~15 (CHE=2) frequencies. User can set to the frequencies to work in other channels, by using the AT+CHE command. For example, in US915 band, the frequency table is as below. By default, end node will use all channels (8~15) for OTAA Join process. After OTAA JOINED, end node will use these channels (8~15) to send uplink packets.
www.dragino.com AU915 is similar. Below is the AU915 Uplink Channels. CHE AU915 Uplink Channels(125KHz,4/5,Unit:MHz,CHS=0) 0 ENABLE Channel 0-63 1 915.2 915.4 915.6 915.8 916 916.2 916.4 916.6 Channel 0-7 2 916.8 917 917.2 917.4 917.6 917.8 918 918.2 Channel 8-15 3 918.4 918.6 918.8 919 919.2 919.4 919.6 919.8 Channel 16-23 4 920 920.2 920.4 920.6 920.8 921 921.2 921.4 Channel 24-31 5 921.6 921.8 922 922.2 922.4 922.6 922.8 923 Channel 32-39 6 923.2 923.4 923.6 923.8 924 924.2 924.4 924.
www.dragino.com Step2: Run AT Command to make LT work in Single frequency & ABP mode. Below is the AT commands: AT+FDR Reset Parameters to Factory Default, Keys Reserve AT+NJM=0 Set to ABP mode AT+ADR=0 Set the Adaptive Data Rate Off AT+DR=5 Set Data Rate (Set AT+DR=3 for 915 band) AT+TDC=60000 Set transmit interval to 60 seconds AT+CHS=868400000 Set transmit frequency to 868.
www.dragino.com 6. Trouble Shooting 6.1 Downlink doesn’t work, how to solve it? By default, LT will open two RX windows to get downlink message after uplink. If the server’s radio parameter is not match with the radio parameters in downlink, the downlink message won’t arrive. And in UART access to LT, user will see below message: txDone rxTimeout rxTimeout If user see below output: txDone rxDone rxTimeout It means the downlink message arrive but not parse.
www.dragino.com Dimension and weight: Device Size: 13.5 x 7 x 3 cm Device Weight: 105g Package Size / pcs : 14.5 x 8 x 5 cm Weight / pcs : 170g 9. Support 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.
www.dragino.com 10.