image-20231008143931-2.png

Table of Contents:

1. Introduction

1.1 What is RS485 / UART to NB-IoT Converter

The Dragino RS485-NB is a RS485 / UART to NB-IoT Converter for Internet of Things solutions. User can connect RS485 or UART sensor to RS485-NB converter, and configure RS485-NB to periodically read sensor data and upload via NB-IoT network to IoT server.

RS485-NB can interface to RS485 sensor, 3.3v/5v UART sensor or interrupt sensor. RS485-NB provides a 3.3v output and a 5v output to power external sensors. Both output voltages are controllable to minimize the total system power consumption.

RS485-NB supports different uplink methods including MQTT, MQTTs, UDP & TCP for different application requirement, and support uplinks to various IoT Servers.

RS485-NB supports BLE configure and OTA update which make user easy to use.

RS485-NB is IP67 waterproof and powered by 8500mAh Li-SOCI2 battery, it is designed for long-term use up to several years.

RS485-NB has optional built-in SIM card and default IoT server connection version. Which makes it works with simple configuration.

image-20231008143043-1.png

1.2 ​Features

  • NB-IoT Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85 @H-FDD
  • Ultra-low power consumption
  • Support multiply RS485 devices by flexible rules
  • Support Modbus protocol
  • Support Interrupt uplink
  • Supports connecting a UART sensors with 3.3V or 5V
  • Multiply Sampling and one uplink
  • Support Bluetooth v5.1 remote configure and update firmware
  • Uplink via MQTT, MQTTs, TCP, or UDP
  • Uplink on periodically
  • Downlink to change configure
  • 8500mAh Battery for long term use
  • Nano SIM card slot for NB-IoT SIM

1.3 Specification

Common DC Characteristics:

  • Supply Voltage: 2.5v ~ 3.6v
  • Operating Temperature: -40 ~ 85°C

I/O Interface:

  • Battery controllable output (2.6v ~ 3.6v depends on battery)
  • +5v controllable output
  • 1 x RS485 Interface
  • 1 x UART Interface , 3.3v or 5v
  • 1 x Interrupt or Digital IN/OUT pins
  • 1 x I2C Interface
  • 1 x one wire interface

NB-IoT Spec:

NB-IoT Module: BC660K-GL

Support Bands:

  • B1 @H-FDD: 2100MHz
  • B2 @H-FDD: 1900MHz
  • B3 @H-FDD: 1800MHz
  • B4 @H-FDD: 2100MHz
  • B5 @H-FDD: 860MHz
  • B8 @H-FDD: 900MHz
  • B12 @H-FDD: 720MHz
  • B13 @H-FDD: 740MHz
  • B17 @H-FDD: 730MHz
  • B18 @H-FDD: 870MHz
  • B19 @H-FDD: 870MHz
  • B20 @H-FDD: 790MHz
  • B25 @H-FDD: 1900MHz
  • B28 @H-FDD: 750MHz
  • B66 @H-FDD: 2000MHz
  • B70 @H-FDD: 2000MHz
  • B85 @H-FDD: 700MHz

Battery:

  • Li/SOCI2 un-chargeable battery
  • Capacity: 8500mAh
  • Self Discharge: <1% / Year @ 25°C
  • Max continuously current: 130mA
  • Max boost current: 2A, 1 second

Power Consumption

  • STOP Mode: 10uA @ 3.3v
  • Max transmit power: 350mA@3.3v

1.4 Applications

  • Smart Buildings & Home Automation
  • Logistics and Supply Chain Management
  • Smart Metering
  • Smart Agriculture
  • Smart Cities
  • Smart Factory

1.5 Sleep mode and working mode

Deep Sleep Mode: Sensor doesn't have any NB-IoT activate. This mode is used for storage and shipping to save battery life.

Working Mode: In this mode, Sensor will work as NB-IoT Sensor to Join NB-IoT network and send out sensor data to server. Between each sampling/tx/rx periodically, sensor will be in IDLE mode), in IDLE mode, sensor has the same power consumption as Deep Sleep mode.

1.6 Button & LEDs

1675071855856-879.png

