Support 802.11b/g/n wireless standards.
Support usr-link.
Support route and bridge modes.
Support RS485 to Wifi/ Ethernet communication.
Rich indicator LED: Power, link, RXD, TXD.
Wide voltage DC 5~36V, support terminal power.
Support transparent transmission mode, serial command mode, HTTPD Client (GET, PUT and POST), MODBUS, AT
command mode.
Support three types of registration packets: MAC, USR-Cloud, custom.
Support custom heartbeat packet, distributing socket protocol, MODBUS polling function
Support timeout reset function, timing reset function.
Support remote upgrade.
Add hardware watch dog, makes more stable
Supports free framing and automatic framing on the serial port, for higher forwarding efficiency.
Support websocket and realize the timing communication for serial port and web page.
Support web page, serial/network AT command to configure parameters.
Support one key (press the reload button for more than 5 seconds) to restore factory settings.
Long distance communication: two serial server can transport for 150m(Test conditions: open line of sight, two WIFI
serial servers self-networking, 57600 baud rate, no packet loss during transmission).
USR-DR404 supports serial port to WIFI function, make the serial port (RS485)connection switch into TCP/IP net
interface to realize the bi-direction transparent transmission between serial port and WIFI/Ethernet. Enable serial devices
to have TCP / IP network interface function immediately, connect to the network for data communication, greatly extend
the communication distance of serial devices, as below:
USR-DR404 supports wireless WIFI and wired Ethernet communication modes, flexible networking and network
topology.
2.1. Wireless Networking Configuration
USR-DR404 can configure to be a STA or an AP. Can be set by AT command, web page, as below:
(1) AT command setting: Set by AT + WMODE, it can be set to AP or STA.
Example: Set the WIFI serial server to STA mode. After entering the AT command mode, send the following
command:
Set WIFI serial server to STA mode
AT+WMODE=STA
Restart
AT+Z
After restarting, the serial server will work in STA mode.
(2) Web page settings are as fellows:
For example, log in to the built-in web page of the serial server, enter the mode selection page, and select Station
mode (set the WIFI serial server to STA mode), as follows:
Jinan USR IOT Technology Limitedwww.usriot.com
Page 8
USR-DR404 user manualwww.usriot.com
8
Diagram 2Set WiFi mode in web page
Click “Apply”, enter “Device Management”interface, restart.
AP+STA function, can be set by AT command or customized as the factory default.
2.2. Wireless networking application
2.2.1. Wireless networking application(AP)
WIFI can do as a AP, other serial port device and PC as a STA can connect the WIFI, also it can connected to user
device via RS485, as fellows:
Diagram 3AP mode
The WIFI serial server works in AP mode. The above applications can be set using the following AT commands:
(1) Set the WIFI server to AP mode
AT+WMODE=AP
Jinan USR IOT Technology Limitedwww.usriot.com
Page 9
USR-DR404 user manualwww.usriot.com
9
(2) The parameters of the WIFI serial server in AP mode can be set according to needs or use the default
1. All AT command settings need to enter the AT command mode (for details, please refer to the section “4.3.1.
Serial AT Commands”)
2. After restarting the device, the parameter settings take effect. To refresh the original configuration information in
memory and restart the operation.
2.2.2. STA Mode
USR-DR404 do as STA and connect to other APs to form a wireless network, all STA take the AP as wireless networking
centre, mutual communication between STAs is completed through AP forwarding, as below:
Diagram 4STA mode
WIFI serial server parameter settings are as follows:
(1) Set the working mode of WIFI serial server:
AT+WMODE=STA
(2) Set the SSID, encryption mode, and password of the router to be connected (for example, the SSID of the route is:
USR-WIFI-TEST, the encryption mode is WPA2PSK, AES, and the password is www.usr.cn). As follows:
AT+WSSSID=USR-WIFI-TEST
AT+WSKEY=WPA2PSK,AES,www.usr.cn
(3) Restart
AT+Z
Jinan USR IOT Technology Limitedwww.usriot.com
Page 10
USR-DR404 user manualwww.usriot.com
10
2.2.3. AP+STA
USR-DR404 can support one AP and one STA meanwhile. Enable the AP+STA function, STA and AP interface can be
used meanwhile, STA interface connected to the router, and then connected to the server in the internet via TCPB; AP
interface can be connected by the phone/ pad (TCPA). So the TCP server, phone /pad can control the device connected to
the DR404 and configure the parameters for the DR404. As below:
Diagram 5AP+ STA mode
WIFI serial server parameter settings are as follows:
(1) Enable AP + STA function of WIFI serial server
AT+FAPSTA=on
(2) Parameters take effect after resetting the module
AT+RELD
(3) Set the WIFI serial server to STA mode, the WIFI serial server AP interface is still valid
AT+WMODE=STA
(4) Set the SSID, encryption mode, and password of the route to be connected (for example, the SSID of the route is:
USR-WIFI-TEST, the encryption mode id WPA2PSK, AES, and the password is www.usr.cn). As follows:
AT+WSSSID=USR-WIFI-TEST
AT+WSKEY=WPA2PSK,AES,www.usr.cn
(5) Set socket A, socket B
Socket A setting example:
AT+NETP=TCP,Server,8899,10.10.100.100
Set the IP and port of the server to be connected.
Socket B setting example:
AT+TCPADDB=192.168.1.100
AT+TCPPTB=18899
(6) Restart
AT+Z
Note:
Jinan USR IOT Technology Limitedwww.usriot.com
Page 11
USR-DR404 user manualwww.usriot.com
11
When the AP + STA function is enabled, the STA port needs to be connected to another router. Otherwise, the STA
port will continuously scan the router, which will affect the AP port during scanning, such as data loss. If the user
determines that the STA cannot connect to the AP at this time, you can use the command to stop the scanning of the STA
port:
AT+STTC=on/off
“on” means to scan the router, “off” means not to scan, this command will not save after restart.
AT+FSTTC=on/off
This command can be saved, takes affect after restart.
Web page settings: Login to built-in web pages, enter “STA Interface Setting”, enable AP+STA function.
After clicking “Apply”,restart to take affect.
2.2.4. Wireless Networking Applications (AP,STA)
USR-DR404 can be configured to be a STA and a AP , in theory support 2 wireless interface, one STA and one AP,
other STA will connected to the network via this AP.
Diagram 6Wireless Networking Application
Jinan USR IOT Technology Limitedwww.usriot.com
Page 12
USR-DR404 user manualwww.usriot.com
12
Item
Description
1
WMODE
Setting/query WIFI operating mode(AP、STA)
2
WSSSID
Setting/query related AP SSID
3
WSKEY
Setting/query encryption under the WIFI STA mode
4
WANN
Setting/query net parameters of the STA
5
WSLK
Query the wireless connection status of the STA
6
WAP
Setting/query the parameters under the WIFI AP mode
7
WAKEY
Setting/query encryption parameters under the WIFI AP
mode
8
LANN
Setting/query the IP under the AP mode
9
FEPHY
Enable/disable Ethernet interface
10
FVER
Setting/query module software version (N-Ver、Z-Ver)
Item
Description
WIFI serial server parameter settings are as follows:
The WIFI serial server numbered 1 works in STA mode, and the numbered 2 works in AP mode:
(1) For No. 1 WIFI serial server, set to STA
AT+WMODE=STA
(2) For No. 2 WIFI serial server, set to AP
AT+WMODE=AP
(3) The WIFI serial server No. 1 is connected to the AP (WIFI serial server 2) as a STA. Therefore, the SSID and
password to be connected to WIFI serial server 1 are the AP parameters of WIFI serial server 2.
The SSID and password of the No. 2 WIFI serial server can be queried by the following AT command:
AT+WAP
AT+WAKEY
Can also be set as required, or use the default parameters. The example of parameters setting of WIFI serial server
2 are as follows:
AT+WAP=11BGN,USR-DR404-TEST,Auto(Optional)
AT+WAKEY=WPA2PSK,AES,12345678(Optional)
An example of parameter setting of No. 1 WIFI serial server is as follows (the AP parameters to be connected
correspond to the SSID and password of WIFI serial server 2):
AT+WSSSID=USR-DR404-TEST
AT+WSKEY=WPA2PSK,AES,12345678
Consistent with WIFI serial server 2 parameters.
(4) Restart
AT+Z
2.3. Wired Networking
Related AT command:
Form 2Related AT Command
Jinan USR IOT Technology Limitedwww.usriot.com
Page 13
13
1
NETP
Setting/query the net protocol parameters of the TCPA
The USR-DR404 serial server provides a 100M Ethernet interface. Through this 100M Ethernet interface, users can
realize the interconnection of the three interfaces of WIFI, serial port and Ethernet port. In terms of networking, the
USR-DR404 serial server network port can be set to LAN port and WAN port; at the same time, it supports bridge mode and
routing mode to correspond to different specific applications.
2.4. Wired Networking Application
2.4.1. Wired Networking Application(AP + LAN)
When USR-DR404 works in AP mode, other STA devices can connect to this WIFI serial server through RJ 45 or WIFI. In
this networking, all device will be distributed a IP in same network segment with USR-DR404. Application diagram as fellow:
Jinan USR IOT Technology Limitedwww.usriot.com
Page 14
USR-DR404 user manualwww.usriot.com
14
Diagram 8AP+LAN Application
WIFI serial server parameter settings:
(1) Enable Ethernet interface
AT+FEPHY=on
(2) The above settings will take effect after restoring factory settings
AT+RELD
AT + RELD command does not restore the above settings.
(3) Set USR-DR404 to AP
AT+WMODE=AP
(4) For the LAN parameters of the serial server, can use the default parameters or modify the IP address (DHCP
gateway) and subnet mask of the serial server. Here are the default parameters:
AT+LANN=10.10.100.254,255.255.255.0
(5) Restart
2.4.2. Wired Networking Applications (AP+ WAN)
USR-DR404 works in AP mode, set the Ethernet interface to WAN, connected to the router that can search the internet,
and enable the DHCP. Now USR-DR404 works as a second grade router, PC and pad connect to the AP(USR-DR404) can can
be online, the default AP is USR-DR404_xxxx, no encryption, 000000000000which can be setting by web page or AT
command.
After the DR404 connects to the AP and get IP address from AP(192.168.1.1). The DR404 can form a subnet(default
10.10.100.254). The device on the Ethernet interface is assigned an address by the serial server, such as 10.10.100.100 in
the below diagram:
Jinan USR IOT Technology Limitedwww.usriot.com
Page 15
15
WIFI serial server parameter settings:
USR-DR404
(1) Enable Ethernet interface
(2) Set the working mode of Ethernet to WAN
(3) The above settings will take effect after restoring factory settings
(4) DR404 works in AP mode, enable DHCP(Default)
(5) For security reasons, can modify the AP name and encryption parameters (optional)
(6) Can keep the default or set LAN parameters of serial server, IP address (DHCP gateway) and subnet mask
(optional)
IP address obtained by the serial server from the AP!
(7) Restart
USR-DR404 user manualwww.usriot.com
Diagram 9AP+WAN Application
AT+FEPHY=on
AT+FVEW=enable
AT+RELD
AT + RELD command does not restore the above settings.
AT+LANN=192.168.2.1,255.255.255.0
Note: It is necessary to ensure that the LAN IP address set cannot be on the same network segment as the WAN
2.4.3. Wired Networking Applications (Router)
DR404 works as a STA, in router mode(software is N-Ver). Connected to the AP and obtained an IP address from the
AP such as 192.168.1.101 in the below diagram. DR404 forms a subnet(default 10.10.100.254) which distributes the IP
address to the devices that connect to its Ethernet interface. As below, PC1 in the subnet, for DR404 works in router mode,
PC1 can connected to the PC2, but PC2 can not connected to PC1.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 16
USR-DR404 user manualwww.usriot.com
16
USR-DR404
Diagram 10Router Application
WIFI serial server parameter settings:
(1) Set the serial server software version to N-Ver
AT+FVER=n
(2) Enable Ethernet interface
AT+FEPHY=on
(3) Reset the module, the setting will take affect
AT+RELD
AT + RELD command does not restore the above settings.
(4) Set the working mode to STA
AT+WMODE=STA
(5) Set the SSID and password of the route to be connected (according to the actual parameters of the route)
For example: AT+WSSSID=USR-WIFI-TEST
AT+WSKEY=WPA2PSK,AES,www.usr.cn
(6) Set LAN parameters of serial server, IP address (DHCP gateway) and subnet mask
Query the IP obtained by the serial server from the AP:
AT+WANN
Set the LAN parameters of the serial server to ensure that the LAN IP address cannot be on the same network
segment as the WAN IP address obtained by the serial server from the AP. Since this example is not on a network
segment, can keep the default:
AT+LANN=10.10.100.254,255.255.255.0(Optional)
(7) Restart.
Web page setting: Log in to the built-in web page of DR404, enter the page of Ethernet setting, and set the Ethernet Mode
to ”n” in the Ethernet mode settings.
As shown below:
Jinan USR IOT Technology Limitedwww.usriot.com
Page 17
USR-DR404 user manualwww.usriot.com
17
USR-DR404
Diagram 11Ethernet port
Click “Apply”, then restart the module to take affect.
2.4.4. Wired Networking Applications (Bridge)
DR404 works as a STA , and works in bridge mode(software is Z-Ver). After connecting to AP, device connected to the
Ethernet interface will get an IP address from AP such as 192.168.1.101 in below diagram. In the whole network, DR404
works as a transparent device, PC1 and PC2 can communicate to each other without any limited. But if you want to realize
the communication between the DR404 and other devices, you need to set a static LAN IP address such as 192.168.1.10.
Diagram 12Bridge Application
WIFI serial server parameter settings:
(1) Set the serial server software version to Z-Ver
AT+FVER=z
(2) Enable Ethernet interface
AT+FEPHY=on
(3) Reset the module, the setting will take affect
AT+RELD
AT + RELD command does not restore the above settings.
(4) Set the working mode to STA
AT+WMODE=STA
Jinan USR IOT Technology Limitedwww.usriot.com
Page 18
USR-DR404 user manualwww.usriot.com
18
(5)Set the SSID and password of the route to be connected
For example: AT+WSSSID=USR-WIFI-TEST
AT+WSKEY=WPA2PSK,AES,www.usr.cn
(6)Set LAN parameters of serial server, IP address (DHCP gateway) and subnet mask
AT+LANN=192.168.1.10,,255.255.255.0
(7) Restart.
Web page setting: Log in to the built-in web page of DR404, enter the page of Ethernet setting, and set the Ethernet Mode
to ”z” in the Ethernet mode settings.
As shown below:
Diagram 13Ethernet Mode Setting
Click “Apply”, then restart the module to take affect.
3. Product function
3.1. Work mode
USR-DR404 serial server has five working modes: transparent mode, serial command mode, HTTPD Client mode,
Modbus TCP <=> Modbus RTU mode, AT command mode. Except for the AT command mode, the switching between the
other modes can be set through the USR-DR404 built-in web page (please refer to the relevant section of "Mode Selection"
in this manual) or the AT command (please refer to the "AT + TMODE" section);
The first three modes can send “+++” and “a” successively through the serial port. USR-DR404 will return the
confirmation codes“a” and“+ ok” in order to switch to the AT command mode. AT + ENTM can return USR-DR404 from
AT command mode to the original working mode. For details, please refer to the related chapter of “Serial AT Command”.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 19
USR-DR404 user manualwww.usriot.com
19
Header
Length
Function
code
Reserved
parameter
Destination
port
Destinatio
n address
Data
Parity
2
2
(n+m+
5)
122mn
1
3.1.1. Transparent mode
USR-DR404 supports transparent transmission mode. Under this mode, the data needs to be sent and received will be
transported transparently between the serial port and WIFI/Ethernet, no analyzing, minimize the complexity of use.
3.1.2. Serial command mode
In this mode ,when USR-DR404 works in UDP client or TCP client, allow sending serial data to different servers.
Diagram 14Serial command mode
The MCU sends data packets according to the following format. After the WIFI serial server has finished parsing, it only
sends n bytes of data to the destination address. When data is returned, the data is output directly from the serial port
without parsing.
Form 4Serial command mode
Header:
0x550xaa
Length:
The total number of bytes from function code(included) to parity (do not included), the high is in front.
Function code:
Bit0:(UDP:0 ;TCP:1)
Bit1:(long connection:0)Note: Only long connections are currently supported.
Bit2:(IP: 0;domain name: 1)
Jinan USR IOT Technology Limitedwww.usriot.com
Page 20
USR-DR404 user manualwww.usriot.com
20
No.
Item
Description
Bit7:(Simple protocol:0;Full protocol:1)Note: Only simple protocols are currently supported.
Note:For Bit1, long connection, then after sending data, the connection will remain until the target address is changed
again.
For Bit2, it indicates whether the destination address is IP or domain name. If it is IP, the destination address is 4 bytes;
if it is a domain name, the length of the destination address is the length of the entire domain name string (where the
last byte of the destination address is 0x00, is the end of the string, the length of the domain name is indefinite)
For Bit7, under the simple protocol, the reply frame contains only data; under the full protocol, the reply frame will fail
to send, waiting for timeout, and the frame format of the response device IP under UDP broadcast.
Reserved parameter:
First byte: long connection, 0X00.
Second byte: reserved.
Destination port:
Low byte first, such as port 33, here is 21 00.
Destination address:
If it is IP, it is 4 bytes. For example, 192.168.0.133 means 85 00 A8 C0; if it is a domain name, the address length is
indefinite and ends with “\ 0”.
Data:
Variable length, up to 1000 bytes
Parity:
From the function code, to the byte before the parity, add. The following are examples of specific applications:
The HTTPD Client mode supports three HTTP request methods: POST, PUT, and GET. After setting the specific content
of the HTTP header through the AT command or the web page, each time data is sent, the WIFI serial server will
automatically encapsulate the sent data into HTTP protocol data and send it to the designated HTTP server. The data
received from the server will be directly transmitted to the serial port without any processing.
The following are specific application examples:
First set HTTP parameters through AT command:
Jinan USR IOT Technology Limitedwww.usriot.com
Page 21
USR-DR404 user manualwww.usriot.com
21
1
HTPMODE
New and old, HTTP header setting mode switch(HTTPD
Client)
2
HTTPURL
Old setting/query HTTP server IP and port
3
HTTPTP
Old setting/query HTTP requesting type
4
HTTPPH
Old setting/query HTTP protocol header path
5
HTTPCN
Old setting/query HTTP protocol header Connection
6
HTTPUA
Old setting/query HTTP protocol header User-Agent
7
HTPSV
New setting/query server address and IP(HTTPD Client)
Form 5Related AT Command
If the data sent is 1234, then you will receive the following data on port 80 of test.usr.cn.
POST /2.php? HTTP /1.1
Connection:keep-alive
User-Agent:lwip1.3.2
Content-Length:4
Host:test.usr.cn:80
1234
If the HTTP type is GET, the data received on port 80 of test.usr.cn is
GET /1.php? data= 1234 HTTP /1.1
Connection:keep-alive
User-Agent:lwip1.3.2
Host:test.usr.cn:80
When the request method is POST or PUT, the data of the serial port will be added after the HTTP protocol header;
when the request method is GET, the data of the serial port will be added after the protocol header path.
Users can customize the content of the HTTP header in the new version of the definition method, and can add, delete,
and modify the content of each HTTP header according to their own needs(If the HTTP request type is POST / PUT,
USR-DR404 will automatically add Content-Length).The setting commands include "AT + HTPMODE, AT + HTPSV, AT + HTPTP,
AT + HTPURL, AT + HTPHEAD". For specific command setting procedures, please refer to the “AT command” chapter.
Similarly, there are corresponding settings pages in the web page.
Note: The above definition method is called the old definition method. In the new version of the setting method, a
new HTTP header definition method is added. If you use the AT command to set the HTTP header, please use "<< CRLF >>"
instead of carriage return and line feed. There is no need to consider carriage return when setting the built-in web page.
The web page settings are as follows:
(1) Set HTTPD request type:
Jinan USR IOT Technology Limitedwww.usriot.com
Page 22
USR-DR404 user manualwww.usriot.com
22
Diagram 15HTTPD Client requesting type
(2) In “Application Setting”, select Httpdclient Mode as long/short.
Diagram 16HTTPD Client mode settings
If set to short connection mode, timeout can be set within the range of 3-65535 (s).
Jinan USR IOT Technology Limitedwww.usriot.com
Page 23
USR-DR404 user manualwww.usriot.com
23
Diagram 17HTTPD Client short connection timeout setting
AT command setting:
(1) Setting/query the Httpdclient Mode (long/short), for example:
AT+HTTPSCEN=short
(2) Setting/query the timeout of short connection mode, for example:
AT+HTTPSCT=3
3.1.4. Modbus TCP <=> modbus RTU
This serial server supports Modbus TCP to Modbus RTU (does not support Modbus ASCII); the network parameters of
the module should correspond to the network parameters of the application software. The TCP server corresponds to the
TCP client and the port must be the same. For the working mode, select Modbus TCP <=> Modbus RTU.
Diagram 18modbus TCP <=> modbus RTU
Setting by AT command:
AT+TMODE=modbus
Setting by web page:
Jinan USR IOT Technology Limitedwww.usriot.com
Page 24
24
3.1.5. AT command mode
Serial device
USR-DR404
USR-DR404 user manualwww.usriot.com
Diagram 19Data transfer mode
Under AT command, send AT command to query the current status and parameters of the W610.
For details on the method and timing for entering and exiting the AT command mode, refer to the relevant section of
“4.3. Command Configuration” in this manual.
3.2. Socket
Socket A includes TCP Server, TCP Client, UDP Server, UDP Client and socket B supports TCP Client and UDP client.
When socket A in TCP server , at most supports 24 TCP client to connect. In multi-TCP link connection mode, data
transmitted from TCP will be forwarded to the serial port one by one. The data coming from the serial port will be copied
into multiple copies, and one copy will be forwarded on each TCP link. The specific data flow chart shows:
Jinan USR IOT Technology Limitedwww.usriot.com
Diagram 20Multi TCP link data transmission diagram
Socket A settings: AT+NETP/AT+TCPTO/AT+TCPLK/AT+TCPDIS
Socket B settings: AT+TCPB/AT+TCPPTB/TCPADDB/TCPTOB/TVPLKB/TCPDIS
Form 7Socket B related AT command
3.3. UART
3.3.1. Parameters
Form 8Serial port parameters
Webpage setting:
Log in the build-in webpage, under the “Application Setting”page, as below:
Jinan USR IOT Technology Limitedwww.usriot.com
Page 26
USR-DR404 user manualwww.usriot.com
26
Diagram 21Set serial port parameters on web page
AT command:
If the user needs to modify the baud rate of the DR404 to 115200bps, as follows:
AT+UART= 115200,8,1,None,NFC
3.3.2. UART Free framing
Take sent data from serial device to the DR404 as an example to show the steps of the free framing: if n is the free
frame interval, unit is ms, when T1 >n, T2<n, T3<n, T4<n, T5<n and T6>n, then take byte1 -byte5 as a frame, as bellow:
Diagram22Switching command mode order
Default interval between 2 bytes is 10ms, that means if the time more than 10ms, this frame will be over.
And interval can change into 50ms to meet the custom’s requirement, setting command are as fellows:
AT+FUARTTE=normal
After setting, restore to the factory default value will enable it.
AT+RELD
Note: AT+RELD can not restore the above setting.
After testing, if the interval set to be 10 ms, and small amount of data, the delay time of the loopback from WIFI
->UART->WIFI is about 40~50ms.
But ,if the interval is 10ms and the MCU can not confer to send the next bytes in 10ms, and the serial data might be
breaking.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 27
USR-DR404 user manualwww.usriot.com
27
If you want to restore the default interval --10ms, using the below AT command:
AT+FUARTTE=fast
Also need to restore to enable it.
For more AT commands, please refer to “AT command” in this manual.
3.3.3. UART auto-framing mode
For a fixed-length data frame on the serial port, you can turn on the UART auto-frame function and set the auto-frame
trigger time and the trigger frame length.USR-DR404 will automatically compose the data received from the serial port and
forward it to the network.
1. Auto framing trigger frame length: USR-DR404 receives the specified number of bytes from the serial port, forms a
data frame, and forwards it to the network.
2. Auto framing trigger time: if the data received from the serial port is less than the auto framing trigger frame length
within the trigger time, USR-DR404 will forward the received data to the network.
The automatic framing time is calculated from the time when the WIFI serial server receives the first byte from the
serial port. As shown below:
Diagram 23Trigger Length
Diagram 24Trigger Time
UART auto framing can be set through the built-in web page “Application Setting -- UART AutoFrame Setting” of DR404
or set by ATcommand.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 28
USR-DR404 user manualwww.usriot.com
28
Name
Packet Header
Baud Rate
Bits parameter
Parity
Bytes3311
Explanation
reduce
misjudgment
High is in front,
three bytes
represent a baud
rate value
data bit, stop bit,
parity
Remove 4 bits of
header and
ignore the high
bit
(115200,
N,8,1)
55 AA 55
01 C2 00
83
46
(9600,
N,8,1)
55 AA 55
00 25 80
83
28
Bit #
Explanation
Value
Description
1:0
Data bit selection
00
5 bits
01
6 bits
10
7 bits
11
8 bits
2
Stop Bit
00
1 bit
01
2bits
3
Parity Enable
00
Disable Parity
01
Enable Parity
5:4
Parity Type
00
ODD
01
EVEN
10
Mark
11
Clear
8:6NC000
0
3.4. Synchronous Band Rate (RFC2217)
Synchronous baud rate is named RFC2217. USR Similar RFC2217 make adjustments on the basis of RFC2217 protocol
to improve accuracy oftransmission. Enable the baud rate function of WIFI serial server via AT command:
AT+AABR=on
This command takes effect immediately and does not need to be restarted. After restarting, the WIFI serial server will
restore the previous baud rate.
3.5. RFC2217 Protocol Description
Protocol length is 8 bytes. And values taken for example is in HEX:
Serial parameter bit:
Jinan USR IOT Technology Limitedwww.usriot.com
Page 29
USR-DR404 user manualwww.usriot.com
29
Name
Bytes
Description
1
Packet
Header
1
Fixed value: 0xFF
2
Length
2
Number of all bytes after length (excluding length) and before
parity (excluding parity)
3
Command
1
Command type, 0x01 is the query command
4
Parity
1
The accumulated sum of all bytes after the header (excluding
the header) and before the parity (excluding the parity).
Name
Bytes
Description
1
Packet
Header
1
Fixed value: 0xFF
2
Length
2
Number of all bytes after length (excluding length) and before
parity (excluding parity)
3
Command
1
Command type, the reply command corresponding to the query
command is 0x81
4
Number of
APs
1
Number of APs searched
5
SSID1
Indefinite
length
SSID of route 1
6
Terminator
1
Terminator for SSID of Router 1, fixed value is 0x00.
7
Signal
strength1
1
The signal strength of router 1 network, ranges from 0 to 100, and
the corresponding actual value is 0% to 100%.
8
Terminator
2
Terminator for signal strength 1, 0x0D, 0x0A
。
………
………
M
SSIDn
Indefinite
length
SSID of route n
M+1
Terminator
1
Terminator for SSID of Router n, fixed value is 0x00.
M+2
Signal
strength n
1
The signal strength of router n network, ranges from 0 to 100, and
the corresponding actual value is 0% to 100%.
M+3
Terminator
2
Terminator for signal strength n, 0x0D, 0x0A
。
M+4
Parity
1
The accumulated sum of all bytes after the header (excluding the
header) and before the parity (excluding the parity).
3.6. USR-Link
When works in AP mode, DR404 will open a UDP port which number is 49000 to receive the USR-link. Connected
directly to the WIFI of the DR404, phone query the SSID and set the router’s SSID and password via the command under the
UDP. Then the DR404 will restart automatically and connect the router, now it works in STA mode.
Protocol format description:
Form 9Query Command
Form 10Reply Command
Jinan USR IOT Technology Limitedwww.usriot.com
Page 30
USR-DR404 user manualwww.usriot.com
30
Name
Bytes
Description
1
Packet
Header
1
Fixed value: 0xFF
2
Length
2
Number of all bytes after length (excluding length) and before
parity (excluding parity)
3
Command
1
Command type, 0x02 is the setting command.
4
Reserved
words
1
Default is 0x00
5
SSID
Indefinite
length
SSID of route
6
Delimiter
2
SSID terminator, fixed values are 0x0D and 0x0A.
7
Password
Indefinite
length
Password of route
8
Parity
1
The accumulated sum of all bytes after the header (excluding
the header) and before the parity (excluding the parity).
Name
Bytes
Description
1
Packet
Header
1
Fixed value: 0xFF
2
Length
2
Number of all bytes after length (excluding length) and before
parity (excluding parity)
3
Command
1
Command type, 0x82 is the reply command corresponding to
the setting command.
4
Parity
1
The parity result of the SSID. If the SSID can be found, the
corresponding value is 0x01. If not, the value is 0x00.
5
Parity
1
The parity result of the password. If the password is in the
correct format, the value is 0x01. If it is incorrect, the value is
0x00.
6
Parity
1
The accumulated sum of all bytes after the header (excluding
the header) and before the parity (excluding the parity).
For example:
Mobile phone sends to WIFI serial server (hexadecimal number): FF 00 01 01 02
WIFI serial server returns to mobile phone (hexadecimal number): FF 00 14 81 02 54 45 53 54 31 00 40 0D 0A
54 45 53 54 32 00 37 0D 0A 1F
Explanation: The mobile phone sends a query command to the WIFI serial server to query the information of the
router. The information returned by the WIFI serial server to the mobile phone is: there are 2 routers, the SSID of router 1 is
"TEST1" and the signal strength is 64%; the SSID of router 2 is "TEST2" and the signal strength is 55%.
Note: The router information returned by the WIFI serial server is sorted according to the signal strength.
Form 11Setting Command
Form 12Reply Command
For example:
Mobile phone sends to WIFI serial server (hexadecimal number): FF 00 0F 02 00 54 45 53 54 31 0D 0A 31 32 33 34 35
36 CE
Jinan USR IOT Technology Limitedwww.usriot.com
Page 31
USR-DR404 user manualwww.usriot.com
31
WIFI serial server returns to mobile phone (hexadecimal number): FF 00 03 82 01 01 87
Explanation: The mobile phone sends a setting command to the WIFI serial server, sets the SSID to "TEST1" and the
password to "123456". The information returned by the WIFI serial server to the mobile phone is:
There is a network with SSID "TEST1" and the password format is correct.
3.7. USR Cloud
USR Cloud includes Scada cloud and cloud monitor.
If your serial device supports standard MODBUS RTU data, the cloud platform can display serial device data by
establishing a TCP connection with the DR404.
USR Cloud address: https://mp.usriot.com.After registering an account, log in.
USR Cloud server address is: tcp.mp.usriot.com, port 15000. The device number is 20 digits and the communication
password is up to 8 digits.
3.8. Heartbeat Packet Function
In the network transparent transmission mode, the user can choose to enable the custom heartbeat packet function.
The heartbeat packet can be sent to the network or serial device:
Diagram 25Heartbeat packet
The main purpose of sending to the network is to maintain a connection with the server, and at the same time let
the server that is idle for a long time (do not send data to the server for a long time) to detect whether the current
connection status is valid.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 32
USR-DR404 user manualwww.usriot.com
32
Item
Description
1
HEARTEN
Query / Se whether to enable the heartbeat packet
function
2
HEARTTP
Query / Set heartbeat packet sending mode
3
HEARTDT
Query / Set heartbeat packet data
4
HEARTTM
Query/ Set heartbeat packet sending interval
header
Length
Parameters
Data
Parity
3
2
(n+2)
2n1
In applications where the server sends fixed query commands to the device, in order to reduce frequent
interactions, users can choose to send heartbeat packets (query commands) to the serial device instead of sending query
commands from the server.
Enable the custom heartbeat packet function. AT command settings are as follows:
(1) Enable heartbeat packet function
AT+HEARTEN=on
(2) Set the sending direction (NET or COM) of the heartbeat packet, for example, set the heartbeat packet to be
sent to the network.
AT+HEARTTP=NET
(3) Set the heartbeat packet data (maximum 40 bytes). For example, to set the data to the string www.usr.cn, you
need to first convert the string to hex 7777772E7573722E636E.
AT+HEARTDT=7777772E7573722E636E
(4) Set the interval for sending heartbeat packets. The setting range is 1-65535s, and the default is 30s. For example,
set the sending interval to 30 seconds.
AT+HEARTTM=30
Then need to set up network connections such as socket A and socket B, please refer to section 2.4. After
completing the settings, restart the serial server. After socket A or socket B is connected to the server, if there is no data
transmission within 30 seconds, the serial server will send the string www.usr.cn to the server.
AT commands:
Form 13Heartbeat packet related commands
3.9. Socket Distribution
Users are allowed to send data to appointed socket connection and take the DR404 packaging the data from the net
according to the protocol send to serial device if enabling the socket distribution under the transparent transport.
Users’ MCU send data package according to the socket protocol and DR404 will parse the data package. If correspond
with the protocol, it will be sent to the appointed socket; if not, it will return related error code and does not send it.
1) Data format from serial device to module
MCU send data package according the below format, module parse and send “n”bytes data to the appointed socket
connection. When the data returned, no parse and output from the serial directly.
Format 14Serial transmission format
Header: 0x55 0xFD 0xAA
Jinan USR IOT Technology Limitedwww.usriot.com
Page 33
USR-DR404 user manualwww.usriot.com
33
Header
Length
Parameters
Data
Parity
3
2
(n+2)
2n1
Return
code
Description
Note
1
0x00
Header error
2
0x01
Length error
3
0x02
Parameters error
4
0x04
Parity error
5
0x10
Send failed(parameters is right but send
failed)
Length: the total number of bytes from parameters(included) to parity (do not included), the high is in front.
Parameters: the first byte:common parameters, it is connecting number(socket A and socket B); 0x61 is all the device
connected to the socket A, 0x62 is all the device connected to the socket B.
The second one:reserved parameters, default is 0x00
Common parameters is in front of the reserved one.
Data: length can be modify, the whole length is less than 4096 bytes.
Parity: from the parameters( included) to parity(not include), add and take the last bytes as parity.
Below is detailed application:
55 FD AA 00 03 61 00 CC 2D(Hex)
Length 00 03: the length is 3
Parameters 61 00: send data to the socket A
Data CC: the data sent is “0xCC”
Parity: 61+00+CC=2D
2) Data format from module to serial device
When the data received from network, module send the data package in the below format to the serial device. When
the serial device send data to the module, if wrong, DR404 will send back to the serial device according to this format.
Format 15Serial transmission format
Header: 0xAA 0xFD 0x55
Length: the total number of bytes from parameters(included) to parity (do not included), the high is in front
Parameters: the first byte: common parameters, it is connecting number(socket A and socket B); The data returned by
Socket A is 0x61, and the data returned by Socket B is 0x62.
The second byte: reserved parameters, the seventh bit distinguish the the data from net or the
module.(1:returned from module;0:returned from the net)
Data: if the net data, copy the data to the right position, length can be modify, length less than 4096 bytes.
If the DR404 data, return the operating code, details are as fellows:
Format 16Errors
Parity: from the parameters( included) to parity(not include), add and take the last bytes as parity.
Below is detailed application:
AA FD 55 00 03 61 00 CC 2D (HEX)
Length: 00 04: the length is 4
Parameters 61 00: 61—data from socket A
00—net to serial
Jinan USR IOT Technology Limitedwww.usriot.com
Page 34
USR-DR404 user manualwww.usriot.com
34
Data CC: the data from the socket A
Sum parity:61+00+CC= 2D
Below, we take socket A as example, serial send abc to socket A, socket A return 123 to the serial device:
Diagram 26Socket Distribution
AT command to enable the socket:
AT+ TCPDPEN =on
Others, if more function for the socket A and socket B, please refer to the 2.4.
3.10.Timeout Restart
Under the transparent transmission mode, enable the timeout restart function. If the DR404 no WIFI connection or
connected but no communication in set time, DR404 will restart.
(1)Enable this function:
Jinan USR IOT Technology Limitedwww.usriot.com
Page 35
USR-DR404 user manualwww.usriot.com
35
NO.
Item
Description
1
TIMEOUTEN
Enable/ disable restart timeout
2
TIMEOUTT
Query/ setting the time for restart timeout
NO.
Item
Description
1
REBOOTEN
Enable/disable timing restart
2
REBOOTT
Query/setting time for timing restart
AT+TIMEOUTEN=on
(2)Setting the time, from 60~65535s default is 3600s, e.g. 100s
AT+TIMEOUTT=100
After setting, restart the DR404.
For example: AT+TIMEOUTT=100, if no connection or connected but no communication within 100s, module will
restart; if there is connection or communication in 100s, the time will be cleared and regain to time.
Form 17Timeout Restart
3.11.Timing Restart
"Timing restart" is equivalent to "restart after the set time". In the non-serial port command mode, when this function
is enabled, the module uses the internal clock for timing. After reaching the set time, the module will be forced to restart.
Related AT command:
1) Enable this function:
AT+REBOOTEN=on
2) Setting the time, can be modified from 1~720h,default is 24h, e.g, 200h
AT+REBOOTT=200
The parameter setting is completed, takes effect after the module is restarted, and the module will restart every 200h.
Form 18Timing Restart
3.12.Modbus Polling
(1) Setting by web page
Jinan USR IOT Technology Limitedwww.usriot.com
Diagram 27Modbus polling
Page 36
36
(2) Setting by AT command:
Enable/disable Modbus polling function, enable this function:
AT+MODBPOLLEN=on/off
Set the polling interval (50 ~ 65535) (ms), taking 200ms as an example:
AT+MODBPOLLT=200
3.13.Remote Upgrade
3.13.1 Serial server configuration
Setting by AT command:
(1) Setting/ Query remote upgrade parameters, for example, set remote upgrade to off:
AT + UPDATE = off,ycsj1.usr.cn, 30001,30Default is off.
Query and set the remote update enable status, remote server address, remote server port, and reporting
interval.
(2) Setting/ Query remote upgrade parameters
AT+MONITOR=off,10Default is off.
Query and set the remote update enable status and reporting interval.
Setting by web page:
USR-DR404 user manualwww.usriot.com
Jinan USR IOT Technology Limitedwww.usriot.com
Page 37
USR-DR404 user manualwww.usriot.com
37
Diagram 28Remote upgrade
The remote upgrade function is set to open, select the port of the remote server, enter the server address, and the
default reporting interval is 30min.
3.13.2 Remote upgrade system configuration
(1) User registration and login
Log in to https://ycsj1.usriot.com, click Register to register your account (if you have an account, log in directly) as
shown in the figure:
Jinan USR IOT Technology Limitedwww.usriot.com
Page 38
USR-DR404 user manualwww.usriot.com
38
Diagram 29Login
After submitting the registration, the mailbox will receive an activation email, click on the link to activate.
Diagram 30Registration
After activation, please contact our company to review the account. The account can be used normally after review.
After login, the device monitoring interface is entered by default. This interface mainly displays the currently online devices.
(2)Version configuration
Jinan USR IOT Technology Limitedwww.usriot.com
Page 39
USR-DR404 user manualwww.usriot.com
39
Diagram 31Version configuration
The version config page can be used to add, delete, modify ftp and http addresses, modify serial numbers, etc. The
ftp address and http address cannot be entered manually. Click to select a file. After selecting a file, click Upload.
The ftp address and http address will Automatic update, you can click the download button to download the
firmware for confirmation. When iterative upgrade is required, the serial number must be increased in the order of
version.
(3) Add device
Jinan USR IOT Technology Limitedwww.usriot.com
Page 40
USR-DR404 user manualwww.usriot.com
40
Diagram 32Add device
① After the remote monitoring function is turned on, you can view the running status of the device and remotely
send AT commands to control the device. Corresponding to the "device monitoring" function on the left menu, the
"device monitoring" interface can see the online devices after opening.
② If you need to upgrade the equipment, choose whether to upgrade.
Note: When the device needs to be upgraded, the "software version" and the pre-upgrade version must be set to
different.
(4) Device upgrade
a: Modify the software version and pre-upgrade version of the device to different version numbers
b: Select whether the device upgrade switch is on.
c: Check whether the device is successfully upgraded through the device upgrade record.
3.14.Websocket
DR404 supports websocket server. Instead of the ways such as HTTP GET, POST, PUT, and is faster. Providing the related
websocket testing webpage for user to testing, details are as below:(10.10.100.254/websocket.html)
Jinan USR IOT Technology Limitedwww.usriot.com
Page 41
USR-DR404 user manualwww.usriot.com
41
Parameters
Default value
SSID
USR-DR404_xxxx
IP address
10.10.100.254
Subnet mask
255.255.255.0
Username
admin
Password
admin
Diagram 33Websocket Webpage
Click the “Connect” to realize a Websocket connection, then serial and webpage can transport data with each other.
The Websocket server of the DR404 supports 8 clients to connect at most.
People make webpage application and have high requirement for the respond speed can contact us.
Note: this function uses the 8000 port of the DR404.
4. Product parameter setting
UAR-DR404 supports two ways to set the parameters: AT command and webpage. For the setting of AT commands,
please refer to the “AT Commands” section of this document; this chapter mainly describes the Web setting methods.
4.1. Web Page
First time using the DR404, you can configure it via webpage. PC connects to AP interface of USR-DR404. Default SSID,
IP and username, password are as fellows:
Form 19Basic Parameters
Jinan USR IOT Technology Limitedwww.usriot.com
Page 42
USR-DR404 user manualwww.usriot.com
42
4.1.1. Open the Management Webpage
Connecting the DR404 with the wireless net card of the PC, SSID is USR-DR404_xxxx. Enter the browser, fill the
10.10.100.254 (default IP address) and enter. Then fill the username and password( both are: admin) and enter the
webpage.
Management webpage supports English, setting on the top right.
There are nine webpage in it, including: quick configure, mode selection, AP interface setting, STA interface setting,
This webpage shows a way to quickly configure the USR-DR404 for user. Configure the parameters and restart to make
the DR404 work normal. Of course, please click the respond webpage to configure.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 43
43
4.1.3. Mode Selection
USR-DR404 user manualwww.usriot.com
Diagram 35Mode Selection
In the first page choose the work mode of the DR404:AP/ STA.
Data transfer mode including “transparent mode”, ”serial command mode”, ”HTTPD client mode”, ”modbus TCP and
modbus RTU”.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 44
44
4.1.4. AP Interface Setting
USR-DR404 user manualwww.usriot.com
Diagram 36AP interface
DR404 supports AP interface with which can management the DR404 easier and can realize the networking. Webpage
is as above, including SSID, security mode and LAN setup. Both supports user defined.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 45
45
4.1.5. STA Interface Setting
USR-DR404 user manualwww.usriot.com
Diagram 37STA Interface
DR404 supports STA interface and can access to other wireless network, setting as above.
There are three lists in this webpage, the former one is STA interface parameters,including the SSID of the AP to
connect, security mode and others. Second one is AP+STA, click to choose enable or not. The latter one is WAN connection
type, including DHCP and Static IP.
4.1.6. Application setting
Application settings are settings for WIFI to RS485 parameters, including: setting of serial port parameters, automatic
framing settings, Ethernet function settings, registration package settings and network protocol settings.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 46
USR-DR404 user manualwww.usriot.com
46
Diagram 38WIFI-Uart setting
Jinan USR IOT Technology Limitedwww.usriot.com
Page 47
USR-DR404 user manualwww.usriot.com
47
Diagram 39Other settings
Description:
Network setting: 4 modes can be set on the network side as TCP server, TCP client, UDP server and UDP client.
When USR-DR404 is configured as a UDP server, USR-DR404 will remember the last UDP client and communicate with
the last UDP client. The UDP Client mode only communicates with the target IP and port. When set to TCP Server, there is
no need to enter an IP address. For other settings, you need to fill in the IP address of the other party to be connected.
Enter the protocol port number at the port. The port numbers at both ends of the communication must be the same.
Socket B communicates with the server as a TCP Client and a UDP Client.
TCP connection password authentication: it only works under TCP server mode, verify the password of the TCP client
which will be connected to DR404.
Note:working in the TCP server mode, when enable it, the first data send by the TCP client to the server is password
and enter, the default password is “admin” so the first data should be:0x61 0x64 0x6D 0x69 0x6E 0x0D 0x0A(HEX).
Jinan USR IOT Technology Limitedwww.usriot.com
Page 48
USR-DR404 user manualwww.usriot.com
48
4.1.7. Ethernet setting
Diagram 40Ethernet Setting
DR404 has one Ethernet port, this port can be work as LAN port or WAN port.
LAN port: it supports the data transmission between Ethernet to the serial or WIFI.
WAN port: DR404 can be used as secondary router which is convenient for user to network.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 49
49
4.1.8. HTTPD Client Mode
USR-DR404 user manualwww.usriot.com
Diagram 41HTTPD Client
Jinan USR IOT Technology Limitedwww.usriot.com
Page 50
USR-DR404 user manualwww.usriot.com
50
Diagram 42HTTPD Client Mode
Under the HTTPD client mode, the content of the protocol header, including: server address, server port, request type,
header path, header Connection and header User-Agent.
4.1.9. Advanced
Under the advanced webpage, user can setup port mapping. It only works at STA mode or Ethernet port sets as
WAN.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 51
USR-DR404 user manualwww.usriot.com
51
Diagram 43Advanced
Jinan USR IOT Technology Limitedwww.usriot.com
Page 52
52
4.1.10. Device Management
USR-DR404 user manualwww.usriot.com
Diagram 44Device Management
Device management includes username / password settings, factory reset and software upgrade functions.
Instr:
Restart: when user setting parameters in different webpage, click Apply to make sure it, but these parameters will be
effect after restart and DR404 will reboot to fresh the original parameters.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 53
USR-DR404 user manualwww.usriot.com
53
4.2. AT command
4.2.1. Serial AT Command
UART parameters: 57600/none/8/1.
AT command can be sent by the AT command software or by programming. Take SecureCRT as an example, change
from the other mode to AT command mode there always be two steps.
Enter “+++” on the serial port (RS485), module receives and returns an “a”;
Enter “a” on the serial port (RS485), module receives and returns “+ok”, and enter the AT command.
Diagram 45Switch to command mode
Note: Fill “+++”and “a” need to achieve in the time to reduce the chance of entering command mode while working
normally accidentally. Detail requirement are as fellows:
Diagram 46Switch to command mode
Time requirement:
T1>the interval of serial port package
T2<300ms
T3<300ms
T5<3s
Change transparent transmission mode , HTTPD Client mode to AT command mode :
1. Serial device send “+++”to module continuously. Module received ‘+++’ then returned an “a” .
Jinan USR IOT Technology Limitedwww.usriot.com
Page 54
USR-DR404 user manualwww.usriot.com
54
2. After receiving the ‘a’ returned by the module, the device must send another confirmation code ‘a’ to the module
within 3 seconds.
3. The module will return ‘+ok’ , and enter AT command mode.
Change AT command mode to transparent transmission mode, HTTPD Client:
1. Serial device send “AT+ENTM”to module.
2. After the module receive the commend, feedback “+ok”, then back to the previous working mode.
Note: The specific AT command requires a ENTER, but the "+++" and "a" sent by entering the AT command process do not
need a ENTER.
In AT command mode, you can view all AT commands and descriptions of USR-DR404 through the following help
commands, as follows:
AT + H
Diagram 47AT command mode
In order to enter the AT command mode to set parameters conveniently, our company provides "AT command
software":
Diagram 48Search via serial port
Click “Open”, send "+++ a", receive the response "+ ok", then enter the AT command to be sent in the left operation
area. After the setting is completed, click "AT + Z" to restart the module, and the parameter settings can be completed.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 55
USR-DR404 user manualwww.usriot.com
55
Diagram 49AT command software
4.2.2. Net AT command
The above is the AT command setting through the serial port. The user can also set the AT command through WIFI.
First, the computer establishes a network connection with USR-DR404, and uses AT Setup software.
Diagram 50Web search
Click “Search”, the searched USR-DR404 will be displayed, click the USR-DR404, and then set through the left operation
area (the method is the same as the serial port setting)
Jinan USR IOT Technology Limitedwww.usriot.com
Page 56
USR-DR404 user manualwww.usriot.com
56
Diagram 51AT command software
4.3.3 Command Format
Based on the ASCII command , the format of the AT command are as below:
Format description:
< >: the content that have to be included
[ ]: the part can be select
“NULL” : query
[para-n] : fill when setting the parameters
<CR>: end, enter, ASCII code,: 0x0a or 0xod
Note: When echoing, the terminator is automatically converted to 0x0a0d. When entering a command, the "AT + <CMD>"
characters are automatically echoed to uppercase, and the parameters remain unchanged.
Response data
+ <RSP> [op] [para-1, para-2, para-3, para-4…] <CR> <LF> <CR> <LF>
+: the response prefix
RSP: response string ,including:
Ok
Err
[op]: =
[para-n]: return parameters or the error code:
Jinan USR IOT Technology Limitedwww.usriot.com
Page 57
57
<CR>:ASCII code: 0x0d;
Error
State
-1
Invalid command format
-2
Invalid command
-3
Invalid Operator
-4
Invalid Parameters
-5
Operation not allowed
Command
Function
E
Enable/Disable echo function(DR404 does not support)
ENTM
Enter transparent transmission mode
NETP
Query/Set Network protocol parameters
UART
Query/Set serial port parameters
UARTF
Enable/Disable auto-frame function
UARTFT
Query/Set auto-frame trigger time
UARTFL
Query/Set auto-frame trigger length
TMODE
Query/Set data transmission mode (transparent transmission
mode or protocol mode)
WMODE
Query/Set WIFI mode(AP or STA)
WSKEY
Query/Set encryption parameters in STA mode
WSSSID
Query/Set SSID of connected AP in STA mode
WSLK
Query the connection status in STA mode
WEBU
Query/Set Web Server username and password
WAP
Query/Set AP mode parameters
WAKEY
Query/Set encryption parameters in AP mode
MSLP
Set the module to enter low power mode, turn off WIFI
WSCAN
Search surrounding AP in STA mode
TCPLK
Query socket A TCP connection connect/disconnected
TCPDIS
Query/Set establish TCP connection enable/disable(Only take
effect in TCP Client mode)
WANN
Query/Set network parameters in STA mode(WAN interface
parameters)
LANN
Query/Set network parameters in AP mode(LAN interface
parameters)
<LF>: ASCII code :0x0a;
Error code
4.3.4AT command
USR-DR404 user manualwww.usriot.com
Jinan USR IOT Technology Limitedwww.usriot.com
Page 58
USR-DR404 user manualwww.usriot.com
58
TCPTO
Query/Set timeout re-connection time of socket A
MAXSK
Query/Set maximum TCP Clients in TCP Server work mode
TCPB
Enable/Disable socket B
TCPPTB
Query/Set Socket B port number
TCPADDB
Query/Set Socket B server address
TCPTOB
Query/Set timeout re-connection time of socket B
TCPLKB
Query socket B TCP connection connect/disconnected
EPHY
Enable/Disable Ethernet interface
RELD
Reset the module
FUDLX
Enable/Disable RS485
IDFIR
Enable / disable sending ID when the connection is first
established
IDEVE
Enable / disable sending ID before each data packet
AABR
Enable/Disable RFC2217 function
DHCPDEN
Enable/Disable DHCP server function of LAN port
HIDESSID
Query/Set whether to hide SSID of DR404 in AP mode
DOMAIN
Query/Set web server domain name
Z
Restart the module
AT+FAPSTA
Enable/Disable AP+STA function
MID
Query module’s MID
VER
Query firmware version
H
Query help information
WSQY
Query/Set RSSI threshold(percentage) to switch among three
AP in STA mode
When querying, sta.: Returns whether the TCP Client is linkable, for example
on, connectable
off, not connectable
When setting, "off" sets the module as unlinkable.Immediately after the command is completed, the module
disconnects the link and does not reconnect."On" sets the module to a linkable state. After the command is completed,
the module will immediately reconnect to the server.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 68
USR-DR404 user manualwww.usriot.com
68
4.3.4.20. AT+WANN
Function: Query/Set WAN Setting, only valid in STA mode.
Format:
Query : AT+WANN<CR>
Function: Query/Set LAN settings, only valid in AP mode
Format:
Query : AT+LANN<CR>
+ok=<address,mask ><CR>< LF ><CR>< LF >
Setting: AT+ LANN=<address,mask ><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
address.: LAN IP address
mask: LAN subnet mask
Note: The address of the WAN port of the module viewed by WANN and the address of the LAN port of the module viewed
by LANN. The two IPs cannot be set on the same network segment, otherwise the module does not work properly.
time.: TCP timeout, <= 600 (600s), >=0 (0 means no timeout), default is 0.
TCP timeout: The module TCP channel starts counting when no data is received, and clears the count when data is received.
If the timing exceeds the TCPTO time, the connection is disconnected. When the module works on the TCP Client, it will
actively reconnect to TCP Server. When as a TCP server, TCP client needs to actively reconnect.
4.3.4.23. AT+MAXSK
Function: Query /Set the maximum number of TCP connections
Format:
Query : AT+ MAXSK<CR>
+ok=<num><CR>< LF ><CR>< LF >
Setting: AT+ MAXSK =<num ><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
num: maximum number of TCP connections, range: 1~24, default is 24.
When set to TCP Server, the module can support a maximum of 24 TCP connections. If users do not need so many
connections, can set to reduce appropriately.
4.3.4.24. AT+TCPB
Function: Enable/Disable socket B.
Format:
Query : AT+TCPB <CR>
+ok=<sta.><CR>< LF ><CR>< LF >
Setting: AT+ TCPB=<on/off><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
When querying, sta.: Returns whether socket B is enabled.
on, enable
off, disable
After restarting the module, parameters take effect.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 70
USR-DR404 user manualwww.usriot.com
70
4.3.4.25. AT+TCPPTB
Function: Query/Set TCPB port number
Format:
Query : AT+TCPPTB <CR>
+ok=<port><CR>< LF ><CR>< LF >
Setting: AT+ TCPPTB=<port><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
port: Protocol port, decimal number, less than 65535
After restarting the module, parameters take effect.
4.3.4.26. AT+TCPADDB
Function: Query/Set TCPB server address
Format:
Query : AT+TCPADDB <CR>
+ok=<add><CR>< LF ><CR>< LF >
Setting: AT+ TCPADDB=<add><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
add: TCPB server address (server’s IP address, or a domain name)
After restarting the module, parameters take effect.
Parameters:
After sending this command, enable the Ethernet interface. This command is not saved, that is, Ethernet is still
disabled after restart. If need to save this setting, please use the factory setting command. If need to enable the Ethernet
interface permanently, please use the “AT + FEPHY = on” command.
After the Ethernet interface is closed, the power consumption of the module can be reduced, so it is recommended to
set it to off when the Ethernet interface is not used. The Ethernet interface is enabled by default.
With “AT + FVEW = disable / enable”, set the Ethernet interface to LAN port (disable) or WAN port (enable). This
command will take effect after restoring the factory settings.
4.3.4.30. AT+FUDLX
Function: Enable/Disable RS485
Format:
AT+FUDLX=on/off<CR>
+ok<CR>< LF ><CR>< LF >
This command enables or disables the RS485 interface. By default, RS485 is enabled, and the 485 control pin is RTS.
This command takes effect after restoring factory settings.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 72
USR-DR404 user manualwww.usriot.com
72
4.3.4.31. AT+AABR
Function: Enable/Disable RFC2217 function
Format:
AT+AABR=on/off<CR>
+ok<CR>< LF ><CR>< LF >
This command enables or disables synchronization (RFC2217) function, default is enabled.
4.3.4.32. AT+DHCPDEN
Function: Enable/Disable DHCP server function of LAN port
Format:
AT+DHCPDEN=on/off<ID><CR>
+ok=<ID><CR>< LF ><CR>< LF >
Parameters:
This command enables or disables DHCP server function of LAN port, default is enabled.
4.3.4.33. AT+HIDESSID
Function: Enable/Disable hiding the SSID in AP mode.
Format:
AT+HIDESSID=on/off<CR>
+ok<CR>< LF ><CR>< LF >
This command enables or disables hiding the SSID of the module in AP mode. Default is disabled.
4.3.4.34. AT+DOMAIN
Function: Query/Set web server domain name
Format:
Query : AT+ DOMAIN<CR>
+ok=<name><CR>< LF ><CR>< LF >
Setting: AT+ DOMAIN=<name ><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
name: web server domain name
Jinan USR IOT Technology Limitedwww.usriot.com
Page 73
USR-DR404 user manualwww.usriot.com
73
4.3.4.35. AT+RELD
Function: Reset the module
Format:
AT+ RELD<CR>
+ok=rebooting…<CR>< LF ><CR>< LF >
This command restores the factory settings of the module, then the module will restart automatically.
The document provides information about USR-W610 module, it doesn’t grant any license to the intellectual property
rights. Except the responsibility declared in the product sale clause, USR does not assure any other responsibilities. In
addition, USR does not make any warranties for the sale and use of this product, including the suitability of products for a
particular purpose, merchant ability or fitness for any patent, copyright or other intellectual property infringement. USR
may make changes to specifications and products description without notice.
Jinan USR IOT Technology Limitedwww.usriot.com
Page 86
USR-DR404 user manualwww.usriot.com
86
Jinan USR IOT Technology Limitedwww.usriot.com
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.