(User Manual) USR-DR301-User-Manual
(User Manual) USR-DR301-User-Manual
com
Contents
1. Quick Start..................................................................................................................................................................... 4
1.1. Hardware Testing Environment..................................................................................................................... 5
1.1.1. Hardware Prepare................................................................................................................................. 5
1.1.2. Hardware Connection........................................................................................................................... 6
1.2. Network Test Environment............................................................................................................................6
1.3. Default Parameter......................................................................................................................................... 7
1.4. Data Transmission Test.................................................................................................................................. 7
2. Overview........................................................................................................................................................................9
2.1. Brief Introduction.......................................................................................................................................... 9
2.2. Features......................................................................................................................................................... 9
2.3. Basic Parameter.............................................................................................................................................9
3. Hardware Parameters..................................................................................................................................................11
4. Product Function......................................................................................................................................................... 12
4.1. Network Basic Function...............................................................................................................................12
4.1.1. Static IP/DHCP/Subnet Masks/Gateway.............................................................................................. 12
4.1.2. DNS Server Address.............................................................................................................................13
4.1.3. Webserver........................................................................................................................................... 14
4.1.4. Restore to Factory Set......................................................................................................................... 15
4.1.5. Firmware Upgrade...............................................................................................................................15
4.2. Socket Communication................................................................................................................................16
4.2.1. TCP Client Mode..................................................................................................................................18
4.2.2. TCP Server Mode.................................................................................................................................20
4.2.3. UDP Client Mode................................................................................................................................. 23
4.2.4. UDP Server Mode................................................................................................................................25
4.2.5. HTTPD Client........................................................................................................................................26
4.3. Impersistent Connection............................................................................................................................. 28
4.4. Clean the buffer data...................................................................................................................................29
4.5. USR-VCOM Application................................................................................................................................29
4.6. Modbus Gateway.........................................................................................................................................30
4.7. USR-Cloud Function.....................................................................................................................................31
4.8. Other functions........................................................................................................................................... 33
4.8.1. Heartbeat Packet Function..................................................................................................................33
4.8.2. Registration Package Packet Function................................................................................................. 34
4.8.3. Customized Webpage..........................................................................................................................35
4.8.4. Link...................................................................................................................................................... 36
4.8.5. Index.................................................................................................................................................... 36
4.8.6. The number of the client connected...................................................................................................38
4.8.7. Serial Port Packaging Mechanism....................................................................................................... 39
4.8.8. Flow Calculation.................................................................................................................................. 39
4.8.9. Synchronous baud rate (RFC2217)......................................................................................................40
5. Setting Protocol........................................................................................................................................................... 42
1. Quick Start
Module USR-DR301 is used to realize data transparent transmission between Ethernet interface and the serial port
and the protocol converter. The serial port is the RS485 data and in the Ethernet interface, it is the net data package.
Users can configure the parameters via the webpage or set-up software, set one time and save forever
The character is aimed at USR-DR301 quick introduce. The users are recommend to operating one time according
to this character, and will have a system realize to the DR301. Also you can choose the character which you are
interested in. As to the details, please refer to the later characters.
Product link:
https://www.usriot.com/products/din-rail-rs232-serial-to-ethernet-converter.html
Related software:
Setup software: https://www.usriot.com/support/downloads/usr-m0-setup-software-v224288.html
Test software: https://www.usriot.com/support/downloads/usr-tcp-test-testing-software.html
Any question during testing, please submit it on our technical support center: http://h.usriot.com
Item Content
User name admin
Password admin
IP address 192.168.0.7
Subnet mask 255.255.255.0
Default gateway 192.168.0.1
Default work mode of port TCP Client
Default remote port 8324
Default local port of port 0
Remote IP address 192.168.0.201
Baud Rate 115200
Parity bit/Data bit/Stop bit None/8/1
Form 1.3-1 Default Parameters
Data transmission test is based on the default parameters, please refer to the following steps:
1) Open test software “USR-TCP232-Test.exe”, and do hardware connection according to Chapter 1.1 Hardware
Testing Environment.
2) The right side is Network Settings: TCP Server, IP address: 192.168.0.201, port number: 8324, click “Connect”
to build TCP connection.
The left side is Serial Settings: Baud Rate: 115200, Parity/Data bit/Stop bit: None/8/1,
Click “Open” to enable the COM.
Then we can test data transmission between COM and network.
Data from serial to network is: PC’ COM->USR-DR301’ COM->USR-DR301 Ethernet port->PC Network;
Data from network to serial is: PC Network->DR301’ Ethernet port->DR301 COM-> PC’s COM.
2. Overview
USR-DR301 Modbus RS232 to Ethernet converter can realize bidirectional transparent transmission between
RS485 and Ethernet. It carries ARM processor, low power, fast speed, high stability. Via web-page or software, RS232 to
Ethernet Converter can realize serial data and TCP/IP data package transparent transmission.
2.2. Features
3. Hardware Parameters
4. Product Function
1. The IP of the module is the symbol in the LAN, which can be distinguish from the other device.
Static IP
Manual setting the static IP, meanwhile please writing the IP, subnet and gateway. Static IP adjust to the scenario
that IP and the device correspond.
Advantage: the device access to the IP that can not distribute can searched by the broadcast
Disadvantage:different segment of the different LAN need to configuring.
DHCP
The DHCP is to obtain the IP, gateway and DNS from the gateway automatically to reduce the tedious step for
setting the IP. Adjust to the scenario there is no requirement to the IP.
Advantage: communicate directly when access router which can distribute the DHCP to reduce the tedious step to
set the IP and the subnet masks.
Disadvantage:access the net without DHCP, just like connect the PC directly, the module can not work normally.
Related AT command:
Command name Instr
AT+WANN Setting and query the IP access way, subnet and the gateway
parameters of the DR301
Form 4.1.1-1 Related AT Command
2. Subnet masks: to mark which subnet is the host in from the IP address bites and which bites mark the host
masks.
3. Gateway: IP address of the router in the LAN, if there is something wrong with the setting, user will can not
access the external net. If user do not use the router and so on device, keep default and do not set.
4. Setting software.
DNS server is used to converter the domain name in to the IP address that net can recognized. The server address
of the DR301 can be configured. After setting, all the questing will be sent to this address when the DR301 need to
DDNS.
Under the static IP mode, DNS server address default is 8.8.8.8. and under the DHCP mode, DHCP server address
can be acquire automatically. 4015 and latter versions supports this function.
Related AT command:
Command name Instr
AT+DNS Setting and query the DNS server address of the DR301
Form 4.1.2-1 Related AT Command
4.1.3. Webserver
DR301 supports build-in webserver, same as the normal webserver. User can setting the parameters via the
webpage also can check the related status. Default port of the webserver is 80, and this port can be modified/ after
modify, user also can access the build-in webpage to access via the other port.
The default home page is the current state interface, refreshed every 10s, showing DR301 running status:
Total number of data sent by the network: Can judge how much data is sent to the external network.
Total data received by the network: Can determine how much data is sent from the network to the module.
Connected remote IP/network send/receive: Through this item, you can see which device is connected to DR301.
How much data is sent and received by this connection. Currently, only 4 connection status displays are supported.
In UDP Server mode, only the send/receive data is displayed, and the connection IP is not displayed.
1) Hardware restore:
Press the Reload button for 5s to 15s to restore the factory settings. If it is less than 5s or exceeds 15s, the factory
reset will not be performed. When the module is configured with incorrect parameters, or if you have forgotten the
previously set password, you can restore the factory settings.
2) Software restore:
Restore the factory settings by setup software setting function or send the factory reset command via the network
protocol.
3) AT command restore:
Enter the AT command mode, restore via the command.
Related AT command:
Command name Instr
AT+RELD Restore to factory setting
Form 4.1.4-1 Related AT Command
The way to upgrade the DR301 firmware is to upgrade through the network. It is simple and convenient to upgrade
the firmware through the network. By upgrading the firmware, you can get more cutting-edge applications. The specific
upgrade method is as follows.
1) Upgrade the firmware with a wired network. Before upgrading, turn off the wireless and virtual machine
network cards to ensure that the computer only keeps one wired network card. The module and the computer can be
connected to the router at the same time or the module can be directly connected to the computer.
2) After the hardware is connected, upgrade the firmware by setup software, do not change the IP and MAC
addresses, set the firmware path (it is recommended not to have a Chinese path), and then click to upgrade the
firmware.
Note: here we take DR302 as an example, as the function and contents of the DR301 are same as DR302 and the
different between them is the serial port.
3) There is a progress bar during the upgrade. When the progress bar reaches 100%, the setup software will
prompt that the upgrade is successful and the upgrade is complete. Re-search the module after the upgrade is
complete.
There are five work modes for the socket of the DR301:TCP Client, TCP Server, UDP Client, UDP Server and Httpd
Client.
Set via the webpage or the set-up software
The webpage are as bellows:
Related AT command
Command name Instr
AT+SOCK Setup DR301 Socket working mode / target IP / target
port
1) TCP client provides the client connection for TCP net server. Query the server automatically can build the
connection to realize the data transmission. Different from UDP mode, in this mode, connection has status of
disconnection and remaining to make sure the data transmission reliable.
2) Identify disconnects. After connection built, it sends keepalive searching packet every 15 seconds. Once there
is an interrupt, it can be detected rapidly then make USR-DR301 disconnect from former connection and
reconnect.
3) Please notice the remote IP/domain name and the remote port when connecting the TCP server. Remote IP
can be the device in the same LAN or the device in other LAN. If user want to connect the server across the
net, there must be a public IP or the domain name for the server.
4) It supports USR Synchronous baud rate (Similar RCF2217), USR-cloud, also supports short connection
function.
5) Under the same LAN, if 302 is set to static IP, keep the IP and gateway of 302 in the same network segment,
and set the gateway IP correctly. Otherwise, communication will not be possible.
6) USR-DR301 work as TCP Client, It connects to the target IP/Port automatically,will not accept other
connection request.
7) When 302 is used as the TCP Client, it is recommended to set the local port number of 302 to 0. In this way,
302 can access the server with a random port number, which can solve the problem of reconnection failure
caused by the server determining that the connection state is abnormal.
8) Test Example
1 Open “USR-TCP232-M0_E45 setup” software.
Set USR-DR301 as TCP Client, Destination IP: 192.168.0.201. Destination port:8234.
Save the parameters and then research again to check if the parameters are correct . Also users can set the
work mode ,remote IP and the remote port via the webpage.
Diagram 4.2.1-2Configuration
3 Click “Send” at serial side. Remote IP and port becomes USR-DR301’s after receiving the data.
Then click “Send” in network part and send data to COM.
1) Base on normal UDP, it doesn't verify source IP address. Every time USR-DR301 receive one UDP data packet,
it changes destination IP to where data comes and it sends the data to the IP and port which communicate
latest.
2) Used in the scenario several net device want to communication with the module with high speed and do not
want to use the TCP mode.
3) Test Example:
1 Open “USR-TCP232-M0_ E45 Setup” Software: Set USR-DR301 as UDP Server, local port: 23.
2 Open “USR-TCP232-TEST” Software twice. Set work mode as UDP, local host IP is the IP of PC.
The port numbers are set to two different port numbers. In this paper, 23 and 8234 are used as examples. Click”
connect”. On the network side, the target host all fill in the IP of DR301, and the port all fill in the local port
number of DR301. Set the correct serial port parameters on one of the "USR-TCP232-TEST" software, click to open
the serial port, and another serial port of "USR-TCP232-TEST" is ignored.
3 Click send at network side, serial port will receive all the data; click send at serial side, only one
“USR-TCP232-TEST”software that communicate latest with DR301 can receive the data.
1) In this mode, the user's terminal device can send request data to the specified HTTP server through DR301, and
then DR301 receives the data from the HTTP server, parses the data and sends the result to the serial device.
2) User do not need to pay attention to the data conversion process between the serial port data and the network
data packet, and the data request of the serial port device to the HTTP server can be realized by simple parameter
setting.
3) When USR-DR301 sends data to HTTP server via serial port, set the URL, header remote domain name, IP and
port and save, then it only needs to send the header of requested data; DR301 will automatically add information such
as URL and header. The returned data, user can choose whether to remove the header.
4) Test example:
The use of TCP impersistent connections is mainly to save server resources, and is generally applied to a
multi-point scenario. With short connections, you can ensure that the existing connections are useful connections and
do not require additional controls for filtering.
The TCP impersistent connection function is applied to the TCP Client mode. After the short connection function is
enabled, the message is sent. If there is no data reception in the serial port or network port within the set time, the
connection will be automatically disconnected.
This function default disable, the time disconnection can be set from 2~255s, default is 3s.
If the TCP have not built, the data that serial received will be placed in the cache, and the USR-DR301 serial port
can receive 2Kbyte, after the TCP built, you can select whether to clear the cached data.
The default is not. Under the Httpd client mode or the TCP client mode, when enable the impersistent connection,
this function has no power.
By using the supporting software VCOM (virtual serial port), reveive the data from the specified virtual serial port,
and then the data is sent out in the form of network data, thereby solving the problem that the PC end software cannot
communicate with the networked device for the serial port mode, and is convenient for the user to use. .
How to connect USR-DR301 with Virtual COM:
1. Set USR-DR301 as TCP server(DR301 works as server, It is convenient for users to change the computer and still be
able to connect to the device.)
2. Open USR-VCOM software, click “Add COM’ and select COM2 (Avoid existed COM).
Net Protocol: TCP Client
Remote IP and port is the IP and port of USR-DR301
Remarks: Can write the name of device
3. Click “OK’ to check whether connection is built. “Connected” means ready for data transmission.
Modbus gateways include: Modbus RTU and Modbus TCP protocol conversion.
USR-Cloud software is a platform for communication between devices and PC software. The cloud software is
mainly used for data transmission or monitoring remotely. This function only works in TCP client mode.
Login link of USRIOT Cloud: http://console.usriot.com
Remote server address: clouddata.usriot.com
Local port: The port of device, Remote port: Cloud software’s port
Heartbeat packet is divided into network heartbeat and serial port heartbeat. It can send heartbeat packet to serial
port or to network, can not send together.
Serial heartbeat packet: It can be sent to the serial port as a fixed query command. To reduce the communication
flow, user can choose to send heartbeat package instead of the send query command from server. When there is data
send from the serial port, serial heartbeat do not stop.
Network heartbeat packet: It used for maintaining connection. Only valid at the mode of TCP client and UDP client.
When there is data transmission send from network interface, the net heartbeat packet stop.
The heartbeat package feature is turned off by default. Set in the web page, the settings interface is as follows:
USR-DR301 supports self-defined registration package function and also supports to send self-defined registration
package after connection establishment, meanwhile, it supports to send registration package when sending data.
There are three register package: USR-cloud, MAC register and self defined register.
Network registration packet includes: Establish a connection to send the registry packet, data carrying or both. The
self-defined register content can be set according the requirement, at most for 40 bytes, supports HEX, MAC register
package default is HEX, modify via change the MAC address.
Establish a connection to send the registry packet: Send the registration packet immediately after the connection is
established. The main purpose is to allow the server to identify the data source device or to obtain a password for the
server function authorization.
DR301 supports custom webpage functions. By customizing webpages, customers can upgrade their webpage
code (such as modifying logo or name) to DR301, which is more convenient for customers. Note that when upgrading a
custom web page, the Destination IP is set to the IP address of DR301, and the final web page file name must be "fs".
Steps:
1. Download the software needed to upgrade . http://www.usr.cn/Download/880.html---(待更新)
2. After editing the page code, open “USR-UpgradeHtml For Test V1.0.0.exe”, destination Ip is USR_DR301’ IP,
port (1501), start address(8023000) and maxsize(1B000) fill as the below picture and do not change. The
select path should be the file named “fs” then click upgrade.
Then upgrade.
4.8.4. Link
Link pin is the status indicator pin for USR-DR301 to built communication. Link pin can be used as indication pin for
TCP connection status.
When connected, it output low level; When unconnected, high level.
When USR-DR301 is under TCP model, Link pin will pull down. otherwise, it stays in high level.
When USR-DR301 is under DUP model, Link pin will always pull down. The "Link" alternate pin in the USR-DR301
can be used as a Link indication.
Note: for the link pin is in the shell, this function only can used on the USR-DR301 PCBA.
4.8.5. Index
At most there can be 8 links when the USR-DR301 in the TCP server mode. The max number can set from 1to 8 as
you want. Here we take the default number is 8 as example. Server send data to 8 clients, or the server receive the data
from 8 clients, open the Index, mark to divide the different clients and user can recognize the data sources according to
the mark, meanwhile send different data to special clients.Index function can be set by software or web-page.
Enable the Index function and display the corresponding device number of the client before the communication
data. The specific parameters are as follows:
USR-DR301 can configure serial port packaging time and serial port packaging length. USR-DR301 will make
packaging for the data of serial port according to the packaging length and packaging time in the transparent
transmission mode. Default packaging time is4 byes and the length is 1024 bytes.
T= 1/baud rate*10*4
When USR-DR301 receives data from network and then send to serial port, as the limit of serial port speed, user
have to control the flow, if not the problem of data overflow on serial port side will occur. So data flow is required to
calculated when sending data from network to serial port.
Example:
Network sends data in m bytes every n seconds. Method of checking if there is overflow: ( Supposed network
condition is good and network data transmission time is negligible)
1 If there is no overflow, m bytes data must be transmitted within n seconds, then the transmitting time of M
bytes data:
If n >2T, then data will not overflow, USR-DR301 can work normally. Just need keep n>T under baud rate 9600.
(115200,N,8,1) 55 AA 55 01 C2 00 03 C6
(9600,N,8,1) 55 AA 55 00 25 80 03 A8
5. Setting Protocol
USR-DR301 includes two protocol: network setting protocol and serial port setting protocol.
To configure across the net, all the communication protocol using the UDP, lower one is in front. When user are
configuring, please keep the remote port is 1500, and local port can be random.
1. Build SOCKET:
Build UDP SOCKET, destination IP: 255.255.255.255, destination port: 1500. Low is in front.
2. Setting command process:
1 The network send searching command
2 USR-DR301 returns IP address and MAC
3 The network read USR-DR301’s parameter
4 Organize setting command according to MAC, known user name/password and parameter to be configured.
5 Send setting command
6 USR-DR301 returns “correct setting”
1. Command examples
1 Search command example
Search command is set to:
FF 01 01 02
Sum check: 02 = 01 + 01
2 Reset command example
Send bytes: FF 13 02 00 71 77 7c 42 2F 61 64 6d 69 6e 00 61 64 6d 69 6e 00 Fc
Sum check:
Fc= 13 + 02 + ... + 6E + 00
From 4th to 9th is the MAC of the DR301, the last 12 bytes before the sum check is the username and password
User name and password both are 6 byte, bits 0 for the lack. ( the last one of the username and password must be
0)
3 Read settings command example
Send (22 bytes):FF 13 03 00 71 77 7c 42 2F 61 64 6d 69 6e 00 61 64 6d 69 6e 00 Fd
Sum check:
Fd= 13 + 03 + ... + 6E + 00
From 4th to 9th is the MAC of the DR301, the last 12 bytes before the sum check is the username and password
User name and password both are 6 byte, bits 0 for the lack. ( the last one of the username and password must be
0)
Basic Parameter:
Name Byte Example Explanation
Port parameter:
Name bytes example Explanation
FF 52 06 00 71 77 7c 42 2F 61 64 6d 69 6e 00 61 64 6d 69 6e 00 00 c2 01 00 08 01 01 01 00 00 00 00 8c 4e 2a 20
31 39 32 2e 31 36 38 2e 30 2e 32 30 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c9 00 a8c0 00 01 00
00 00 00 00 00 00 04 00 00 00 00 EF
sum check:f0 = 52 + 06 + ... + 00
From 4th to 9th is the MAC of the DR301, from 10th to 22nd is username and password, later bytes is the port
parameters for fix the length, last one is sum check.
3 restore to factory setting command:
Send:FF 13 0b 00 71 77 7c 42 2F 61 64 6d 69 6e 00 61 64 6d 69 6e 00 07
Sum check: 07 = 13 + 0b+ ... + 6E + 00;
From 4th to 9th is the MAC of the DR301, from 10th to 21nd is username and password, both password and username
are 6 bytes, please fill 0 in the lack.
4 cloud setting command
Send: FF 13 0c 00 71 77 7c 42 2F 61 64 6d 69 6e 00 61 64 6d 69 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 08;
Sum check: 07 = 13 + 0c + ... + 6E + 00+...+00;
From 4th to 9th is the MAC of the DR301, from 10th to 21nd is username and password, both password and username
are 6 bytes, please fill 0 in the lack.
Later are the ID of the USR-cloud, password, the last one is sum check.
⑤ heartbeat package and register package
Send: FF 68 21 D8 B0 4C 44 85 13 61 64 6D 69 6E 00 61 64 6D 69 6E 00 04 1E 00 0A 0A 77 77 77 2E 75 73 72 2E 63
6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 77 77 77 2E 75 73 72
2E 63 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 59;
Sum check: 59 = 68 + 21 + ... + 6E + 00+...+00;
From 4th to 9th is the MAC of the DR301, from 10th to 21nd is username and password, both password and username
are 6 bytes, please fill 0 in the lack.
Later are the direction of the heartbeat package, register package, time of the heart beat, heart beat length and
register package length. Both register package and heartbeat package are 40 bytes, fill 0 in then lack, the last one is sum
check.
Heart beat package and register package
Name Bytes Example content
Heartbeat register package:
1st 1: heart beat package send to net
interface
nd
2 1: send heart beat package to
serial port
3rd 1: connecting and send register
package
H_R_ucFlags 1 00 th
4 1: data carry the register package
th
5 1: drop the package header of the
Httpd
6th 1: enable setting parameter from
the serial parameters
th
7 1: enter the heartbeat package in
HEX
Return command:
55 53 52 2D 4B 32
19~34 Application_title 00 00 00 00 00 00 Device name
00 00 00 00
35 checksum F0 checksum
For USR device is in transparent mode normally, you must enter AT command mode at first. Then you can send AT
command to configure or query the settings. After you configure the USR device, you should restart the USR device to
make the settings take effect. Every time module restart will work in work mode rather AT command mode.
Every AT command must add character carriage return <CR> and line feed <LF>. In Hex, <CR> is 0x0D
<LF> is 0x0A.
The default UART port parameters of the module are: baud rate1152000, no parity, data 8 and stop 1.
Time tree
Time requirement:
T1>the interval of serial port package
T2<300ms
T3<300ms
T5<3s
Change transparent transmission mode to AT command mode :
1. Serial mode device send “+++”to module continuously. If the module received ‘+++’ successfully then it will send “a”
back.
2. When module received “a” and then user need to send other “a” to uart within 3s.
3. The module will return ‘+ok’ when module received ‘a’ successfully. And enter into command mode
Change AT command mode to transparent transmission mode:
1. Serial device send “AT+ENTM”to module.
2. After the module receive the commend, feedback “+ok”, then back to the previous working mode.
Input AT command via CRT serial debugging of programmer
Based on the ASCII command , the format of the AT command are as below:
< >: the content that you have to choose
[ ]: the part can be select
Command:
AT+<CMD>[op][para-1,para-2,para-3,para-4…]<CR><LF>
AT+: command prefix
[op]L: command operating code, parameters setting or query;
“=” parameters setting
“NULL” query
5.2.3. AT Command
AT Command List:
NO command Instr
1 E Enable/disable the echo function
2 Z Restore module
3 VER Query the vision
4 ENTM Exit AT command mode
5 RELD Reset default settings
6 MAC Query module MAC address
7 WEBU Setting/ query username and password
8 WANN Setting/ query WAN port parameters
9 DNS Setting/ query DNS server address
10 WEBPORT Setting/ query webpage port
11 UART Setting/ query serial parameters
6. Parameter Configuration
To make sure setup software normal running, please check the below firstly:
1. USR-DR301 and setup software PC are within same LAN.
2. Disable the anti-virus software and firewall on PC.
3. Disable network card nothing to do with this testing.
Current IP address
MAC address
Total amount of data sent and received by all connections
The IP address of the connected device and the amount of data sent and received for each connection
2. Local IP Config
Save configuration after revising the parameters. Then restart.
customization
Buffer Data Before Connected: You can set whether to clear the cached data before the connection.
New connection in TCP Server mode kicks off old connection function
UART Set Parameter: The function of setting parameters through the serial port protocol can be enabled
through the webpage.
Modbus TCP: Disable by default.
1. AT+E
Function: query/ setting module echo of the AT command setting
Format: query:
A+E<CR>
2. AT+Z
Function: restart module
Format: setting:
AT+Z<CR>
<CR><LF>+OK<CR><LF>
Parameters: none
<note>: after perform this command correctly, module restart and exit the AT command mode.
3. AT+VER
Function: query module firmware version.
Format: query:
AT+VER<CR>
<CR><LF>+OK=< ver ><CR><LF>
Parameters: ver: query module firmware version.
4. AT+ENTM
Function: exit the AT command mode and enter the transparent transmission:
Format: setting:
AT+ENTM<CR>
<CR><LF>+OK<CR><LF>
Parameters: none
<note>: after perform this command correctly, module change into command mode from transparent
transmission mode.
5. AT+RELD
Function: module reset
Format: setting
AT+RELD<CR>
<CR><LF>+OK<CR><LF>
Parameters: none.
6. AT+MAC
Function: query module MAC
Format: query:
AT+MAC<CR>
7. AT+WEBU
Function: setting /query module username and password
Format: query:
AT+WEBU<CR>
<CR><LF>+OK=< username,password ><CR><LF>
setting:
AT+WEBU=< username,password ><CR>
<CR><LF>+OK<CR><LF>
Parameters: username: username, support 5 bytes at longest and can not be none:
password: password, support 5 bytes at longest.
E.g.: AT+WEBU=admin,admin
8. AT+WANN
Function: setting /query the IP of WAN( DHCP/STATIC ) that module access
Format: query:
AT+WANN<CR>
<CR><LF>+OK=< mode,address,mask,gateway ><CR><LF>
setting:
AT+WANN=< mode,address,mask,gateway ><CR>
<CR><LF>+OK<CR><LF>
Parameters: mode: web IP mode ( static/DHCP )
static: static IP/
DHCP: dynamic IP( address,mask,gateway parameters ignore )
Address: IP address
Mask: subnet masks
Gateway: gateway address
E.g.: AT+WANN=static,192.168.0.7,255.255.255.0,192.168.0.1
9. AT+DNS
Function: setting /query DNS server address:
Format: query:
AT+DNS<CR>
<CR><LF>+OK=< address ><CR><LF>
setting:
AT+DNS=< address ><CR>
<CR><LF>+OK<CR><LF>
Parameters: address: DNS server address( default value is 8.8.8.8).
E.g.: AT+DNS=8.8.8.8
10. AT+WEBPORT
Function: setting /query webpage port
Format: query:
AT+WEBPORT<CR>
<CR><LF>+OK=< port ><CR><LF>
setting:
AT+WEBPORT=< port ><CR>
<CR><LF>+OK<CR><LF>
Parameters: port: module the port of the web server that built in of module. default 80:
E.g.: AT+WEBPORT=80
11. AT+UART
Function: setting /query UART interface parameters
Format: query:
AT+UART<CR>
<CR><LF>+OK=< baudrate,data_bits,stop_bit,parity,flowctrl ><CR><LF>
setting:
AT+UART=< baudrate,data_bits,stop_bit,parity,flowctrl ><CR><LF>
<CR><LF>+OK<CR><LF>
Parameters: baudrate: baud rate600~460800bps,can be customized .
data_bits: data 5/6/7/8
stop_bits: stop 1/2
parity: parity
NONE( no parity )
EVEN(even parity )
ODD( odd parity )
MASK(1 parity)
SPACE( 0 parity )
flowctrl: flow control( none flow control, can not setting , default setting to be the NFC )
NFC: none: hardware flow control
E.g.: AT+UART=115200,8,1,NONE,NFC
12. AT+SOCK
Function: setting /query web protocol parameters format
Format: query:
AT+SOCK<CR>
<CR><LF>+OK=< protocol,IP,port ><CR><LF>
setting:
AT+SOCK=< protocol,IP,port ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Protocol: protocol type, including
13. AT+TCPSE
Function: module is TCP Server, the processing mechanism after the connection reaches the maximum number of
connections.
Format: query:
AT+TCPSE<CR>
<CR><LF>+OK=< status ><CR><LF>
setting:
AT+TCPSE=< status ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status: setting status keep/kick
keep: after reach the maximum number of connection, do not receive new one.
kick: after reach the maximum number of connection, delete the order one and
connect the new one.
E.g.: AT+TCPSE=keep
14. AT+SOCKLK
Function: query whether the TCP has connected
Format: query:
AT+ SOCKLK<CR>
<CR><LF>+OK=< sta ><CR><LF>
Parameters:
Sta: built the TCP connection or not
Connect: TCP connected
Disconnect: TCP not connected
15. AT+SOCKPORT
Function: setting /query local socket port
Format: query:
AT+SOCKPORT<CR>
<CR><LF>+OK=< sta ><CR><LF>
setting:
16. AT+RFCEN
Function: enable/ disable RFC221 7function
Format: query:
AT+RFCEN<CR>
<CR><LF>+OK=< status ><CR><LF>
setting:
AT+RFCEN =< status ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status:
ON: enable RFC2217function
OFF: disable RFC2217function
E.g.: AT+RFCEN=ON
17. AT+PDTIME
Function: query produce time
Format: query:
AT+PDTIME<CR>
<CR><LF>+OK=< time ><CR><LF>
Parameters:
time: produce time,
E.g.: 2016-10-18 11:20:02
18. AT+REGEN
Function: setting query registration package mechanism
Format: query:
AT+REGEN<CR>
<CR><LF>+OK=< status ><CR><LF>
setting:
AT+REGEN =< status ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status:
MAC: enable registration package mechanism, registration package is 6 bites MAC
Usr: customize registration package
Off: disable registration package mechanism
E.g.: AT+REGEN=MAC
19. AT+REGTCP
Function: setting query tcp client mode registration package perform mechanism
Format: query:
AT+REGTCP<CR>
<CR><LF>+OK=< status ><CR><LF>
setting:
AT+REGTCP =< status ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status:
first: send a registration package when connected the server at first time
every: add a registration package in front of the every data package sent to server.
all: send registration package when first connected to the server and add
registration package in front of the data package.
E.g.: AT+REGTCP=first
20. AT+REGCLOUD
Function: setting /query USR-cloud username and password
Format: query:
AT+REGCLOUD<CR>
<CR><LF>+OK=< name, password ><CR><LF>
setting:
AT+REGCLOUD=< name, password ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status:
name: USR-cloud device port:
password: USR-cloud password .
E.g.: AT+REGCLOUD=0000000000000000000000, 00000000
21. AT+REGUSR
Function: setting query customize registration package content
Format: query:
AT+REGUSR<CR>
<CR><LF>+OK=< data ><CR><LF>
setting:
AT+ REGUSR =< data ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
data: ASCII code in 40 bytes
E.g.: AT+REGUSR=www.usr.cn
22. AT+HTPTP
Function: setting /query the asking way under HTTPD Client mode.
Format: query:
AT+HTPTP<CR>
<CR><LF>+OK=< status ><CR><LF>
setting:
AT+HTPTP =< status ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status:
GET: is the http asking way
POST: is the http asking way
E.g.: AT+HTPTP=GET
23. AT+HTPURL
Function: setting /query the URL. Of the post
Format: query:
AT+HTPURL<CR>
<CR><LF>+OK=< URL ><CR><LF>
setting:
AT+HTPURL =< URL ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
URL: start with “/”, less than 99 bytes .
E.g.: AT+HTPURL=/2.php
24. AT+HTPHEAD
Function: setting /query Httpd Client customize package head message
Format: query:
AT+HTPHEAD<CR>
<CR><LF>+OK=< data ><CR><LF>
setting:
AT+ HTPHEAD =< data ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
data: customize package message, less than 199 bytes. And using <<CRLF>>
translating the characters in stead of the enter.
E.g.: AT+HTPHEAD=Accept:text<<CRLF>>
25. AT+HTPCHD
Function: setting /query filter the package head of the return information of Http
Format: query:
AT+ HTPCHD <CR>
26. AT+HEARTEN
Function: setting /query enable or not heartbeat package
Format: query:
AT+ HEARTEN <CR>
<CR><LF>+OK=< status ><CR><LF>
setting:
AT+ HEARTEN =< status ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status:
ON:enable heartbeat package
Off: disable heartbeat package
E.g.: AT+HEARTEN=ON
27. AT+HEARTTP
Function: setting /query heartbeat package send way
Format: query:
AT+ HEARTTP <CR>
<CR><LF>+OK=< type ><CR><LF>
setting:
AT+ HEARTTP =< type ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status:
NET: send heartbeat package to server
COM: send heartbeat package to serial port
E.g.: AT+HEARTTP=NET
28. AT+HEARTTM
Function: setting /query time of heartbeat package
Format: query:
AT+ HEARTTM <CR>
<CR><LF>+OK=< time ><CR><LF>
setting:
29. AT+HEARTDT
Function: setting query customize heartbeat package content
Format: query:
AT+ HEARTDT <CR>
<CR><LF>+OK=< data ><CR><LF>
setting:
AT+ HEARTDT =< data ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
data: less than 40 bytes ASCII code.
E.g.: AT+HEARTDT=www.usr.cn.
40. AT+ H
Function: help
Format: query:
AT+ H <CR>
<CR><LF>+OK=< sta ><CR><LF>
Parameters: sta: help information
7. Contact
8. Disclaimer
This document provide the information of USR-DR301 products, it hasn’t been granted any intellectual property
license by forbidding speak or other ways either explicitly or implicitly. Except the duty declared in sales terms and
conditions, we don’t take any other responsibilities. We don’t warrant the products sales and use explicitly or implicitly,
including particular purpose merchantability and marketability, the tort liability of any other patent right, copyright,
intellectual property right. We may modify specification and description at any time without prior notice.
9. Update History