Behavior on ACTFunctionAction
Pressing ACT between 1s < time < 3sSend an uplink

If sensor has already attached to NB-IoT network, sensor will send an uplink packet, blue led will blink once.
Meanwhile, BLE module will be active and user can connect via BLE to configure device.

Pressing ACT for more than 3sActive Device

Green led will fast blink 5 times, device will enter OTA mode for 3 seconds. And then start to  attach NB-IoT network.
Green led will solidly turn on for 5 seconds after joined in network.
Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device attach NB-IoT network or not.

Fast press ACT 5 times.Deactivate DeviceRed led will solid on for 5 seconds. Means device is in Deep Sleep Mode.

Note: When the device is executing a program, the buttons may become invalid. It is best to press the buttons after the device has completed the program execution.

1.7 BLE connection

RS485-NB support BLE remote configure and firmware update.

BLE can be used to configure the parameter of sensor or see the console output from sensor. BLE will be only activate on below case:

  • Press button to send an uplink
  • Press button to active device.
  • Device Power on or reset.

If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.

1.8 Pin Definitions & Switch

RS485-NB use the mother board which as below.

image-20230804102346-1.png

1.8.1 Jumper JP2

Power on Device when put this jumper.

1.8.2 BOOT MODE / SW1

1) ISP: upgrade mode, device won't have any signal in this mode. but ready for upgrade firmware. LED won't work. Firmware won't run.

2) Flash: work mode, device starts to work and send out console output for further debug

1.8.3 Reset Button

Press to reboot the device.

2. Use RS485-NB to communicate with IoT Server

2.1 Send data to IoT server via NB-IoT network

The RS485-NB is equipped with a NB-IoT module, the pre-loaded firmware in RS485-NB will get environment data from sensors and send the value to local NB-IoT network via the NB-IoT module.  The NB-IoT network will forward this value to IoT server via the protocol defined by RS485-NB.

Below shows the network structure:

image-20231008143043-1.png

There are two version: -GE and -1D version of RS485-NB.

GE Version: This version doesn't include SIM card or point to any IoT server. User needs to use AT Commands to configure below two steps to set RS485-NB send data to IoT server.

  • Install NB-IoT SIM card and configure APN. See instruction of Attach Network.

Below shows result of different server as a glance.

ServersDash BoardComments
Node-Red

image-20230819113244-8.png

 
DataCake

image-20230819113244-9.png

 
Tago.IO  
General UDPRaw Payload. Need Developer to design Dash Board 
General MQTTRaw Payload. Need Developer to design Dash Board 
ThingSpeak

image-20230819113244-10.png

 
ThingsBoard

image-20230819113244-11.png

 

1D Version: This version has 1NCE SIM card pre-installed and configure to send value to DataCake. User Just need to select the sensor type in DataCake and Activate RS485-NB and user will be able to see data in DataCake. See here for DataCake Config Instruction.

2.2 Configure Commands to read data

There are plenty of RS485 and TTL level devices in the market and each device has different command to read the valid data. To support these devices in flexible, RS485-NB supports flexible command set. User can use AT Commands or LoRaWAN Downlink Command to configure how RS485-NB should read the sensor and how to handle the return from RS485 or TTL sensors.

2.2.1 Configure UART settings for RS485 or TTL communication

RS485-NB can connect to either RS485 sensors or TTL sensor. User need to specify what type of sensor need to connect.

1.  RS485-MODBUS mode:

AT+MOD=1    // Support RS485-MODBUS type sensors. User can connect multiply RS485 , Modbus sensors to the A / B pins.

2.  TTL mode:

AT+MOD=2   // Support TTL Level sensors, User can connect one TTL Sensor to the TXD/RXD/GND pins.

RS485-NB default UART settings is 9600, no parity, stop bit 1. If the sensor has a different settings, user can change the RS485-NB setting to match.

AT Commands

Description

Example

AT+BAUDR

Set the baud rate (for RS485 connection).

Default Value is: 9600.

AT+BAUDR=9600

Options: (1200,2400,4800,14400,19200,115200)

AT+PARITY

Set UART parity (for RS485 connection)

