USR IOT USR-DR404 User manual

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
2
Contents
USR-DR404 User Manual....................................................................................................................................................... 1
1. Product Overview.....................................................................................................................................................................6
1.1. Brief Introduction.......................................................................................................................................................... 6
1.2. Specifications................................................................................................................................................................ 6
2. Networking application............................................................................................................................................................ 7
2.1. Wireless Networking Configuration.............................................................................................................................. 7
2.2. Wireless networking application...................................................................................................................................8
2.2.1. Wireless networking application(AP)................................................................................................................. 8
2.2.2. STA Mode........................................................................................................................................................... 9
2.2.3. AP+STA............................................................................................................................................................. 10
2.2.4. Wireless Networking Applications (AP,STA)..................................................................................................... 11
2.3. Wired Networking....................................................................................................................................................... 12
2.4. Wired Networking Application....................................................................................................................................13
2.4.1. Wired Networking Application(AP + LAN)..................................................................................................13
2.4.2. Wired Networking Applications (AP+ WAN).................................................................................................... 14
2.4.3. Wired Networking Applications (Router).........................................................................................................15
2.4.4. Wired Networking Applications (Bridge)......................................................................................................... 17
3. Product function.....................................................................................................................................................................18
3.1. Work mode..................................................................................................................................................................18
3.1.1. Transparent mode............................................................................................................................................19
3.1.2. Serial command mode..................................................................................................................................... 19
3.1.3. HTTPD Client Mode..........................................................................................................................................20
3.1.4. Modbus TCP <=> modbus RTU.........................................................................................................................23
3.1.5. AT command mode.......................................................................................................................................... 24
3.2. Socket.......................................................................................................................................................................... 24
3.3. UART............................................................................................................................................................................25
3.3.1. Parameters....................................................................................................................................................... 25
3.3.2. UART Free framing........................................................................................................................................... 26
3.3.3. UART auto-framing mode................................................................................................................................ 27
3.4. Synchronous Band Rate (RFC2217).............................................................................................................................28
3.5. RFC2217 Protocol Description.................................................................................................................................... 28
3.6. USR-Link...................................................................................................................................................................... 29
3.7. USR Cloud....................................................................................................................................................................31
3.8. Heartbeat Packet Function..........................................................................................................................................31
3.9. Socket Distribution...................................................................................................................................................... 32
3.10. Timeout Restart.........................................................................................................................................................34
3.11. Timing Restart........................................................................................................................................................... 35
3.12. Modbus Polling......................................................................................................................................................... 35
3.13. Remote Upgrade....................................................................................................................................................... 36
3.13.1 Serial server configuration.............................................................................................................................. 36
3.13.2 Remote upgrade system configuration................................................................................................................... 37
3.14. Websocket.................................................................................................................................................................40

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
3
4. Product parameter setting..................................................................................................................................................... 41
4.1. Web Page.................................................................................................................................................................... 41
4.1.1. Open the Management Webpage................................................................................................................... 42
4.1.2. Quick Configure................................................................................................................................................42
4.1.3. Mode Selection................................................................................................................................................ 43
4.1.4. AP Interface Setting..........................................................................................................................................44
4.1.5. STA Interface Setting........................................................................................................................................ 45
4.1.6. Application setting........................................................................................................................................... 45
4.1.7. Ethernet setting............................................................................................................................................... 48
4.1.8. HTTPD Client Mode..........................................................................................................................................49
4.1.9. Advanced..........................................................................................................................................................50
4.1.10. Device Management...................................................................................................................................... 52
4.2. AT command............................................................................................................................................................... 53
4.2.1. Serial AT Command.......................................................................................................................................... 53
4.2.2. Net AT command..............................................................................................................................................55
4.3.3 Command Format............................................................................................................................................. 56
4.3.4 AT command.................................................................................................................................................. 57
4.3.4.1. AT+E...................................................................................................................................................... 59
4.3.4.2. AT+ENTM.............................................................................................................................................. 59
4.3.4.3. AT+NETP................................................................................................................................................60
4.3.4.4. AT+UART................................................................................................................................................60
4.3.4.5. AT+UARTF..............................................................................................................................................61
4.3.4.6. AT+UARTFT............................................................................................................................................61
4.3.4.7. AT+UARTFL............................................................................................................................................ 62
4.3.4.8. AT+TMODE............................................................................................................................................ 62
4.3.4.9. AT+WMODE.......................................................................................................................................... 62
4.3.4.10. AT+WSKEY........................................................................................................................................... 63
4.3.4.11. AT+WSSSID.......................................................................................................................................... 64
4.3.4.12. AT+WSLK............................................................................................................................................. 64
4.3.4.13. AT+WEBU............................................................................................................................................ 64
4.3.4.14. AT+WAP...............................................................................................................................................65
4.3.4.15. AT+WAKEY...........................................................................................................................................65
4.3.4.16. AT+MSLP............................................................................................................................................. 66
4.3.4.17. AT+WSCAN.......................................................................................................................................... 66
4.3.4.18. AT+TCPLK.............................................................................................................................................67
4.3.4.19. AT+TCPDIS........................................................................................................................................... 67
4.3.4.20. AT+WANN............................................................................................................................................68
4.3.4.21. AT+LANN............................................................................................................................................. 68
4.3.4.22. AT+TCPTO............................................................................................................................................68
4.3.4.23. AT+MAXSK...........................................................................................................................................69
4.3.4.24. AT+TCPB.............................................................................................................................................. 69
4.3.4.25. AT+TCPPTB.......................................................................................................................................... 70
4.3.4.26. AT+TCPADDB....................................................................................................................................... 70
4.3.4.27. AT+TCPTOB..........................................................................................................................................70

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
4
4.3.4.28. AT+TCPLKB.......................................................................................................................................... 71
4.3.4.29. AT+EPHY.............................................................................................................................................. 71
4.3.4.30. AT+FUDLX............................................................................................................................................71
4.3.4.31. AT+AABR..............................................................................................................................................72
4.3.4.32. AT+DHCPDEN...................................................................................................................................... 72
4.3.4.33. AT+HIDESSID....................................................................................................................................... 72
4.3.4.34. AT+DOMAIN........................................................................................................................................ 72
4.3.4.35. AT+RELD.............................................................................................................................................. 73
4.3.4.36. AT+Z.................................................................................................................................................... 73
4.3.4.37. AT+MID................................................................................................................................................73
4.3.4.38. AT+VER................................................................................................................................................ 73
4.3.4.39. AT+H....................................................................................................................................................74
4.3.4.40. AT+WSQY............................................................................................................................................ 74
4.3.4.41. AT+HTPMODE..................................................................................................................................... 74
4.3.4.42. AT+HTTPURL....................................................................................................................................... 75
4.3.4.43. AT+HTTPTP..........................................................................................................................................75
4.3.4.44. AT+HTTPPH......................................................................................................................................... 75
4.3.4.45. AT+HTTPCN......................................................................................................................................... 76
4.3.4.46. AT+HTTPUA......................................................................................................................................... 76
4.3.4.47. AT+HTPSV............................................................................................................................................76
4.3.4.48. AT+HTPTP............................................................................................................................................77
4.3.4.49. AT+HTPURL......................................................................................................................................... 77
4.3.4.50. AT+HTPHEAD.......................................................................................................................................77
4.3.4.51. AT+REGEN........................................................................................................................................... 78
4.3.4.52. AT+REGTCP..........................................................................................................................................78
4.3.4.53. AT+WTPWR......................................................................................................................................... 79
4.3.4.54. AT+REGCLOUD.................................................................................................................................... 79
4.3.4.55. AT+REGUSR......................................................................................................................................... 79
4.3.4.56. AT+TCPDPEN....................................................................................................................................... 80
4.3.4.57. AT+HEARTEN....................................................................................................................................... 80
4.3.4.58. AT+HEARTTP........................................................................................................................................80
4.3.4.59. AT+HEARTDT....................................................................................................................................... 81
4.3.4.60. AT+HEARTTM...................................................................................................................................... 81
4.3.4.61. AT+REBOOTEN.................................................................................................................................... 81
4.3.4.62. AT+REBOOTT....................................................................................................................................... 82
4.3.4.63. AT+TIMEOUTEN.................................................................................................................................. 82
4.3.4.64. AT+TIMEOUTT..................................................................................................................................... 83
4.3.4.65. AT+FAPSTA...........................................................................................................................................83
4.3.4.66. AT+HTTPSCEN..................................................................................................................................... 83
4.3.4.67. AT+MODBPOLLEN............................................................................................................................... 84
4.3.4.68.AT+UPDATE.......................................................................................................................................... 84
4.3.4.69.AT+MONITOR....................................................................................................................................... 85
5. Contact us...............................................................................................................................................................................85
6. Disclaimer...............................................................................................................................................................................85

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
5
Features
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).
Designed with guide rails for easy installation.

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
6
1. Product Overview
1.1. Brief Introduction
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:
Diagram 1 Basic function
1.2. Specifications
Item
Description
Wireless
parameters
Standard certification
FCC/CE
Wireless standard
802.11 b/g/n
Frequency range
2.412GHz-2.484GHz
Transmitting power
802.11b: +19dBm(Max.@11Mbps)
802.11g: +18dBm(Max.@54Mbps)
802.11n: +17dBm(Max.@HT20,MCS7)
+17dBm(Max.@HT40,MCS7)
User can configure power
Receive sensitivity
802.11b: -89dBm(@11Mbps)
802.11g: -81dBm(@54Mbps)
802.11n: -73dBm(@HT20,MCS7)
-71dBm(@HT40,MCS7)
Hardware
parameters
Data interface
RS485: 300~230.4Kbps
485 interface (anti surge, anti thunder,
overcurrent protection)
Ethernet: 10Mbps/100Mbps
USR-DR404

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
7
Run voltage
DC5~36V
Run temp
-40℃~ 85℃
Storage temp
-40℃~ 125℃
Size
109.66*28*64.71mm(L*W*H)
Software
parameters
Wireless network type
Station/AP/AP+Station mode
Safety
WPA-PSK/WPA2-PSK
Encryption type
TKIP/AES
Run mode
Transparent transmission mode,
Protocol transmission mode
Setting command
AT+ command
Net protocol
TCP/UDP/ARP/ICMP/DHCP/DNS/HTTP
Max number of
connected TCP
24
User configure
Web server +AT command configure
Custom application
software
Support custom customize application software
Form 1 Parameters
2. Networking application
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:

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
8
Diagram 2 Set 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 3 AP 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

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
9
(2) The parameters of the WIFI serial server in AP mode can be set according to needs or use the default
parameters. For example:
AT+WAP=11BGN,USR-DR404-TEST,Auto(Optional)
AT+WAKEY=WPA2PSK,AES,12345678(Optional)
(3) Restart
AT+Z
Note:
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 4 STA 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

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.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 5 AP+ 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:

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.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 6 Wireless Networking Application

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
12
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:
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)
Form 2 Related AT Command
Item
Description

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
13
1
NETP
Setting/query the net protocol parameters of the TCPA
2
TCPB
Enable/disable TCPB
3
TCPPTB
Setting/query the port of the TCPB
4
TCPADDB
Setting/query the server of the TCPB
Form 3 Socket Related AT Command
Webpage configure are as fellows:
Diagram 7 Ethernet interface networking setting webpage
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:

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
14
Diagram 8 AP+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:

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
15
Diagram 9 AP+WAN Application
WIFI serial server parameter settings:
(1) Enable Ethernet interface
AT+FEPHY=on
(2) Set the working mode of Ethernet to WAN
AT+FVEW=enable
(3) The above settings will take effect after restoring factory settings
AT+RELD
AT + RELD command does not restore the above settings.
(4) DR404 works in AP mode, enable DHCP(Default)
AT+WMODE=ap
AT+DHCPDEN=on
(5) For security reasons, can modify the AP name and encryption parameters (optional)
AT+WAP=11BGN,B2-WIFI-TEST,Auto
AT+WAKEY=WPA2PSK,AES,www.usr.cn
(6) Can keep the default or set LAN parameters of serial server, IP address (DHCP gateway) and subnet mask
(optional)
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
IP address obtained by the serial server from the AP!
(7) Restart
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.
USR-DR404

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
16
Diagram 10 Router 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:
USR-DR404

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
17
Diagram 11 Ethernet 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 12 Bridge 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
USR-DR404

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.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 13 Ethernet 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”.

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
19
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 14 Serial 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.
Header
Length
Function
code
Reserved
parameter
Destination
port
Destinatio
n address
Data
Parity
2
2
(n+m+
5)
1
2
2
m
n
1
Form 4 Serial command mode
Header:
0x55 0xaa
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)

USR-DR404 user manual www.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
20
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:
Send data:55 aa 00 0a 00 00 00 21 00 85 00 A8 C0 01 0f
Length type 00 0a:Length: n+m+5, here is 10
Function code 00:UDP mode
Destination IPaddress 85 00 A8 C0:192.168.0.133
Data 00:Length is 1,
Parity:0x00+0x00+0x00+0x21+0x00+0x85+0x00+0xA8+0xC0+0x01=0x0f
3.1.3. HTTPD Client Mode
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:
No.
Item
Description
Table of contents
Other USR IOT Media Converter manuals

USR IOT
USR IOT USR-TCP232-ED2 User manual

USR IOT
USR IOT USR-GM1 User manual

USR IOT
USR IOT USR-TCP232-302 User manual

USR IOT
USR IOT RS232 User manual

USR IOT
USR IOT USR-TCP232-410s User manual

USR IOT
USR IOT USR-TCP232-E2 User manual

USR IOT
USR IOT USR-CANET200 User manual

USR IOT
USR IOT USR-C322 User manual

USR IOT
USR IOT USR-N520 User manual

USR IOT
USR IOT USR-W630 User manual