Default Value is: no parity.

AT+PARITY=0

Option: 0: no parity, 1: odd parity, 2: even parity

AT+STOPBIT

Set serial stopbit (for RS485 connection)

Default Value is: 1bit.

AT+STOPBIT=0 for 1bit

AT+STOPBIT=1 for 1.5 bit

AT+STOPBIT=2 for 2 bits

Example(Soil three-parameter detector):

Wiring the UART sensor

GND <--------> GND
TX    <-------->  RX
RX    <-------->  TX
VCC  <-------->  3.3/5V

image-20230220110129-1.png

Set the correct configuration:

AT+BAUDR=9600

AT+PARITY=0

AT+STOPBIT=1

If the sensor needs 5v. Need to move the switch position to 5v and then use the command AT+5VT=30000

Configuration read command:

AT+CFGDEV=FE 03 00 00 00 03 11 C4,0

FE: Station address

03: Function code

00 00:Register start address

00 03:Number of registers

11 04:  Check code

image-20230220111709-2.png

 Use AT+COMMAND1 to set it as a command, and use AT+DATACUT1 to intercept the bytes I need

image-20230220112421-3.png

upload payload:

image-20230220112517-4.png

2.2.2 Configure sensors

Some sensors might need to configure before normal operation. User can configure such sensor via PC or through RS485-NB AT Commands AT+CFGDEV.

When user issue an AT+CFGDEV command, Each 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.

AT CommandsDescriptionExample
AT+CFGDEV

This command is used to configure the RS485/TTL devices; they won’t be used during sampling.

AT+CFGDEV=xx xx xx xx xx xx xx xx xx xx xx xx,

mm: 0: no CRC, 1: add CRC-16/MODBUS in the end of this command

AT+CFGDEV=xx xx xx xx xx xx xx xx xx xx xx xx,m

Detail of AT+CFGDEV command see AT+CFGDEV detail.

2.2.3 Configure read commands for each sampling

RS485-NB is a battery powered device; it will sleep most of time. And wake up on each period and read RS485 / TTL sensor data and uplink.

During each sampling, we need to confirm what commands we need to send to the sensors to read data. After the RS485/TTL sensors send back the value, it normally includes some bytes and we only need a few from them for a shorten payload.

To save the LoRaWAN network bandwidth, we might need to read data from different sensors and combine their valid value into a short payload.

This section describes how to achieve above goals.

During each sampling, the RS485-NB can support 15 commands to read sensors. And combine the return to one or several uplink payloads.

Command from RS485-NB to Sensor:

RS485-NB can send out pre-set max 15 strings via AT+COMMAD1, ATCOMMAND2,…, to AT+COMMANDF . All commands are of same grammar.

 

Handle return from sensors to RS485-NB:

After RS485-NB send out a string to sensor, RS485-NB will wait for the return from RS485 or TTL sensor. And user can specify how to handle the return, by AT+DATACUT or AT+SEARCH commands

  • AT+DATACUT

When the return value from sensor have fix length and we know which position the valid value we should get, we can use AT+DATACUT command.

 

  • AT+SEARCH

When the return value from sensor is dynamic length and we are not sure which bytes the valid data is, instead, we know what value the valid value following. We can use AT+SEARCH to search the valid value in the return string.

Define wait timeout:

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.

Examples:

Below are examples for the how above AT Commands works.

AT+COMMANDx This command will be sent to RS485/TTL 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-NB, we should use this command AT+COMMAND1=01 03 0B B8 00 02,1 for the same.

AT+SEARCHx: This command defines how to handle the return from AT+COMMANDx.

AT+SEARCHx=aa,xx xx xx xx xx

  • aa: 1: prefix match mode; 2: prefix and suffix match mode

  • xx xx xx xx xx: match string. Max 5 bytes for prefix and 5 bytes for suffix

Examples:

1)For a return string from AT+COMMAND1: 16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49

If we set AT+SEARCH1=1,1E 56 34.      (max 5 bytes for prefix)

The valid data will be all bytes after 1E 56 34 , so it is 2e 30 58 5f 36 41 30 31 00 49

1653271044481-711.png

 

2)For a return string from AT+COMMAND1:  16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49

If we set AT+SEARCH1=2, 1E 56 34+31 00 49

Device will search the bytes between 1E 56 34 and 31 00 49. So it is 2e 30 58 5f 36 41 30

1653271044481-711.png

 

AT+DATACUTx : This command defines how to handle the return from AT+COMMANDx, max return length is 100 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:

1653271581490-837.png

  • Grab a section.

1653271648378-342.png

  • Grab different sections.

1653271657255-576.png

 

Note:

AT+SEARCHx and AT+DATACUTx can be used together, if both commands are set, RS485-NB 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.

Example:

AT+COMMAND1=11 01 1E D0,0

AT+SEARCH1=1,1E 56 34

AT+DATACUT1=0,2,1~5

Return string from AT+COMMAND1: 16 0c 1e 56 34 2e 30 58 5f 36 41 30 31 00 49

String after SEARCH command: 2e 30 58 5f 36 41 30 31 00 49

Valid payload after DataCUT command: 2e 30 58 5f 36

1653271763403-806.png

2.2.4 Compose the uplink payload

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.

Examples: AT+DATAUP=0

Compose the uplink payload with value returns in sequence and send with A SIGNLE UPLINK.

Final Payload is

Battery Info+PAYVER + VALID Value from RETURN1 + Valid Value from RETURN2 + … + RETURNx

Where PAYVER is defined by AT+PAYVER, below is an example screen shot.

1653272787040-634.png

Examples: AT+DATAUP=1

Compose the uplink payload with value returns in sequence and send with Multiply UPLINKs.

Final Payload is

Battery Info+PAYVER + PAYLOAD COUNT + PAYLOAD# + DATA

  1. Battery Info (2 bytes): Battery voltage

  2. PAYVER (1 byte): Defined by AT+PAYVER

  3. PAYLOAD COUNT (1 byte): Total how many uplinks of this sampling.

  4. PAYLOAD# (1 byte): Number of this uplink. (from 0,1,2,3…,to PAYLOAD COUNT)

  5. DATA: Valid value: max 6 bytes(US915 version here, Notice*!) for each uplink so each uplink <= 11 bytes. For the last uplink, DATA will might less than 6 bytes

1653272817147-600.png

So totally there will be 3 uplinks for this sampling, each uplink includes 6 bytes DATA

DATA1=RETURN1 Valid Value =  20 20 0a 33 90 41

DATA2=1st ~ 6th byte of Valid value of RETURN10= 02 aa 05 81 0a 20

DATA3=7th ~ 11th bytes of Valid value of RETURN10 = 20 20 20 2d 30

Below are the uplink payloads:

1653272901032-107.png

Notice: the Max bytes is according to the max support bytes in different Frequency Bands for lowest SF. As below:

   * For AU915/AS923 bands, if UplinkDwell time=0, max 51 bytes for each uplink ( so 51 -5 = 46 max valid date) 

   * For AU915/AS923 bands, if UplinkDwell time=1, max 11 bytes for each uplink ( so 11 -5 = 6 max valid date). 

   * For US915 band, max 11 bytes for each uplink ( so 11 -5 = 6 max valid date). 

   * For all other bands: max 51 bytes for each uplink  ( so 51 -5 = 46 max valid date). 

   * When AT+DATAUP=1, the maximum number of segments is 15, and the maximum total number of bytes is 1500;

      When AT+DATAUP=1 and AT+ADR=0, the maximum number of bytes of each payload is determined by the DR value. (Since v1.4.0)

  • If the data is empty, return to the display(Since v1.4.0)
     

1)  When AT+MOD=1, if the data intercepted by  AT+DATACUT or  AT+MBFUN is empty, it will display NULL, and the payload will be filled with n FFs.

image-20220824114359-3.png

2)  When AT+MOD=2, if the data intercepted by  AT+DATACUT or  AT+MBFUN is empty, it will display NULL, and the payload will be filled with n 00s.

image-20220824114330-2.png

2.2.5 Uplink on demand

Except uplink periodically, RS485-NB is able to uplink on demand. The server sends downlink command to RS485-NB and RS485 will uplink data base on the command.

 

 Downlink control command:

 0x08 command: Poll an uplink with current command set in RS485-NB.

 0xA8 command: Send a command to RS485-NB and uplink the output from sensors.

2.2.6 Uplink on Interrupt

Put the interrupt sensor between 3.3v_out and GPIO ext.

1653273818896-432.png

AT+INTMOD=0  Disable Interrupt

AT+INTMOD=1  Interrupt trigger by rising or falling edge.

AT+INTMOD=2  Interrupt trigger by falling edge. ( Default Value)

AT+INTMOD=3  Interrupt trigger by rising edge.

2.3 ​Payload Types

To meet different server requirement, RS485-NB supports different payload type.

Includes:

User can specify the payload type when choose the connection protocol. Example:

AT+PRO=2,0            // Use UDP Connection & hex Payload

AT+PRO=2,5            // Use UDP Connection & Json Payload

AT+PRO=3,5            // Use MQTT Connection & Json Payload

2.3.1 General Json Format(Type=5)

This is the General Json Format. As below:

{"IMEI":866207053462762,"temperature":29.2,"humidity":54.2,"battery":3.27,"signal":24,"Model":S31x-NB, "1":{28.2,48.3,2023/08/10 08:00:37},"2":{28.1,49.1,2023/08/10 07:57:37},"3":{28.1,48.5,2023/08/10 07:54:37},"4":{28.2,48.6,2023/08/10 07:51:37},"5":{28.1,48.9,2023/08/10 07:48:37},"6":{28.2,48.8,2023/08/10 07:45:37},"7":{28.2,48.8,2023/08/10 07:42:37},"8":{28.0,48.8,2023/08/10 07:39:37}}

Notice, from above payload:

  • Temperature , Humidity , Battery & Signal are the value at uplink time.
  • Json entry 1 ~ 8 are the last 1 ~ 8 sampling data as specify by AT+NOUD=8  Command. Each entry includes (from left to right): Temperature, Humidity, Sampling time.

2.3.2 HEX format Payload(Type=0)

This is the HEX Format. As below:

f86620705346276200640cba16010000000011011801e864d49c2d011a01e364d49925011901eb64d49871011901e564d497bd011a01e664d49709011901e964d49655011a01e864d495a1011a01e864d494ed011801e864d49439

image-20230915150651-3.png

Version:

These bytes include the hardware and software version.

Higher byte: Specify Sensor Model: 0x00 for RS485-NB

Lower byte: Specify the software version: 0x64=100, means firmware version 1.0.0

BAT (Battery Info):

Ex1: 0x0CBA = 3258mV

Signal Strength:

NB-IoT Network signal Strength.

Ex1: 0x16 = 22

0        -113dBm or less

1        -111dBm

2...30 -109dBm... -53dBm

31      -51dBm or greater

99      Not known or not detectable

TimeStamp:   

Unit TimeStamp Example: 64d49439(H) = 1691653177(D)

Put the decimal value into this link(https://www.epochconverter.com/) to get the time.

2.3.3 ThingsBoard Payload(Type=3)

Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard.

{"IMEI":866207053462762,"temperature":29.2,"humidity":54.2,"battery":3.27,"signal":24}

2.3.4 ThingSpeak Payload(Type=1)

This payload meets ThingSpeak platform requirement. It includes only four fields. Form 1~4 are:

Temperature, Humidity, Battery & Signal. This payload type only valid for ThingsSpeak Platform

As below:

field1=27.9&field2=49.9&field3=3.23&field4=28

2.4 Test Uplink and Change Update Interval

By default, Sensor will send uplinks every 2 hours & AT+NOUD=8

User can use below commands to change the uplink interval.

AT+TDC=600        // Set Update Interval to 600s

User can also push the button for more than 1 seconds to activate an uplink.

To save battery life, RS485-NB will sample temperature & humidity data every 15 minutes and send one uplink every 2 hours. So each uplink it will include 8 stored data + 1 real-time data. They are defined by:

  • AT+TR=900        // The unit is seconds, and the default is to record data once every 900 seconds (15 minutes, the minimum can be set to 180 seconds)
  • AT+NOUD=8     //  The device uploads 8 sets of recorded data by default. Up to 32 sets of record data can be uploaded.

The diagram below explains the relationship between TR, NOUD, and TDC more clearly:

1692424376354-959.png

2.6 Trggier an uplink by external interrupt

RS485-NB has an external trigger interrupt function. Users can use the PB15 pin to trigger the upload of data packets.

AT command:

  • AT+INTMOD         // Set the trigger interrupt mode
  • AT+INTMOD=0    // Disable Interrupt
  • AT+INTMOD=1    // Trigger by rising and falling edge
  • AT+INTMOD=2    // Trigger by falling edge
  • AT+INTMOD=3    // Trigger by rising edge

2.7 +3V3 Output

RS485-NB has a Controllable +3V3 output, user can use this output to power external sensor.

The +3V3 output will be valid for every sampling. RS485-NB will enable +3V3 output before all sampling and disable the +3V3 after all sampling.  

The +3V3 output time can be controlled by AT Command.

AT+3V3T=1000

Means set +3v3 valid time to have 1000ms. So, the real +3v3 output will actually have 1000ms + sampling time for other sensors.

By default, the AT+3V3T=0. This is a special case, means the +3V3 output is always on at any time

2.8 +5V Output

RS485-NB has a Controllable +5V output, user can use this output to power external sensor.

The +5V output will be valid for every sampling. RS485-NB will enable +5V output before all sampling and disable the +5v after all sampling.  

The 5V output time can be controlled by AT Command.

(AT+5VT increased from the maximum 5000ms to 65000ms.)

AT+5VT=1000

Means set 5V valid time to have 1000ms. So, the real 5V output will actually have 1000ms + sampling time for other sensors.

By default, the AT+5VT=0. If the external sensor which require 5v and require more time to get stable state, user can use this command to increase the power ON duration for this sensor.

2.9 Switch Jumper

Switch JumperFeature
SW1ISP position: Upgrade firmware via UART
Flash position: Configure device, check running status.
SW25V position: set to compatible with 5v I/O.
3.3v position: set to compatible with 3.3v I/O.,

 +3.3V: is always ON

 +5V: Only open before every sampling. The time is by default, it is  AT+5VT=0.  Max open time. 65000 ms.

3. Configure RS485-NB

3.1 Configure Methods

RS485-NB supports below configure method:

3.2 AT Commands Set

AT+<CMD>?           : Help on <CMD>

AT+<CMD>                      : Run <CMD>

AT+<CMD>=<value>      : Set the value

AT+<CMD>=?          : Get the value

General Commands       

AT                    : Attention        

AT?                  : Short Help      

ATZ                 : MCU Reset     

AT+TDC          : Application Data Transmission Interval

AT+CFG          : Print all configurations

AT+CFGMOD           : Working mode selection

AT+DEUI                  : Get or set the Device ID

AT+INTMOD            : Set the trigger interrupt mode

AT+5VT           : Set extend the time of 5V power   

AT+PRO          : Choose agreement

AT+RXDL        : Extend the sending and receiving time

AT+DNSCFG   : Get or Set DNS Server

AT+GETSENSORVALUE   : Returns the current sensor measurement

AT+NOUD  : Get or Set the number of data to be uploaded

AT+CDP     : Read or Clear cached data

AT+SHTEMP:   Get or Set alarm of temp

AT+SHHUM:   Get or Set alarm of moisture

AT+SERVADDR :   Server Address

UDP Management

AT+CFM  :    Upload confirmation mode (only valid for UDP)

MQTT Management

AT+CLIENT               : Get or Set MQTT client

AT+UNAME              : Get or Set MQTT Username

AT+PWD                  : Get or Set MQTT password

AT+PUBTOPIC          : Get or Set MQTT publish topic

AT+SUBTOPIC          : Get or Set MQTT subscription topic

Information           

AT+FDR              : Factory Data Reset

AT+PWORD        : Serial Access Password

AT+LDATA           : Get the last upload data

AT+CDP               : Read or Clear cached data

4. Battery & Power Consumption

RS485-NB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.

Battery Info & Power Consumption Analyze .

5. Firmware update

User can change device firmware to::

  • Update with new features.
  • Fix bugs. 

Firmware and changelog can be downloaded from : Firmware download link

Methods to Update Firmware:

  • (Recommended way) OTA firmware update via BLE: Instruction.

6. FAQ

6.1 How can I access t BC660K-GL AT Commands?

User can access to BC660K-GL directly and send AT Commands.

See BC660K-GL AT Command set

6.2 How many RS485-Slave can RS485-NB connects?

The RS485-LB can support max 32 RS485 devices. Each uplink command of RS485-LB can support max 16 different RS485 command. So RS485-LB can support max 16 RS485 devices pre-program in the device for uplink. For other devices no pre-program, user can use the downlink message (type code 0xA8) to poll their info.

6.3 How to Use RS485-NB  to connect to RS232 devices?

Use RS485-LB or RS485-LN to connect to RS232 devices. - DRAGINO

6.4 How to judge whether there is a problem with the set COMMAND

6.4.1 Introduce:

Users can use below the structure to fast debug the communication between RS485-LB and RS485-LN. The principle is to put the PC in the RS485 network and sniff the packet between Modbus MTU and RS485-LB/LN.  We can use this way to:

  1. Test if Modbus-MTU works with PC commands.
  2. Check if RS485-LN sent the expected command to Mobus-MTU
  3. Check if Modbus-MTU return back the expected result to RS485-LN.
  4. If both b) and c) has issue, we can compare PC's output and RS485-LN output.

image-20230718135819-4.png

Example Connection: 

image-20221130104310-2.png

6.4.2 Set up PC to monitor RS485 network With Serial tool

Note: Receive and send set to hex mode

image-20221130104310-3.png

6.4.3 With ModRSsim2:

(1) Select serial port MODBUS RS-232

image-20221130104310-4.png

(2) Click the serial port icon

image-20221130104310-5.png

(3) After selecting the correct serial port and baud rate, click ok

image-20221130104310-6.png

(4) Click the comms.

image-20221130104310-7.png

Run RS485-LN/BL command and monitor if it is correct.

6.4.4 Example – Test the CFGDEV command

RS485-LN sent below command:

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.

We can see the output from the Serial port tool to analyze. And check if they are expected result.

image-20221130104310-8.png

We can also use ModRSsim2 to see the output.

image-20221130104310-9.png

6.4.5 Example – Test CMD command sets.

Run AT+SENSORVALUE=1 to test the CMD commands set in RS485-LN.

Serial port tool:

image-20221130104310-10.png

ModRSsim2:

image-20221130104310-11.png

6.4.6 Test with PC

If there is still have problem to set up correctly the commands between RS485-LN and MTU. User can test the correct RS485 command set in PC and compare with the RS485 command sent out via RS485-LN. as long as both commands are the same, the MTU should return correct result.

Or User can send the working commands set in PC serial tool to Dragino Support to check what should be configured in RS485-LN.

Connection method:

image-20221130104310-12.png

Link situation:

image-20221130104310-13.png

image-20221130104310-14.png

7. Order Info

Part Number: RS485-NB-XX

XX

  • GE: General version ( Exclude SIM card)
  • 1D: with 1NCE* 10 years 500MB SIM card and Pre-configure to DataCake server

YY: The grand connector hole size

  • M12: M12 hole
  • M16: M16 hole

8. ​Packing Info

Package Includes:

  • RS485-NB NB-IoT Sensor Node x 1
  • External antenna x 1

Dimension and weight:

  • Device Size: 13.0 x 5 x 4.5 cm
  • Device Weight: 150g
  • Package Size / pcs : 14.0 x 8x 5 cm
  • Weight / pcs : 180g

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.
  • Provide as much information as possible regarding your enquiry (product models, accurately describe your problem and steps to replicate it etc) and send a mail to Support@dragino.cc.

   

Tags:
Created by Xiaoling on 2023/10/08 14:01
    
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0