Download as pdf or txt
Download as pdf or txt
You are on page 1of 79

DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

DTU-H10X
Wi-Fi/Ethernet to RS232/RS485 Server

P
User Manual

O
V1.1

SH
Overview of Characteristic
 Embedded UART to Wi-Fi device, hardware flow
control (RTS/CTS) RS232 interface
RK
 Support IEEE802.11b/g/n Wireless standards

 Support TCP/UDP/HTTP Network Protocols


O
Support SSL Encryption

 Support Telnet Communication


W

 Support RS232/RS485/Ethernet Data Interface

 RS232 RS485 automatic switching

 Support Work As STA/AP/AP+STA Mode


T-

 Support Router/Bridge Mode Networking

 Support AT+ Instruction Set for Configuration


IO

 Support Friendly Web Configuration Page

 Single 5~18V DC Power Supply

 Size: 84 x 84 x 25mm

 FCC/CE/TELEC/RoHs Certificated

http://www.iotworkshop.com 1
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

TABLE OF CONTENTS
1. PRODUCT OVERVIEW ............................................................................................................... 9
1.1. General Specification ............................................................................................................. 9
1.2. Hardware Introduction .......................................................................................................... 10
1.2.1. Interface Description ........................................................................................................ 10
1.2.2. RS232 Interface ............................................................................................................... 11
1.2.3. RS485 Interface ............................................................................................................... 11

P
1.2.4. RJ45 Interface .................................................................................................................. 11
1.2.5. Button Interface ................................................................................................................ 12
1.2.6. Mechanical Size ............................................................................................................... 13

O
1.2.7. Order Information ............................................................................................................. 13
1.2.8. Device Difference............................................................................................................. 14
1.2.9. Package Information ........................................................................................................ 14

SH
2. APPLICATION ............................................................................................................................ 15
2.1. Wireless Networking ............................................................................................................. 15
2.1.1. AP Application .................................................................................................................. 15
2.1.2. STA Application ............................................................................................................... 16
2.1.3. AP+STA Applicatioin ........................................................................................................ 16
RK
2.1.4. One AP One STA Applicatioin ......................................................................................... 18
2.2. Ethernet Interface Communication ..................................................................................... 18
2.2.1. Ethernet Interface Networking (As AP, N-Ver) ................................................................ 19
2.2.2. Ethernet Interface Networking (As STA, N-Ver) .............................................................. 19
2.2.3. Ethernet Interface Networking (As STA, Z-Ver) .............................................................. 20
O
3. FUNCTION DESCRIPTION ....................................................................................................... 21
3.1. User Configuration Process................................................................................................. 21
3.2. Working Mode ....................................................................................................................... 21
3.2.1. Transparent Transmission Mode ..................................................................................... 21
W

3.2.2. Agreement(Serial Command Mode) ................................................................................ 22


3.2.3. HTTPD Client Mode ......................................................................................................... 23
3.3. Wi-Fi Parameter Setting........................................................................................................ 24
3.3.1. Auto- Frequency Function ............................................................................................... 24
T-

3.3.2. Security ............................................................................................................................ 24


3.3.3. Search Function for STA ................................................................................................. 24
3.3.4. Address Binding ............................................................................................................... 24
3.4. UART Frame Scheme............................................................................................................ 24
IO

3.4.1. UART Free-Frame ........................................................................................................... 24


3.4.2. UART Auto-Frame ........................................................................................................... 25
3.5. Network Setting ..................................................................................................................... 25
3.5.1. Socket A ........................................................................................................................... 25
3.5.2. Socket B ........................................................................................................................... 26
3.6. TCP Password Authentication ............................................................................................. 26
3.7. Upload ID................................................................................................................................ 27
3.8. Keepalive................................................................................................................................ 27
3.9. Multiple STA Parameters ...................................................................................................... 27
3.10. Websocket(Reserved) ....................................................................................................... 27
3.11. Parameters Setting ............................................................................................................ 27

http://www.iotworkshop.com 2
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

3.12. Palmodic Signal ................................................................................................................. 27


3.13. Firmware Upgrade ............................................................................................................. 28

4. OPERATION GUIDELINE ......................................................................................................... 29


4.1. Configuration via Web Accessing ....................................................................................... 29
4.1.1. Open Web Management Interface................................................................................... 29
4.1.2. Quick Configure ............................................................................................................... 29
4.1.3. Mode Selection Page ....................................................................................................... 30
4.1.4. AP Interface Setting Page ............................................................................................... 31
4.1.5. STA Interface Setting Page ............................................................................................. 31
4.1.6. Application Setting Page .................................................................................................. 32

P
4.1.7. Ethernet Setting ............................................................................................................... 33
4.1.8. HTTPD Client Mode ......................................................................................................... 33

O
4.1.9. Device Management Page .............................................................................................. 34
4.2. The device Usage Introduction ............................................................................................ 35
4.2.1. Software Debug Tools ..................................................................................................... 35
4.2.2. Network Connection......................................................................................................... 35

SH
4.2.3. Device Debug .................................................................................................................. 35
4.3. Typical Application Examples ............................................................................................. 38
4.3.1. Wireless Control Application ............................................................................................ 38
4.3.2. Remote Management Application .................................................................................... 38
4.3.3. Transparent Serial Port Application ................................................................................. 39
RK
4.3.4. Wireless Data Acquisition Card Application..................................................................... 39

5. AT+INSTRUCTION INTRODUCTION ...................................................................................... 41


5.1. Configuration Mode .............................................................................................................. 41
5.1.1. Switch to Configuration Mode .......................................................................................... 41
5.2. AT+ Instruction Set Overview .............................................................................................. 42
O

5.2.1. Instruction Syntax Format ................................................................................................ 42


5.2.2. AT+ Instruction Set .......................................................................................................... 43
5.2.2.1. AT+E ............................................................................................................................ 44
W

5.2.2.2. AT+ENTM..................................................................................................................... 45
5.2.2.3. AT+NETP ..................................................................................................................... 45
5.2.2.4. AT+UART ..................................................................................................................... 45
5.2.2.5. AT+ UARTF .................................................................................................................. 46
5.2.2.6. AT+ UARTFT................................................................................................................ 46
T-

5.2.2.7. AT+ UARTFL ................................................................................................................ 46


5.2.2.8. AT+ MODBEN .............................................................................................................. 47
5.2.2.9. AT+TMODE .................................................................................................................. 47
5.2.2.10. AT+WMODE ............................................................................................................. 47
IO

5.2.2.11. AT+WSKEY/AT+WSKEYA ....................................................................................... 48


5.2.2.12. AT+WSKEYB ............................................................................................................ 48
5.2.2.13. AT+WSKEYC ........................................................................................................... 49
5.2.2.14. AT+WSSSID/AT+WSSSIDA .................................................................................... 49
5.2.2.15. AT+WSSSIDB .......................................................................................................... 50
5.2.2.16. AT+WSSSIDC .......................................................................................................... 50
5.2.2.17. AT+MSSID ................................................................................................................ 50
5.2.2.18. AT+WSLK ................................................................................................................. 51
5.2.2.19. AT+WEBU ................................................................................................................ 51
5.2.2.20. AT+WAP ................................................................................................................... 51

http://www.iotworkshop.com 3
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

5.2.2.21. AT+WAKEY .............................................................................................................. 52


5.2.2.22. AT+HIDESSID .......................................................................................................... 52
5.2.2.23. AT+MSLP ................................................................................................................. 53
5.2.2.24. AT+WSCAN .............................................................................................................. 53
5.2.2.25. AT+ TCPLK .............................................................................................................. 53
5.2.2.26. AT + TCPDIS ............................................................................................................ 54
5.2.2.27. AT+ WANN ............................................................................................................... 54
5.2.2.28. AT+ LANN ................................................................................................................ 54
5.2.2.29. AT + DHCPDEN ....................................................................................................... 55
5.2.2.30. AT+ DHCPGW .......................................................................................................... 55

P
5.2.2.31. AT+ TCPTO .............................................................................................................. 55
5.2.2.32. AT+ MAXSK ............................................................................................................. 56
5.2.2.33. AT+TCPB.................................................................................................................. 56

O
5.2.2.34. AT+TCPPTB ............................................................................................................. 56
5.2.2.35. AT+TCPADDB .......................................................................................................... 57
5.2.2.36. AT+TCPTOB ............................................................................................................ 57

SH
5.2.2.37. AT+TCPLKB ............................................................................................................. 57
5.2.2.38. AT+NTCPBSSLEN ................................................................................................... 57
5.2.2.39. AT+REGEN .............................................................................................................. 58
5.2.2.40. AT+REGTCP ............................................................................................................ 58
5.2.2.41. AT+REGID ................................................................................................................ 58
5.2.2.42. AT+EPHY ................................................................................................................. 59
RK
5.2.2.43. AT+STTC .................................................................................................................. 59
5.2.2.44. AT+DOMAIN ............................................................................................................. 59
5.2.2.45. AT+FRLDEN ............................................................................................................. 60
5.2.2.46. AT+RELD.................................................................................................................. 60
5.2.2.47. AT+Z ......................................................................................................................... 60
O
5.2.2.48. AT+MID..................................................................................................................... 60
5.2.2.49. AT+WRMID .............................................................................................................. 60
5.2.2.50. AT+VER .................................................................................................................... 61
5.2.2.51. AT+H......................................................................................................................... 61
W

5.2.2.52. AT+FVEW ................................................................................................................. 61


5.2.2.53. AT+FVER.................................................................................................................. 61
5.2.2.54. AT+WMAC ................................................................................................................ 62
5.2.2.55. AT+PING .................................................................................................................. 62
T-

5.2.2.56. AT+HTPSV/AT+HTTPURL ....................................................................................... 62


5.2.2.57. AT+HTPTP/AT+HTTPTP ......................................................................................... 63
5.2.2.58. AT+HTPURL/AT+HTTPPH ...................................................................................... 63
5.2.2.59. AT+HTTPCN ............................................................................................................ 63
IO

5.2.2.60. AT+HTTPUA ............................................................................................................. 63


5.2.2.61. AT+HTPMODE ......................................................................................................... 64
5.2.2.62. AT+HTPHEAD .......................................................................................................... 64
5.2.2.63. AT+FASWD .............................................................................................................. 64

APPENDIX A: QUESTIONS AND ANSWERS ............................................................................... 66


Q1: How to configure transparent serial port application (TCP protocol) with two DTU
devices? ........................................................................................................................................... 66
Q2: Where to SetDTU LAN IP and WAN IP through Web Page? ............................................... 66
Q3: How to configure transparent serial port application (UDP protocol) with two DTUs? .... 67
Q4: Where to set DTU network protocol (TCP/UDP)? .................................................................. 67

http://www.iotworkshop.com 4
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

Q5: How to configure transparent serial port application: Two DTUs all configured as
STA and connection through AP? ................................................................................................. 69
Q6: How to avoid IP address confliction when apply DTU? ....................................................... 70
Q7: PC works as server, all DTUs works as data acquisition card and connect with PC,
how to configure this application? ................................................................................................ 70
Q8: DTU works in STA mode, how does the PC get the DTU IP address. ................................. 71

APPENDIX B:RECOMMEND TOOLST ........................................................................................... 72


B.1.UART Tools ............................................................................................................................. 72
B.2.TCPUDP Tools ........................................................................................................................ 72
B.3.APP Tools ............................................................................................................................... 72

P
APPENDIX C: TELNET FUNCTION ............................................................................................. 73
C.1 Telnet Function:...................................................................................................................... 73

O
C.2 Telnet Character: .................................................................................................................... 73
C.3 Telnet Usage: .......................................................................................................................... 73

SH
APPENDIX C: CONTACT INFORMATION ..................................................................................... 79

RK
O
W
T-
IO

http://www.iotworkshop.com 5
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

LIST OF FIGURES

Figure 1. DTU-H10X Appearance....................................................................................................... 10


Figure 2. RS232 Pin Defination(Male/Needle Type) ......................................................................... 11
Figure 3. RJ45 Pin Defination ............................................................................................................ 12
Figure 4. DTU-H10X Mechanical Dimension ...................................................................................... 13
Figure 5. DTU-HXXX Series Order Information .................................................................................. 13
Figure 6. DTU-H1XX Functional Architecture ..................................................................................... 15
Figure 7. DTU AP Application ............................................................................................................. 15
Figure 8. DTU STA Application........................................................................................................... 16

P
Figure 9. DTU AP+STA Application .................................................................................................... 17
Figure 10. One AP and One STA Application ................................................................................... 18
Figure 11. Ethernet Interface Networking (As AP) ............................................................................ 19

O
Figure 12. Ethernet Interface Networking (As STA, N-Ver) .............................................................. 19
Figure 13. Ethernet Interface Networking (As STA, Z-Ver) .............................................................. 20
Figure 14. Search Page .................................................................................................................... 24

SH
Figure 15. Multi-TCP Link Data Transmition Structure ..................................................................... 26
Figure 16. Dual Socket Working Data Flow ...................................................................................... 26
Figure 17. Open Web Management page ......................................................................................... 29
Figure 18. Quick Configure Page ...................................................................................................... 30
Figure 19. Mode Selection Page ....................................................................................................... 30
Figure 20. AP Interface Setting Page ............................................................................................... 31
RK
Figure 21. STA Interface Setting Page ............................................................................................. 32
Figure 22. Application Setting Page .................................................................................................. 32
Figure 23. Ethernet Setting Page ...................................................................................................... 33
Figure 24. HTTPD Client Mode Page ............................................................................................... 34
Figure 25. Device Management Page .............................................................................................. 34
O

Figure 26. STA Interface Debug Connection .................................................................................... 35


Figure 27. AP Interface Debug Connection ...................................................................................... 35
Figure 28. “CommTools" Serial Debug Tools ................................................................................... 36
“TCPUDPDbg" Tools Create Connection ........................................................................ 36
W

Figure 29.
Figure 30. “TCPUDPDbg" Tools Setting ........................................................................................... 37
Figure 31. “TCPUDPDbg" Tools Connection .................................................................................... 37
Figure 32. Wireless Control Application ............................................................................................ 38
Figure 33. Remote Management Application .................................................................................... 38
T-

Figure 34. Transparent Serial Port Application ................................................................................. 39


Figure 35. Wireless Data Acquisition Card Application..................................................................... 40
Figure 36. The device Default UART Port Parameters ..................................................................... 41
Figure 37. Switch to Configuration Mode .......................................................................................... 41
IO

Figure 38. "AT+H" Instruction for Help .............................................................................................. 42


Figure 39. Configure Transparent Serial Port Connection (TCP) ..................................................... 66
Figure 40. DTU LAN IP Setting ......................................................................................................... 66
Figure 41. DTU WAN IP Setting........................................................................................................ 67
Figure 42. Configure Transparent Serial Port Connection (UDP) ..................................................... 67
Figure 43. DTU Network Protocols: TCP/Server .............................................................................. 68
Figure 44. DTU Network Protocol: TCP/Client .................................................................................. 68
Figure 45. DTU Network Protocol: UDP ........................................................................................... 69
Figure 46. Two DTUs Connection Through AP ................................................................................ 70
Figure 47. Wireless Data Acquisition Card Setting ........................................................................... 71

http://www.iotworkshop.com 6
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

Figure 48. UDP Search Function ...................................................................................................... 71

LIST OF TABLES

Table 1 DTU-H10X Technical Specifications ...................................................................................... 9


Table 2 DTU-H10X External Interface ............................................................................................... 10
Table 3 RS232 Interface..................................................................................................................... 11
Table 4 RJ45 Interface ....................................................................................................................... 12
Table 7 Serial Command Mode .......................................................................................................... 22
Table 5 The device Web Access Default Setting .............................................................................. 29

P
Table 6 Error Code DescribtionThe device Web Access Default Setting ......................................... 43
Table 7 AT+ Instruction Set List ........................................................................................................ 43

O
SH
RK
O
W
T-
IO

http://www.iotworkshop.com 7
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

HISTORY
Ed. V0.1 Created on 01-27-2016.

Ed. V0.2 Update AT command list and add Q&A.

Ed. V1.0 Update GPIO function.

Ed. V1.1 Add Telnet functio(firmware version at least 1.8), add TCPB SSL function(firmware
version has TLS word support this feature,AT+VER::4.02.11.DTU-1.8-TLS),Add DTU-H101、
DTU-H102 Type. Add Modbus RTU to Modbus TCP transfer.

P
O
SH
RK
O
W
T-
IO

http://www.iotworkshop.com 8
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

1. PRODUCT OVERVIEW
1.1. General Specification
Table 1 DTU-H10X Technical Specifications

Class Item Parameters


Port Number 1

P
Interface 8-Pin RJ45
Ethernet Port PHY Rate 10/100Mbps, MDI/MDIX

O
IP/TCP/UDP/DHCP/DNS/HTTP/ARP/
Network Protocol
ICMP/Web socket/Http Client
Standard 802.11 b/g/n

SH
Frequency 2.412GHz~2.484GHz
Network Mode STA/AP/STA+AP
Security Type WEP/WPAPSK/WPA2PSK
Encryption WEP64/WEP128/TKIP/ AES
Max Connection 32
Wi-Fi Port
RK 802.11b: +20 dBm (Max.)
Transmit Power 802.11g: +18 dBm (Max.)
802.11n: +15 dBm (Max.)
802.11b: -89 dBm (@11Mbps, CCK)
Receiver Sensitivity 802.11g: -81dBm(@54Mbps, OFDM)
O
802.11n: -71dBm(@HT20, MCS7)
Antenna Option External: 3dBi Antenna
Port Number 2(1 x RS232, 1x RS485)
W

RS232: DB9 Pin Type


Interface Standard
RS485: 2 wire(A+, B-)
Data Bits 5,6,7,8
UART Port Stop Bit 1,2
T-

Check Bit None, Even, Odd, Space, Mark


Baud Rate 300 bps ~ 460800bps
Flow Control RTS / CTS
Input Voltage 5~18V DC Input
IO

Operating Current Avg:170mA Peak:400mA


Operating Temp. -40℃~85℃
Hardware
Storage Temp. -45℃- 125℃ / 5 ~ 95% RH
Parameters
Dimensions 84 x 84 x25mm
Certificate CE/FCC/TELEC/RoHS
Warranty 2 Years
IP/TCP/UDP/DHCP/DNS/HTTP/ARP/
Network Protocol
Software ICMP/Web socket/Http Client/Telnet
Parameters Max. TCP Connection 32
Configure Interface Web Server / AT Command/ Telnet

http://www.iotworkshop.com 9
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

Class Item Parameters


Customization Support Software Customization

1.2. Hardware Introduction

P
O
SH
RK
Figure 1. DTU-H10X Appearance
O

1.2.1. Interface Description

Table 2 DTU-H10X External Interface


W

Function Name Description


External RJ45 Ethernet 10/100M Ethernet
Interface RS232 RS232 Communication
T-

RS485 RS485 Communicaton


DC5-18V DC Power 5~18V Input
LED Power 3.3V Internal Power Supply Indicator
IO

Indicator Boot Indicator


On: Device boot OK.
Ready
Off: Waiting For Device boot.
(The device need about 7 seconds to boot)
Wi-FIi Connection Indication
On:STA mode Connect to AP or AP mode
Link
other device connect to it.
Off:No Wi-Fi Conectoin

http://www.iotworkshop.com 10
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

Function Name Description


RXD RS232/RS485 Data Receive
TXD RS232/RS485 Data Transfer
Button
Restore to Factory Setting Button
Long Press this button for 3 seconds and
Reload
loosen, the device will restore to factory
setting in 10 seconds.

P
1.2.2. RS232 Interface

O
Device serial port is male(needle), RS232 voltage level(can connect to PC directly), Pin Order is
cosistent with PC COM port. Use cross Cable connected with PC(2-3 cross, 7-8 cross, 5-5 direct,

SH
7-8 no connection), see the following table for pin defination.

RK
Figure 2. RS232 Pin Defination(Male/Needle Type)

Table 3 RS232 Interface

Pin Number Name Description


O

2 RXD Receive Data


3 TXD Send Data
5 GND GND
W

7 RTS Request to Send


8 CTS Clear to Send
Defualt not used. May connect the jumper of
T-

9 VCC the DTU main board to make this pin


connected with DTU DC power supply.
IO

1.2.3. RS485 Interface

RS485 use two wire links, A(DATA+), B(DATA-). Connect A(+) to A(+), B(-) to B(-) for
communication.

1.2.4. RJ45 Interface

DTU-H10X Ethernet port is 10M/100M adaptive, support AUTO MDI/MDIX which means it
support direct connecting to PC with Ethernet cable. Ethernet function is enabled by default and it
can also be closed for power save via web or AT command.

http://www.iotworkshop.com 11
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

Figure 3. RJ45 Pin Defination

Table 4 RJ45 Interface

Pin Number Name Description

P
1 TX+ Transfer Data+
2 TX- Transfer Data-

O
3 RX+ Receive Data+
4 PHY-VCC Transformer Tap Voltage

SH
5 PHY-VCC Transformer Tap Voltage
6 RX- Receive Data-
7 N.C. None Connect
8 N.C. None Connect
RK
1.2.5. Button Interface

This Button is used for restore device to factory setting. When device is working(Ready LED on),
Press down this Button for more than 3 seconds and then lose, the device will reboot and restore
to factory setting in 10 seconds(Ready LED will be off when reboot, then it will on for boot OK).
O
W
T-
IO

http://www.iotworkshop.com 12
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

1.2.6. Mechanical Size


DTU-H10X device physical size as follows:

P
O
SH
RK
O
W

Figure 4. DTU-H10X Mechanical Dimension

1.2.7. Order Information


Base on customer detailed requirement, DTU-HXXX series product provide different variants and
physical type for detailed application.
T-
IO

Figure 5. DTU-HXXX Series Order Information

http://www.iotworkshop.com 13
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

1.2.8. Device Difference


Device difference is as following.
Type RS232 RS485 Ethernet Input Voltage Size(mm)
DTU-H100 √ √ √ 5~18V 84x84x25
DTU-H101 √ 5~18V 84x84x25
DTU-H101 √ 5~18V 84x84x25

1.2.9. Package Information

1 * DTU-HXXX

P
1 * 5V/1A Power Adapter

O
1 * Serial Cable(Only for DTU-H100)

1 * Ethernet Cable(Only for DTU-H100)

SH
1 * 3dBi Antenna

RK
O
W
T-
IO

http://www.iotworkshop.com 14
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

2. APPLICATION
2.1. Wireless Networking
The device can be configured as both wireless STA and AP base on network type. Logically there
are two interfaces in the device. One is for STA, and another is for AP. When the device works as
AP, other STA equipments are able to connect to wireless LAN via the device. Wireless
Networking is very flexible.
Following figure shows the functional architecture:

P
O
SH
Figure 6. DTU-H1XX Functional Architecture

Notes:
AP: that is the wireless Access Point, the founder of a wireless network and the centre of the
network nodes. The wireless router we use at home or in office may be an AP.
RK
STA: short for Station, each terminal connects to a wireless network (such as laptops, PDA and
other networking devices) can be called with a STA device.

2.1.1. AP Application
Infrastructure: it‟s also called basic network. It built by AP and many STAs which join in.
The characters of network of this type are that AP is the centre, and all communication between
O
STAs is transmitted through the AP. The figure following shows such type of networking.
W

DTU Device AP Mode

RS232/RS485
T-

PLC Device
i Link

W
IO

ink
i-F
Wi-F

iL
iL

i-F
in

W
k

Laptop Phone Tablet

Figure 7. DTU AP Application

http://www.iotworkshop.com 15
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

2.1.2. STA Application


As showing in the figure below, Router works as an AP, DTU and the laptop are STAs connected
to AP. Meanwhile, DTU connected to user device via RS232/RS485 interface. in such AP
network structure, the whole coverage of a wireless network can be extended easily.

DTU Device STA Mode

P
RS232/RS485

O
Server
Server PLC Device

SH
WWW. Network Cloud
RK s Con
Wirele
s
on
necti
O
W
T-

Laptop Phone Tablet

Figure 8. DTU STA Application


IO

2.1.3. AP+STA Applicatioin


The DTU support AP+STA network mode, means device support one AP interface and one STA
interface at the same time, as following figure.

http://www.iotworkshop.com 16
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

Server
Server

P
STA

O
RS232/RS485
DTU Device AP+STA Mode

SH
AP PLC Device

on
necti
s Con
s
Wirele
RK
O

Laptop Phone Tablet


W

Figure 9. DTU AP+STA Application

When device enables AP+STA function, device's STA interface can connect with router and
connect to TCP server in the network. At the same time, device's AP interface is also active and
T-

permit phone/PAD to connect, then phone/PAD can control user device and and setting the
device parameters,
The advantage of AP+STA mode is:
 Users can easily setting and track user device through Phone/PAD and not change the
IO

orginal network setting.


 Users can easily setting device‟s parameters through WiFi when device works as STA
mode.

AP+STA Mode Setting:


AP+STA mode need serial AT command to enable as follows:
 AT+FAPSTA=on, Enable AP+STA mode;
 AT+WMODE=STA, when configure device works as STA mode, it‟s AP interface still
active;

AP+STA Mode Notes:

http://www.iotworkshop.com 17
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

When user enable AP+STA function, the STA port need to keep connected with other router (AP),
or STA port will have to scan the AP frequently, which will affect AP port function and may cause
some data loss.

2.1.4. One AP One STA Applicatioin

P
AP IP: 10.10.101.254 RS232/RS485

O
PLC Device
AP

SH
STA

AP IP: 10.10.100.254
STA IP: 10.10.101.100
RK on
necti

AP
s Con
s
Wirele
O
W
T-

Laptop Phone Tablet


IP: 10.10.100.100 IP: 10.10.100.101 IP: 10.10.100.102

Figure 10. One AP and One STA Application


IO

Notes:
The AP and STA part of device IP must be set in different subnetwork as the above picture.

2.2. Ethernet Interface Communication


Device provides one 10/100M Ethernet interface. With this Ethernet interface, user can easily
realize the three interface (WiFi, RS232/RS485, and Ethernet) intercommunication and
networking. Device can configured as Bridge Mode or Router Mode base on different
networking technology.

Notes: The Ethernet function is enabled by default. Users may input “AT+FEPHY=on/off" and

http://www.iotworkshop.com 18
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

reset to enable/disable Ethernet. Device need different configuration to support different Ethernet
Networking mode (Such as “N-Ver" and “Z-Ver" as following, which need AT+FVER=n to switch
to N-Ver or AT+FVER=z to switch to Z-Ver).

2.2.1. Ethernet Interface Networking (As AP, N-Ver)

DTU Device AP Mode

P
RJ45 Ethernet
AP
IP:10.10.100.254

O
Laptop
IP:10.10.100.2

i Link

W
ink

SH
i-F
Wi-F
iL

iL
i-F

in
W

k
RK
Laptop Phone Tablet
IP:10.10.100.100 IP:10.10.100.101 IP:10.10.100.102
O
Figure 11. Ethernet Interface Networking (As AP)

For above networking, device works as AP and also the centre of this network. All devices‟ IP
address in this network shall use the same network segment with device and they can
W

intercommunication with this method.

2.2.2. Ethernet Interface Networking (As STA, N-Ver)


T-
IO

RJ45 Ethernet
Wireless
Wireless
Laptop Laptop
Ethernet IP:10.10.100.254 IP:192.168.1.1
IP:10.10.100.100 STA IP:192.168.1.100 IP:192.168.1.102

Figure 12. Ethernet Interface Networking (As STA, N-Ver)

For above networking, device works as STA(Firmware is N-Version),and device configured as


router mode. When device connect to AP, it will get wireless port IP address from AP(For
example: 192.168.1.100).At the same time, device also form a subnet(Default 10.10.100.254)
and all devices connected to device Ethernet interface will get assigned IP address(For example:

http://www.iotworkshop.com 19
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

10.10.100.100).So for above networking, PC1(left laptop) at internal subnet can initiate a
connection to PC2 , but PC2 can‟t active initiate a connection to PC1, they are in a different
subnetwork.

2.2.3. Ethernet Interface Networking (As STA, Z-Ver)

P
RJ45 Ethernet
Wireless
Wireless
Laptop

O
Laptop
IP:192.168.1.101 STATIC IP:192.168.1.10 IP:192.168.1.1
IP:192.168.1.102

Figure 13. Ethernet Interface Networking (As STA, Z-Ver)

SH
For above networking, device works as STA and device configured as bridge mode(AT+FVER=z).
When device connect to AP, all devices connected to device Ethernet interface will get assigned
IP address from AP (For example: 192.168.1.101).For device works as bridge mode, it can be
treated as a transparent device and PC1, PC2 can communicate without any limit. But in this
networking, device needs assign a static LAN IP address (For example: 192.168.1.10) if device
also needs communication with AP or configuration through web page.
RK
O
W
T-
IO

http://www.iotworkshop.com 20
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

3. FUNCTION DESCRIPTION
3.1. User Configuration Process

When device power on, it will work as the previous setting parameter. If need to change the
default working mode, need to configure the following example.

 Wireless Network Parameters


 Wireless Network Name(SSID)

P
 Security Mode
 Encryption Key

O
 TCP/UDP Linking Parameters
 Protocol Type
 Link Type(Server or Client)
 Target Port ID Number

SH
 Target Port IP Address

 Serial Port Parameters


 Baud Rate
 Data Bit
 Parity (Check) Bit
RK
 Stop Bit
 Hardware Flow Control

 Work Mode Selection


 Transparent/Agreement/HTTPD Client mode(AT+TMODE to set)
O

The following introduce the work mode in detail.

3.2. Working Mode


W

3.2.1. Transparent Transmission Mode

The device support serial interface transparent transmissioin mode. The benefit of this mode is to
T-

achieve a plug, play serial data port, and reduces user complexity. In this mode, user should only
configure the necessary parameters. After power on, the device can automatically connect to the
default wireless network and server. Use AT+NETP and AT+TCPB command to set the
communication parameters.
IO

As in this mode, the device 's serial port always work in the transparent transmission mode, so
users only need to think of it as a virtual serial cable, send and receive data as using a simple
serial. In other words, the serial cable of users'original serial devices are directly replaced by the
DTU device, user devices can be easy for wireless data transmission without any changes.

The transparent transmission mode can fully compatible with user's original software platform and
reduce the software development effort for integrate wireless data transmission.

Notes: Users may also enable the serial port hardware flow control(CTS/RTS) function, so that
we can make the bit error rate to a minimum. If the user doesn't need hardware flow control
function of the serial port, only need to make the CTS/RTS unconnected.

http://www.iotworkshop.com 21
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

3.2.2. Agreement(Serial Command Mode)

In this mode, the user can send the serial data to a different server address, this mode can use
UDP or TCP client to send data to server.

Customer MCU send packets according to the following format. The device will parse the
received serial data and send only the data to ther destination address. When data is received
from server, the device will output it directly.

Table 7 Serial Command Mode

Frame Function Backup Destination Target Check

P
Length Data
Header Byte Data Area Port Address Sum
Bytes 2 2(5+m+n) 1 2 2 m n 1

O
Frame Header:

0x55 0xAA (Constant value)

SH
Length:

Start from the function byte to check sum(does not contain the check sum). High byte first.

Function Byte:
RK
Bit0: (0-UDP, 1-TCP),

Bit1: (0-Short Connection, 1-Long Connection), if it is a short connection, it sends data, and
then disconnected; if it is a long connection, it sends data and keep the connection until receive
new data to change the target address. Valid only in TCP communication.
O

Bit2: (0-IP, 1-Domain Name), Indicate that the target address is IP or domain name. If it is
IP, the target address is 4 bytes. If it is domain name, the target address length includes the
entire domain name string length(the last byte address is '\0', the end of the string).
W

Backup Data Area:

Byte 1: If it is a short connection, this position is TCP waits for the timeout time (1-255), if
the device do not receive a response data after the data has been sent, then it wait a few
T-

seconds and the close the connection, e.g this byte is set as 5, then the device will wait from 5
seconds to receive data. If it receive data, then the connection is closed right away. If it is a long
connection, this byte should be 0.

Byte 2: Reserved.
IO

Destination Port:

Little endian, low byte first, e.g the destination port is 23, then the data flow should be
【0x17 0x00】

Target Address:

If it is IP, it is 4 bytes, e.g 【192.168.0.7】 should be 【0x07 0x00 0xA8 0xC0】. If it is a


domain, then the address length should include the ending character '\0' .

http://www.iotworkshop.com 22
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

Data:

Sent data, the maximum length is 1000 bytes.

Summary:

The following example for reference.

UART Data: 【0x55 0xaa 0x00 0x0a 0x00 0x00 0x00 0x21 0x00 0x85 0x00 0xA8 0xC0 0x01 0x0f】

Length: 【0x00 0x0a】

P
Function Byte:【0x00 (UDP;Short connection;IP;cut protocol)】

O
Destination Port:【0x21 0x00(33)】

Target Address:【0x85 0x00 0xA8 0xC0 (192.168.0.133)】

SH
Data:【0x01(data:1)】

Sum Check:【0x0f (0x00+0x00+0x00+0x21+0x00+0x85+0x00+0xA8+0xC0+0x01=0x0f)】

3.2.3. HTTPD Client Mode


RK
This mode is used to send data to HTTP server. It can be set by AT command or Webpage(Note
that AT+NETP and AT+TCPB channel is no long valid in this mode), it is long connection by
default.

The following shows example to use this.


O

Step 1:Set HTTP Command

AT+TMODE=Httpdclient
W

AT+HTPMODE=new

AT+HTPSV=10.10.100.200,80
T-

AT+HTPTP=GET

AT+HTPURL=/abcd
IO

AT+HTPHEAD=Content-type:text/html;charset=utf-8

AT+Z

Step 2:send abcd data and the device will send the following GET request to the HTTP
server.
GET /abcdabcd HTTP/1.1
Content-type:text/html;charset=utf-8

http://www.iotworkshop.com 23
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

3.3. Wi-Fi Parameter Setting


3.3.1. Auto- Frequency Function
When device works as STA, it will adjust its wireless channel to keep the same channel with
associated AP and connect in.

When device works as AP and enable Auto-frequency function, then when device boot up, it will
select the best wireless channel based on surrounding environment.

3.3.2. Security
The device supports multiple wireless encryption mechanisms, and enables to protect the

P
security of user‟s data transmission, the mechanisms include:

O
WEP
 WPA-PSK/TKIP
 WPA-PSK/AES
 WPA2-PSK/TKIP

SH
 WPA2-PSK/AES

3.3.3. Search Function for STA

When using web configuration of STA interface Setting Page, user can click "Search" button to
find the surrounding AP, and select a AP to connect.
RK
O
W

Figure 14. Search Page

3.3.4. Address Binding


T-

The device supports the feature of binding the BSSID address of target network.

According to the provisions of 802.11 protocol, different wireless networks can have a same
network name (i.e. SSID / ESSID), but must correspond to a unique BSSID address (i.e. MAC
IO

address). Illegal intruders can create a wireless network with the same SSID / ESSID, it will make
STAs in the network to join to the illegal AP, thereby and then network leakage happen.

Users can prevent STA from joining to illegal network by binding the BSSID address, to improve
wireless network security.

3.4. UART Frame Scheme


3.4.1. UART Free-Frame
The device support UART free-frame function. If user select open this function, device will check
the intervals between any two bytes when reciving UART data. If this interval time exceeds

http://www.iotworkshop.com 24
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

defined value (50ms default), The device will think it as the end of one frame and transfer this
free-frame to WiFi port, or The device will receive UART data untill 4K bytes, then transfer 4KB
frame to WiFi port.

The device‟s default interval time is 50ms. User can also set this interval to fast (10ms) through
AT command. But user have to consider if user MCU can send UART data with 10ms interval ,or
the UART data may be divide as fragment.

Through AT command: AT+FUARTTE=fast/normal, user can set the interval time: fast (10ms)
and normal (50ms). This command is factory default setting command and AT+RELD can‟t
change its value.

P
3.4.2. UART Auto-Frame
The device support UART auto-frame function. If user select open this function and setting auto-

O
frame trigger length and auto-frame trigger time parameters, then device will auto framing the
data which received from UART port and transmitting to the network as pre-defined data structure.

 Auto-frame trigger length: The fixed data length that device used to transmitting to the

SH
network.

 Auto-frame trigger time: After the trigger time, if UART port received data can‟t reach
auto-frame trigger length, then device will transmitting available data to the network and
bypass the auto-frame trigger length condition.
RK
Detailed UART auto-frame function can refer to AT+ instruction set “UARTF/UARTFT/UARTFL"
introduction.

3.5. Network Setting


The device supports TCP/UDP network protocol and the port parameters can be set via web
O

accessing or AT+instruction set. It has two TCP/UDP Socket: Socket A and Socket B. Serial data
sent to the device, it will be sent to the both Socket A and B simultaneously; TCP/UDP data that it
receives from either Socket A or B, the data will be sent to the serial port.You can achieve a
variety of network communication for setting the dual socket.
W

3.5.1. Socket A
Socket A has three work mode: TCP Server, TCP Client and UDP. Please refer to the AT+NETP
command instruction for detailed setting.When Socket A configured as TCP Server, it supports
T-

Multi-TCP link connection, and maximum 32 TCP clients are permitted to connect to Socket A.
Multi-TCP link connection will work as following structure:

Upwards data stream: All data from different TCP connection or client will be transmitted to the
serial port as a sequence.
IO

Downwards data stream: All data from serial port (user) will be duplicate and broadcast to every
TCP client.

Detailed multi-TCP link data transmition structure as following figure:

http://www.iotworkshop.com 25
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

P
O
Figure 15. Multi-TCP Link Data Transmition Structure

3.5.2. Socket B

SH
Socket B has one work mode: TCP Client, please refer to the AT + TCPB command instruction.

 AT+TCPB=on, Enable TCPB function;


 AT+TCPPTB=<port>, Set TCPB port number;
 AT+TCPADDB=<IP or domain>, Set TCPB‟s server address;
 AT+TCPTOB=<time>, Set TCPB timeout;
 AT+TCPLKB,
RK
Query TCPB link status;

With variety work mode, socket B can provide users with flexible data transfer methods.For
example, SocketB can connect to a remote server in order to achieve remote control.
O
W
T-

Figure 16. Dual Socket Working Data Flow

3.6. TCP Password Authentication


This feature is available only on Socket A TCP server mode, when the TCP client connection to
IO

the device, it will authenticate each connected tcp.

Each TCP client first data should be the “password+0x0d+0x0a" (the password is Webpage
authentication password).

The default password is “admin", so the first piece of data should be "0x61 0x64 0x6D 0x69 0x6E
0x0D 0x0A"(Hex). If the password is correct, the Convert Server returns "OK", on the other hand,
return to the "NO" and disconnect.

The TCP connection of this function can be Webpage in TCP connection password uthentication
is opened or disable. Please refer to the specific webpage section.

http://www.iotworkshop.com 26
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

3.7. Upload ID
This function only applies to the the device as a TCP client (Socket A or Socket B), in front of the
data when the device connected to the server, it will add with two bytes of ID (ID the range is 0 ~
65535, the high byte first, and the low byte behind) plus two bytes ID radix-minus-one
complement, e.g the default ID is 1111, then the "0x57 0x04 0xfb 0xa8" will be sent to the server.

There are two ways to upload their own id: one is to upload their own id for connection to the
server for the first time;The other is a plus id in front of each data. ID number related parameter is
set in the "serial port and other Settings" section of the web, build joint function of ID for the first
time, and each data with the function of ID are opened by default.

P
May also use the AT command to set the related parameters. Refer to AT+REGXX command for
detail.

O
3.8. Keepalive
When the TCP connection becomes abnormal between DTU device and server, the device will

SH
detect this abnormal status and reconnect to server if it works in TCP client. When it works in
TCP server, it will release the TCP resources for next conection.

3.9. Multiple STA Parameters


RK
When device is in the STA mode, if it loose network signal when the signal is too low, it will
automatically switch to the other AP network (switching network automatically restart).

This function is disabled by default.


O

3.10. Websocket(Reserved)
Contact us for detailed application.
W

3.11. Parameters Setting


device supports two methods to configuration parameters: Web Accessing and AT+instruction set.

Web accessing means users can configure parameters through Web browser. When device
T-

connected to wireless network, parameters configuration can be done on a PC connected to the


same wireless network. AT+instruction set configuration means user configure parameters
through serial interface command. Refer to “AT+instruction set" chapter for more detail.

Notes:
IO

We can customized the parameters setting as customer request and ship devices with these
parameters as factory default configuration. It will reduce user‟s device configuration time for
mass production. Also, if user need different parameters setting for every device, we can provide
the auto-configuration tool to speed up the device conguration duration. Please contact our
technical interface to acquire this tool if required.

3.12. Palmodic Signal


Base on selected factory default setting, nReady signal can have two output statuses:
 Status One: The device will output “0" after normal boot up. This signal used to judge if
device finish boot up and ready for application.

http://www.iotworkshop.com 27
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 Status Two: The device will output “Palmodic Signal" after normal boot up.The palmodic
signal is 0.5Hz square wave with dutyfactor 1:1. User can query this signal to judge if
deviceis active “live" or need to re-boot. When device switches to command mode, it will
output “0", which used to distinguish work mode and command mode.

Notes:
This function is user selected factory setting and RELD instruction will not effective for this
function. If user not requires this function, the default factory setting is Status One. Contact us for
more detailed support

P
3.13. Firmware Upgrade
device supports firmware upgrade online; User can upgrade firmware via web access.

O
SH
RK
O
W
T-
IO

http://www.iotworkshop.com 28
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

4. OPERATION GUIDELINE
4.1. Configuration via Web Accessing
When first use device, user may need some configuration. User can connect to device‟s wireless
interface with following default setting information and configure the device through laptop.

Table 5 The device Web Access Default Setting

P
Parameters Default Setting
SSID DTU-H10X_XXXX

O
IP Address 10.10.100.254
Subnet Mask 255.255.255.0
User Name admin

SH
Password admin

4.1.1. Open Web Management Interface


Step 1: Connect laptop to SSID “DTU-H10X_XXXX" of the device via wireless LAN card;
Step 2: After wireless connection OK. Open Wen browser and access “http://10.10.100.254";
Step 3: Then input user name and password in the page as following and click “OK" button.
RK
O
W
T-

Figure 17. Open Web Management page

The The device web management page support English and Chinese language. User can select
language environment at the top right corner and click “Apply" button.
IO

The main menu include nine pages: "Quick Configure", "Mode Selection", "AP Interface Setting",
"STA Interface Setting","Application Setting", and so on.

4.1.2. Quick Configure


This page provides users with a method of rapid configuration of device.Users according to the
steps to configure the parameters and restart the device, you can let the device work
rapidly,reduced the configuration steps and time. It still need to the corresponding configuration
page if need to set some detailed parameters.

http://www.iotworkshop.com 29
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

P
O
SH
Figure 18. Quick Configure Page
RK
This page has four configuration options and a restart, the corresponding instructions below:
 WI-FI Setting: set the working mode of wifi, AP mode or the STA.
 Ethernet Ports Setting: open/close the Ethernet ports, and set up the corresponding work
mode.
 UART Setting: set serial port parameters, including baud rate, parity bit, 485 functions and
so on.
O
 Network Setting: set network parameters, Only Socket A related parameters.
 Device Management: when after completion of the above parameters are configured, click
reset.
W

4.1.3. Mode Selection Page


This page use to setting the device working mode (Transparent Transmission or HTTPD Client
mode and so on) and wireless networking mode (AP and STA mode).
T-
IO

Figure 19. Mode Selection Page

http://www.iotworkshop.com 30
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

4.1.4. AP Interface Setting Page


This page use to setting the parameters when device works as AP.

P
O
SH
RK
Figure 20. AP Interface Setting Page

4.1.5. STA Interface Setting Page


This page use to setting the parameters when device works as STA.
O
Such as SSID of AP which device need to connected, and also select the networking type: DHCP
or static IP address.
W
T-
IO

http://www.iotworkshop.com 31
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

Figure 21. STA Interface Setting Page

4.1.6. Application Setting Page


This page use to setting the parameters of serial port communication, such as UART setting and
high layer network protocol setting which used support serial communication.

P
O
SH
RK
O
W
T-
IO

Figure 22. Application Setting Page

Notes:

Generally, Network protocols support three modes: TCP Server, TCP Client, UDP Server and
UDP Client. UDP has no server and client requirement according to standard. But we do special

http://www.iotworkshop.com 32
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

function for UDP Server mode, If set as UDP Server, the device will save the IP address and port
of the latest UDP packet received. The data will be sent to the saved IP address and port. If the
device hasn‟t saved any IP address and port when power up. The data will be sent to the IP
address and port which is set by this command.

Besides device working as TCP Server (IP address not required in this mode). User must set the
IP address of the device which need communicate with device.

Also the Port ID between two sides of the communication devices must keep the same.
For 4.02.11.DTU-1.9 or above software version, it support modus protocol.

P
O
SH
RK
O

4.1.7. Ethernet Setting


W

This page is used to set the Ethernet Port function. If need to connect to router by Ethernet, it
should be set as WANN Port, if need to connect to PC, it should be set as LAN Port.
T-
IO

Figure 23. Ethernet Setting Page

4.1.8. HTTPD Client Mode


This page sets the HTTP header in the HTTPD Client mode. This page will be updated later.

http://www.iotworkshop.com 33
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

P
O
SH
Figure 24. HTTPD Client Mode Page

4.1.9. Device Management Page


This page use to manage device general setting, such as administrator setting, restart device
button, restore factory default setting button, and update firmware through webpage.
RK
O
W
T-
IO

Figure 25. Device Management Page

Notes:

http://www.iotworkshop.com 34
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

Restart device button: When you setting the parameters of different web pages, you will click
“Apply" button to confirm the setting, but the setting take effect only after user click the “Restart"
button here, the device will re-boot up and reflash the memory information with new changes.
WEB IO and Advances page function is reserved.

4.2. The device Usage Introduction


4.2.1. Software Debug Tools
Recommend to use two common software tools debugging and applying device.
(User can also select other tools used to debug serial and Ethernet port).

P
 Serial Debugging Software: ComTools

O
Serial Debugging Software: Accessport
 Ethernet Debugging Software: TCPUDPDbg

4.2.2. Network Connection

SH
User can select two methods to connect device base on dedicated application.

 Use The device STA interface


The device and debug PC2 connect to a wireless AP, another PC1 (or user device) connect to
device with serial port:
RK
RS232/RS485
O
Laptop Laptop

Figure 26. STA Interface Debug Connection


W

 Use The device AP interface


Debug PC2 connect to The device through wireless connection, another PC1 (or user device)
connect to device with serial port.
T-

RS232/RS485
IO

Laptop Laptop

Figure 27. AP Interface Debug Connection

4.2.3. Device Debug


PC1 open “CommTools" program, setting the same serial port parameters with device and open
serial port connection.

http://www.iotworkshop.com 35
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

P
O
SH
Figure 28. “CommTools" Serial Debug Tools

PC2 open “TCPUDPDbg" program, and create a new connection. If The device configured as
Server mode, “TCPUDPDbg" Tools shall create “Client “mode connection. Or otherwise, create a
RK
“Server" mode connection.
O
W
T-
IO

Figure 29. “TCPUDPDbg" Tools Create Connection

Then setting the TCP/UDP connection parameters. Default as following:

http://www.iotworkshop.com 36
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

P
O
SH
Figure 30. “TCPUDPDbg" Tools Setting

Then, click “Create" button to create a connection.


RK
O
W
T-
IO

Figure 31. “TCPUDPDbg" Tools Connection

Now, in transparent transmission mode (The device default setting), data can be transferred from
“CommTools" program to “TCPUDPDbg" program, or in reverse. You can see data in receiver
side will keep same as in sender side.

http://www.iotworkshop.com 37
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

4.3. Typical Application Examples


4.3.1. Wireless Control Application

RS232/RS485

P
PLC Device

Figure 32. Wireless Control Application

O
For this wireless control application, The device works as AP mode. Device‟s serial port connects
to user device. So, control agent (Smart phone for this example) can manage and control the
user device through the wireless connection with device.

SH
4.3.2. Remote Management Application

DTU Device STA Mode


RK
RS232/RS485
O
Server
Server PLC Device
W

WWW. Network Cloud


T-
IO

DTU Device STA Mode

RS232/RS485

PLC Device

Figure 33. Remote Management Application

http://www.iotworkshop.com 38
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

For this remote management application, The device works as STA mode and connects to
Internet through wireless AP. Device configured as TCP Client and communicates with remote
TCP server at Internet. Device‟s serial port connects to user device.

So, user device‟s data or sampling information can send to remote TCP server for storage or
processing. Also remote TCP server can send command to control and manage the user device
through the wireless network.

4.3.3. Transparent Serial Port Application


For this transparent serial port application, two device connect as below figures to build up a
transparent serial port connection.

P
O
SH
AP IP: 10.10.101.254 RS232/RS485

PLC Device
AP
RK
STA

AP IP: 10.10.100.254
STA IP: 10.10.101.100
RS232/RS485
O

PLC Device
W

Figure 34. Transparent Serial Port Application

For up side device, configured as AP mode and use default SSID and IP address changed to
10.10.101.254, network protocol configured as TCP/Server mode, and protocol port ID: 8899.
T-

For down side device, configured as STA mode and setting the same SSID with up side device,
enable DHCP network and network protocol configured as TCP/Client mode, protocol port ID:
8899. Target IP address part setting the same IP address with up side device (“10.10.101.254"
for this example).
IO

When down side device boot up, it will find wireless AP and open TCP/Client network protocol to
connect with up side device‟s TCP/Server. All these operation will be automatic and after finished,
the two user devices connected to device through serial port can communicate each other and
think the connection between them is fully transparent.

4.3.4. Wireless Data Acquisition Card Application


For this wireless data acquisition card application, one PC works as data server and every data
acquisition card connects with a device to support wireless connection function.

http://www.iotworkshop.com 39
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

LAN IP: 10.10.100.254


Net Prot: TCP Client
10.10.100.100:8899

AP
IP: 10.10.100.100
Net Prot: TCP Server 8899

P
O
STA STA

RS232/RS485 RS232/RS485

SH
LAN IP: 10.10.99.254 LAN IP: 10.10.98.254
WAN IP: 10.10.100.101 WAN IP: 10.10.100.102
Net Prot: TCP Client Net Prot: TCP Client
10.10.100.100:8899 10.10.100.100:8899
RK
Figure 35. Wireless Data Acquisition Card Application

As above figure, one The device configured as AP mode and all others configured as STA mode.
All The device which configured as STA and data server PC wireless connected to The device
which configured as AP to make up a wires network.
O

Data server PC open TCP/Server protocol and all device open TCP/Client protocol. All data
acquisition cards‟ data and sampling information can be transmitted to data server PC for
operation.
W
T-
IO

http://www.iotworkshop.com 40
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

5. AT+INSTRUCTION INTRODUCTION

5.1. Configuration Mode


When The device power up, it will default works as transparent transmission mode, then user can
switch to configuration mode by serial port command. The device UART default parameters setting as
below figure,

P
O
SH
Figure 36. The device Default UART Port Parameters

In configuration mode, user can setting the device through AT+ instruction set, which cover all web
RK
page setting function.

5.1.1. Switch to Configuration Mode


Two steps to finish switching from transparent transmission mode to configuration mode.
O

 UART input “+++", after device receive “+++", and feedback “a" as confirmation.
 UART input “a", after device receive “a" and feedback “+ok" to go into AT+
instruction set configuration mode.
W
T-
IO

Figure 37. Switch to Configuration Mode

Notes:

http://www.iotworkshop.com - 41 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

1. When user input “+++" (No “Enter" key required), the UART port will display feedback information
“a", and not display input information"+++" as above UART display.
2. Any other input or wrong step to UART port will cause the device still works as original mode
(transparent transmission).

5.2. AT+ Instruction Set Overview


User can input AT+ Instruction through hyper terminal or other serial debug terminal, also can program
the AT+ Instruction to script. User can also input “AT+H" to list all AT+ Instruction and description to
start.

P
O
SH
RK
O
W

Figure 38. "AT+H" Instruction for Help

5.2.1. Instruction Syntax Format


T-

AT+Instruction protocol is based on the instruction of ASCII command style, the description of syntax
format as follow.
 Format Description
 < >: Means the parts must be included
IO

 [ ]: Means the optional part

 Command Message

AT+<CMD>[op][para-1,para-2,para-3,para-4…]<CR>

 AT+: Prefix of command message;


 CMD: Command string;
 [op]: Symbol of command operator,
 “=" : The command requires parameters input;

http://www.iotworkshop.com - 42 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 “NULL": Query the current command parameters setting;


 [para-n]: Parameters input for setting if required;
 <CR>:"Enter" Key, it‟s 0x0a or 0x0d in ASCII;

Notes: When input AT+Instruction, “AT+<CMD>" character will display capital letter automatic and
other parts will not change as you input.

 Response Message

+<RSP>[op] [para-1,para-2,para-3,para-4…]<CR><LF><CR><LF>

P
 +: Prefix of response message;

O
RSP: Response string;
 “ok" : Success
 “ERR": Failure

SH
 [op] : =
 [para-n]: Parameters if query command or Error code when error happened;
 <CR>: ASCII 0x0d;
 <LF>: ASCIII 0x0a;
RK
 Error Code

Table 6 Error Code DescribtionThe device Web Access Default Setting

Error Code Description


O

-1 Invalid Command Format


-2 Invalid Command
-3 Invalid Operation Symbol
W

-4 Invalid Parameter
-5 Operation Not Permitted

5.2.2. AT+ Instruction Set


T-

Table 7 AT+ Instruction Set List

Instruction Description
<null> NULL
IO

E Open/Close show back function


ENTM Set device into transparent transmition mode
NETP Set/Query network protocol parameters
UART Set/Query serial port parameters
UARTF Open/Close UART auto-frame function
UARTFT Set/Query UART auto-frame trigger time
UARTFL Set/Query UART auto-frame trigger length
TMODE Set/Query data transmition mode
(transparent transmition)
WMODE Set/Query WIFI work mode (AP or STA)
WSKEY Set/Query WIFI security parameters as STA
WSSSID Set/Query WIFI target AP SSID parameters as STA

http://www.iotworkshop.com - 43 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

WSLK Query WiFi link status as STA


WEBU Set/Query WEB page login parameters
(User Name and Password)
WAP Set/Query WIFI parameters as AP
WAKEY Set/Query WIFI security parameters as AP
HIDESSID Set/Query hide AP‟s SSID
MSLP Set devices into power save mode.(Turn OFF WiFi)
WSCAN Seek AP when device works as STA mode
TCPLK Query if TCP link already build-up
TCPDIS Open/Cose TCP (Only TCP Client available)
WANN Set/Query WAN setting, only effective as STA mode
LANN Set/Query LAN setting, only effective as AP mode

P
DHCPDEN Enable/Disable LAN DHCP server function
DHCPGW Set/Query DHCP gateway address

O
TCPTO Set/Query TCP timeout
MAXSK Set/Query maxima TCP connection
TCPB Open/Close TCPB function

SH
TCPPTB Set/Query TCPB port number
TCPADDB Set/Query TCPB server address
TCPTOB Set/Query TCPB time out time
TCPLKB Query TCPB link status
NTCPBSSLEN Set/Query TCPB SSL function
EPHY Open/Close ETH interface
RK
STTC Enable/Disable STA port scan function
DOMAIN Set/Query domain ofdevice webpage
FRLDEN Enable/Disable nReload pin function
RELD Restore to factory default setting
Z Re-start device
O

MID Query device ID information


WRMID Set device ID
VER Query device software version information
W

H Help
FVEW Enable/Disable WANN mode
FVER Set/Query working mode
WMAC Set/Query AP MAC address
T-

PING PING command

Notes: device can works as AP or STA, user have to use different AT+ Instruction to set WiFi
IO

parameters when device works as AP or STA mode.

5.2.2.1. AT+E
 Function: Open/Close show back function;
 Format:

AT+E<CR>
+ok<CR>< LF ><CR>< LF >

When device firstly switch from transparent transmission to configuration mode, show back status is
open, input “AT+E" to close show back function, input“AT+E" again to open show back function.

http://www.iotworkshop.com - 44 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

5.2.2.2. AT+ENTM
 Function: Set device into transparent transmition mode;
 Format:

AT+ENTM<CR>
+ok<CR>< LF ><CR>< LF >

When operate this command, device switch from configuration mode to transparent transmission
mode.

P
5.2.2.3. AT+NETP
 Function: Set/Query network protocol parameters;

O
 Format:
 Query Operation
AT+NETP<CR>

SH
+ok=<protocol,CS,port,IP><CR>< LF ><CR>< LF >
 Set Operation
AT+NETP=<protocol,CS,port,IP><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
RK
 protocol:
 TCP
 UDP
 CS: Network mode:
O

 SERVER
 CLIENT
 Port: protocol port ID: Decimal digit and less than 65535
W

 IP: Server‟s IP address when device set as client


After device boots up again, the setting will be effective.
T-

5.2.2.4. AT+UART
 Function: Set/Query serial port parameters;
 Format:
 Query Operation
IO

AT+UART<CR>
+ok=<baudrate,data_bits,stop_bit,parity,flowctrl><CR>< LF ><CR>< LF >
 Set Operation
AT+UART=<baudrate,data_bits,stop_bit,parity><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 baudrate:
 300,600,
1200,1800,2400,4800,9600,19200,38400,57600,115200,230400,460800

http://www.iotworkshop.com - 45 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 data_bits:
 5,6,7,8
 stop_bits:
 1,2
 parity:
 NONE,EVEN,ODD,MARK,SPACE
 flowctrl:hardware flow control (CTSRTS)
 NFC: No flow control
 FC: flow control
After device boots up again, the setting will be effective.

P
5.2.2.5. AT+ UARTF
 Function: Open/Close UART auto-frame function;

O
 Format:
 Query Operation

SH
AT+ UARTF<CR>
+ok=<para><CR>< LF ><CR>< LF >
 Set Operation
AT+ UARTF=<para ><CR>
+ok<CR>< LF ><CR>< LF >
RK
 Parameters:
 para:
 disable - Close auto-frame function;
 enable - Open auto-frame function;
O

5.2.2.6. AT+ UARTFT


 Function: Set/Query UART auto-frame trigger time;
W

 Format:
 Query Operation
AT+ UARTFT<CR>
T-

+ok=<time><CR>< LF ><CR>< LF >


 Set Operation
AT+ UARTFT=<time ><CR>
+ok<CR>< LF ><CR>< LF >
IO

 Parameters:
 time: Range 100 ~10000; Unit: ms. Auto-frame trigger time

5.2.2.7. AT+ UARTFL


 Function: Set/Query UART auto-frame trigger length;
 Format:
 Query Operation
AT+ UARTFL<CR>
+ok=<len><CR>< LF ><CR>< LF >
 Set Operation

http://www.iotworkshop.com - 46 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

AT+ UARTFL=<len ><CR>


+ok<CR>< LF ><CR>< LF >
 Parameters:
 len: Range 64 ~4096; Unit: byte. Auto-frame trigger length;

5.2.2.8. AT+ MODBEN


 Function: Set/Query Modbus function, valid when reboot
 Format:
 Query Operation
AT+ MODBEN<CR>

P
+ok=<status><CR>< LF ><CR>< LF >
 Set Operation
AT+ MODBEN=<status ><CR>

O
+ok<CR>< LF ><CR>< LF >
 Parameters:

SH
 status: on/off; enable/disable Modbus function.

5.2.2.9. AT+TMODE
 Function: Set/Query data transmition mode;
 Format:
RK
 Query Operation
AT+TMODE<CR>
+ok=<tmode><CR>< LF ><CR>< LF >
 Set Operation
O

AT+ TMODE=<tmode><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
W

 tmode: Data transmition mode


 Through: Transparent transmition
 Agreement: Serial command mode
T-

 GPIO: GPIO mode(Reserved)


 Httpdclient:HTTPD Client mode
After device boots up again, the setting will be effective.
IO

5.2.2.10. AT+WMODE
 Function: Set/Query WIFI work mode;
 Format:
 Query Operation
AT+WMODE<CR>
+ok=<mode><CR>< LF ><CR>< LF >
 Set Operation
AT+ WMODE=<mode><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:

http://www.iotworkshop.com - 47 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 mode:WIFI work mode


 AP
 STA
After device boots up again, the setting will be effective.

5.2.2.11. AT+WSKEY/AT+WSKEYA
 Function: Set/Query WIFI security parameters as STA for first target AP;
 Format:
 Query Operation
AT+WSKEY/AT+WSKEYA<CR>

P
+ok=<auth,encry,key><CR>< LF ><CR>< LF >
 Set Operation
AT+ WSKEY/AT+WSKEYA=< auth,encry,key><CR>

O
+ok<CR>< LF ><CR>< LF >
 Parameters:

SH
 auth: Authentication mode
 OPEN
 SHARED
 WPAPSK
 encry:Encryption algorithm
RK
 NONE: When “auth=OPEN", effective
 WEP-H: When “auth=OPEN" or “SHARED", effective, HEX format
 WEP-A: When “auth=OPEN" or “SHARED", effective, ASCII format
 TKIP: When "auth= WPAPSK", effective
O

 AES: When “auth= WPAPSK", effective


 key: password, ASCII code, shall less than 64 bit and greater than 8bit
This Instruction only effective for The device works as STA. After device boots up again, the setting
W

will be effective. But user can set this command when device configured as AP.

5.2.2.12. AT+WSKEYB
T-

 Function: Set/Query WIFI security parameters as STA for second target AP;
 Format:
 Query Operation
AT+WSKEYB<CR>
IO

+ok=<auth,encry,key><CR>< LF ><CR>< LF >


 Set Operation
AT+WSKEYB=< auth,encry,key><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 auth: Authentication mode
 OPEN
 SHARED
 WPAPSK
 encry:Encryption algorithm

http://www.iotworkshop.com - 48 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 NONE: When “auth=OPEN", effective


 WEP-H: When “auth=OPEN" or “SHARED", effective, HEX format
 WEP-A: When “auth=OPEN" or “SHARED", effective, ASCII format
 TKIP: When "auth= WPAPSK", effective
 AES: When “auth= WPAPSK", effective
 key: password, ASCII code, shall less than 64 bit and greater than 8bit
This Instruction only effective for The device works as STA. After device boots up again, the setting
will be effective. But user can set this command when device configured as AP.

5.2.2.13. AT+WSKEYC

P
Function: Set/Query WIFI security parameters as STA for third target AP;
 Format:
 Query Operation

O
AT+WSKEYC<CR>
+ok=<auth,encry,key><CR>< LF ><CR>< LF >

SH
 Set Operation
AT+WSKEYC=< auth,encry,key><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 auth: Authentication mode
RK
 OPEN
 SHARED
 WPAPSK
 encry:Encryption algorithm
O

 NONE: When “auth=OPEN", effective


 WEP-H: When “auth=OPEN" or “SHARED", effective, HEX format
 WEP-A: When “auth=OPEN" or “SHARED", effective, ASCII format
W

 TKIP: When "auth= WPAPSK", effective


 AES: When “auth= WPAPSK", effective
 key: password, ASCII code, shall less than 64 bit and greater than 8bit
T-

This Instruction only effective for The device works as STA. After device boots up again, the setting
will be effective. But user can set this command when device configured as AP.
IO

5.2.2.14. AT+WSSSID/AT+WSSSIDA
 Function: Set/Query WIFI first target AP SSID parameters as STA.
 Format:
 Query Operation
AT+WSSSID/AT+WSSSIDA<CR>
+ok=<ap’s ssid><CR>< LF ><CR>< LF >
 Set Operation
AT+ WSSSID/AT+WSSSIDA=<ap’s ssid ><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:

http://www.iotworkshop.com - 49 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 ap‟s ssid: AP‟s SSID


This Instruction only effective for The device works as STA. After device boots up again, the setting
will be effective. But user can set this command when device configured as AP. The default is DTU-
H10X_XXXX.

5.2.2.15. AT+WSSSIDB
 Function: Set/Query WIFI second target AP SSID parameters as STA.
 Format:
 Query Operation
AT+WSSSIDB<CR>

P
+ok=<ap’s ssid><CR>< LF ><CR>< LF >
 Set Operation
AT+ WSSSIDB=<ap’s ssid ><CR>

O
+ok<CR>< LF ><CR>< LF >
 Parameters:

SH
 ap‟s ssid: AP‟s SSID
This Instruction only effective for The device works as STA. After device boots up again, the setting
will be effective. But user can set this command when device configured as AP. The default is DTU-
H10X_AP2.
RK
5.2.2.16. AT+WSSSIDC
 Function: Set/Query WIFI third target AP SSID parameters as STA.
 Format:
 Query Operation
O

AT+WSSSIDC<CR>
+ok=<ap’s ssid><CR>< LF ><CR>< LF >
 Set Operation
W

AT+ WSSSIDC=<ap’s ssid ><CR>


+ok<CR>< LF ><CR>< LF >
 Parameters:
T-

 ap‟s ssid: AP‟s SSID


This Instruction only effective for The device works as STA. After device boots up again, the setting
will be effective. But user can set this command when device configured as AP. The default is DTU-
H10X_AP3.
IO

5.2.2.17. AT+MSSID
 Function: Enable/Disable device wi-fi STA auto switch function
 Format:
 Query Operation
AT+MSSID<CR>
+ok=<ret><CR>< LF ><CR>< LF >
 Set Operation
AT+MSSID=<ret><CR>
+ok<CR>< LF ><CR>< LF >

http://www.iotworkshop.com - 50 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 Parameters:
 ret: on/off
 off: disable auto switch, default value
 on: enable auto switch.
Note: If enable auto swich functioin, when the device reboot, it will choose the most strong signal
stength to connect according to the three AP setting by AT+WSSSIDX command.

5.2.2.18. AT+WSLK
 Function: Query WiFi link status as STA
 Format:

P
Query Operation
AT+ WSLK<CR>
+ok=<ret><CR>< LF ><CR>< LF >

O
 Parameters:
 ret

SH
 "Disconnected", if no WiFi connection;
 "AP‟ SSID(AP‟s MAC" ), if WiFi connection available;
 "RF Off", if WiFi OFF;
This Instruction only effective for The device works as STA. After device boots up again, the setting
will be effective. But user can set this command when device configured as AP.
RK
5.2.2.19. AT+WEBU
 Function: Set/Query WEB page login parameters;
 Format:
O

 Query Operation
AT+WEBU<CR>
+ok=<usr,password><CR>< LF ><CR>< LF >
W

 Set Operation
AT+ WEBU=< usr,password ><CR>
+ok<CR>< LF ><CR>< LF >
T-

 Parameters:
 usr: User name for WEB page access;
 password:Password for WEB page access;
IO

5.2.2.20. AT+WAP
 Function: Set/Query WIFI parameters as AP;
 Format:
 Query Operation
AT+WAP<CR>
+ok=<wifi_mode,ssid,channel><CR>< LF ><CR>< LF >
 Set Operation
AT+ WAP=<wifi_mode,ssid,channel><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:

http://www.iotworkshop.com - 51 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 wifi_mode: WiFi protocols


 11BG
 11B
 11G
 11BGN
 11N
 ssid: SSID when device works as AP;
 channel: WIFI channel selection
 AUTO
 CH1~CH11

P
This Instruction only effective for The device works as AP. After device boots up again, the setting will
be effective. But user can set this command when device configured as STA.

O
5.2.2.21. AT+WAKEY
 Function: Set/Query WIFI security parameters as AP;

SH
 Format:
 Query Operation
AT+WAKEY<CR>
+ok=<auth,encry,key><CR>< LF ><CR>< LF >
 Set Operation
RK
AT+ WAKEY=< auth,encry,key><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 auth: Authentication mode
O

 OPEN
 SHARED
 WPAPSK
W

 encry:Encryption algorithm
 NONE: When “auth=OPEN", effective;
 WEP: When “auth=OPEN", effective or “SHARED", effective;
T-

 TKIP: When “auth=WPAPSK", effective;


 AES:When “auth=WPAPSK", effective;
 TKIPAES:When “auth=WPAPSK", effective;
 key: password, ASCII code, shall less than 64 bit and greater than 8bit;
IO

This Instruction only effective for The device works as AP. After device boots up again, the setting will
be effective. But user can set this command when device configured as STA.

5.2.2.22. AT+HIDESSID
 Function: Set/Query hide AP‟s SSID;
 Format:
 Query Operation
AT+ HIDESSID <CR>
+ok=<sta.><CR>< LF ><CR>< LF >
 Set Operation

http://www.iotworkshop.com - 52 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

AT+ HIDESSID=<sta><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 When Query,sta reply if device‟s SSID is hide;
 On – not hide SSID;
 Off - hide SSID;
 When Set,
 Off - hide SSID;
 On - not hide SSID;

5.2.2.23. AT+MSLP

P
 Function: Set devices into power save mode.(Turn OFF WiFi);
 Format:

O
 Query Operation
AT+ MSLP <CR>

SH
+ok=<sta.><CR>< LF ><CR>< LF >
 Set Operation
AT+ MSLP=<on/off><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
RK
 When Query,sta reply if the device in sleep mode;
 On - Device not in sleep mode (WiFi ON);
 Off - Device in sleep mode(WiFi OFF);
 When Set,
O

 Off - Set device to sleep mode (WiFi OFF);


 On - Set device to normal mode (WiFi ON);
When device go into sleep mode, user can input “AT+MSLP=on" to re-start the wifi. It is on by default
W

when bootup. Use AT+FMSLP command if need to save forever.

5.2.2.24. AT+WSCAN
T-

 Function: Seek AP when device works as STA mode;


 Format:
AT+ WSCAN<CR>
+ok=<ap_site><CR>< LF ><CR>< LF >
IO

 Parameters:
 ap_site: AP searched;

5.2.2.25. AT+ TCPLK


 Function: Query if TCP link already build-up;
 Format:
AT+ TCPLK<CR>
+ok=<sta><CR>< LF ><CR>< LF >
 Parameters:
 sta.: if device already setup TCP link;

http://www.iotworkshop.com - 53 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 on: TCP link setup;


 off: TCP link not setup;

5.2.2.26. AT + TCPDIS
 Function: Open/Cose TCP (Only TCP Client available);
 Format:
 Query Operation
AT+TCPDIS<CR>
+ok=<sta><CR>< LF ><CR>< LF >
 Set Operation

P
AT+ TCPDIS=<on/off><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:

O
 sta.: set/qurey TCP link status;
 on: TCP link availabe; When setting “on", device will connect to TCP server

SH
right away.
 off: TCP link not availabe; when setting “off", device will disconnect with TCP
server and not connect again.

5.2.2.27. AT+ WANN


RK
 Function: Set/Query WAN setting, only effective as STA mode;
 Format:
 Query Operation
AT+WANN<CR>
O

+ok=<mode,address,mask,gateway><CR>< LF ><CR>< LF >


 Set Operation
AT+ WANN=< mode,address,mask,gateway ><CR>
W

+ok<CR>< LF ><CR>< LF >


 Parameters:
 mode: IP setting for WAN port
T-

 static: Static IP
 DHCP: Dynamic IP
 address: WAN port IP address;
 mask: WAN port subnet mask;
IO

 gateway: WAN port gateway address;


This Instruction only effective for The device works as STA. After device boots up again, the setting
will be effective. But user can set this command when device configured as AP.

5.2.2.28. AT+ LANN


 Function: Set/Query LAN setting, only effective as AP mode;
 Format:
 Query Operation
AT+LANN<CR>
+ok=<address,mask ><CR>< LF ><CR>< LF >

http://www.iotworkshop.com - 54 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 Set Operation
AT+ LANN=<address,mask ><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 address: LAN port IP address;
 mask: LAN port subnet mask;
This Instruction only effective for The device works as AP. After device boots up again, the setting will
be effective. But user can set this command when device configured as STA.

5.2.2.29. AT + DHCPDEN

P
Function: Enable/Disable LAN DHCP server function;
 Format:
 Query Operation

O
AT+DHCPDEN<CR>
+ok=<sta><CR>< LF ><CR>< LF >

SH
 Set Operation
AT+ DHCPDEN=<sat><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 sta. if Enable/Disable LAN DHCP server function;
RK
 on: Enable LAN DHCP server function.
 off: Disable LAN DHCP server function.

5.2.2.30. AT+ DHCPGW


O

 Function: Set/Query DHCP gateway address;


 Format:
 Query Operation
W

AT+ DHCPGW<CR>
+ok=<address><CR>< LF ><CR>< LF >
 Set Operation
T-

AT+ DHCPGW=<address ><CR>


+ok<CR>< LF ><CR>< LF >
 Parameters:
 address: DHCP gate address;
IO

5.2.2.31. AT+ TCPTO


 Function: Set/Query TCP timeout;
 Format:
 Query Operation
AT+ TCPTO<CR>
+ok=<time><CR>< LF ><CR>< LF >
 Set Operation
AT+ TCPTO=<time ><CR>
+ok<CR>< LF ><CR>< LF >

http://www.iotworkshop.com - 55 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 Parameters:
 time: TCP timeout time.
 <= 600, (600s);
 >=0, (0 means no timeout);
 Default, 300s;

5.2.2.32. AT+ MAXSK


 Function: Set/Query maxima TCP connection;
 Format:
 Query Operation

P
AT+ MAXSK<CR>
+ok=<num><CR>< LF ><CR>< LF >
 Set Operation

O
AT+ MAXSK =<num ><CR>
+ok<CR>< LF ><CR>< LF >

SH
 Parameters:
 num: 1~32, default 32. maxima TCP connection;
When configure as TCP/Server, The device support maxime 32 TCP connections. If not require so
much connection, user can resetting this parameters.
RK
5.2.2.33. AT+TCPB
 Function: Open/Close TCPB function;
 Format:
 Query Operation
O

AT+TCPB<CR>
+ok=<sta><CR>< LF ><CR>< LF >
 Set Operation
W

AT+ TCPB=<on/off><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
T-

 sta: TCPB enable status


 on, TCPB enable
 off, TCPB disable
After device boots up again, the setting will be effective.
IO

5.2.2.34. AT+TCPPTB
 Function: Set/Query TCPB port number;
 Format:
 Query Operation
AT+TCPPTB<CR>
+ok=<port><CR>< LF ><CR>< LF >
 Set Operation
AT+ TCPB=<port><CR>
+ok<CR>< LF ><CR>< LF >

http://www.iotworkshop.com - 56 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 Parameters:
 port: decimal ,<65535
After device boots up again, the setting will be effective.

5.2.2.35. AT+TCPADDB
 Function: Set/Query TCPB server address;
 Format:
 Query Operation
AT+TCPADDB<CR>

P
+ok=<add><CR>< LF ><CR>< LF >
 Set Operation
AT+ TCPADDB=<add><CR>

O
+ok<CR>< LF ><CR>< LF >
 Parameters:

SH
 add: TCPB server address, can be IP address or url.
After device boots up again, the setting will be effective

5.2.2.36. AT+TCPTOB
 Function: Set/Query TCPB time out time;
RK
 Format:
 Query Operation
AT+TCPTOB<CR>
+ok=<time><CR>< LF ><CR>< LF >
O

 Set Operation
AT+ TCPTOB=<time><CR>
+ok<CR>< LF ><CR>< LF >
W

 Parameters:
 time: TCPB time out time, <=600 (600s), >=0 (No time out), default 300
After device boots up again, the setting will be effective.
T-

5.2.2.37. AT+TCPLKB
 Function: Query TCPB link status;
 Format:
IO

AT+TCPCKB<CR>
+ok=<sta><CR>< LF ><CR>< LF >
 Parameters:
 sta: TCPB link status
 on, TCPB link OK
 off, TCPB link not availabe

5.2.2.38. AT+NTCPBSSLEN
 Function: Set/Query TCPB SSL function(Only for firmware version with TLS support this
feature)
 Format:

http://www.iotworkshop.com - 57 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 Query Operation
AT+NTCPBSSLEN<CR>
+ok=<status><CR>< LF ><CR>< LF >
 Set Operation
AT+ NTCPBSSLEN=<status><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 status: on/off,Enable/Disable TCPB SSL function.

5.2.2.39. AT+REGEN

P
Function: Set/Query TCP Client register packet, setting is valid after reboot.
 Format:
 Query Operation

O
AT+REGEN<CR>
+ok=<mode><CR>< LF ><CR>< LF >

SH
 Set Operation
AT+REGEN=<mode><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 mode: Register packet type
RK
 id: id type
 mac: mac type
 off: disable this function, default value.
O

5.2.2.40. AT+REGTCP
 Function: Set/Query methods of TCP Client register packet, setting is valid after reboot.
 Format:
W

 Query Operation
AT+REGTCP<CR>
+ok=<type><CR>< LF ><CR>< LF >
T-

 Set Operation
AT+REGTCP=<type><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
IO

 type: Register packet method


 first: Register packet is sent when connection is created, default value.
 every: Register packet is send for every data packet.

5.2.2.41. AT+REGID
 Function: Set/Query TCP Client register packet id, setting is valid after reboot.
 Format:
 Query Operation
AT+REGID<CR>
+ok=<id><CR>< LF ><CR>< LF >

http://www.iotworkshop.com - 58 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 Set Operation
AT+REGID=<id><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 id: Register packet id, 0~65535, default is 1111.
Note: When device connect to server, it will send two bytes id number(0~65535, high byte first) and
two bytes id complement number, for example id is 1111. Then the data sent to server is "0x04 0x57
0xFB 0xA8". If choose MAC address type, for example ACCF23300130, it will be "0xAC 0xCF 0x23
0x30 0x01 0x30"

5.2.2.42. AT+EPHY

P
 Function: Enable ETH interface;
 Format:

O
 Set Operation
AT+ EPHY=<CR>

SH
+ok<CR>< LF ><CR>< LF >
Ethenet port function is disabled bydefault. Input this command to enable Ethenet. This
command is not saved, this means after the device reset, Ethenet is disabled by default. Input
“AT+FEPHY=on" to enable Ethenet forever..
RK
5.2.2.43. AT+STTC
 Function: Enable/Disable STA port scan function;
 Format:
 Query Operation
O

AT+ STTC<CR>
+ok=<sta><CR>< LF ><CR>< LF >
 Set Operation
W

AT+ STTC=<on/off><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
T-

 sta: when query, this value feedback


 On: Enable STA port scan function;
 Off: Disable STA port scan function;
IO

5.2.2.44. AT+DOMAIN
 Function: Set/Query domain ofdevice webpage;
 Format:
 Query Operation
AT+ DOMAIN<CR>
+ok=<domain><CR>< LF ><CR>< LF >
 Set Operation
AT+ DOMAIN=<domain><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:

http://www.iotworkshop.com - 59 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 domain: domain to acess to device webpage.

5.2.2.45. AT+FRLDEN
 Function: Enable/Disable nReload pin function;
 Format:
 Query Operation
AT+ FRLDEN<CR>
+ok=< on/off ><CR>< LF ><CR>< LF >
 Set Operation
AT+ FRLDEN=<on/off><CR>

P
+ok<CR>< LF ><CR>< LF >
 Parameters:
 on/off: Enable or Disable nReload pin function.

O
 On, enable nReload pin function;
 Off, disable nReload pin function;

SH
Notes: AT+FRLDEN is F-Setting, means restore to factory setting will not affect this command.

5.2.2.46. AT+RELD
 Function: Restore to factory default setting;
 Format:
RK
AT+ RELD<CR>
+ok=rebooting…<CR>< LF ><CR>< LF >
This command restores the device to factory default setting, and then re-starts the device.
O

5.2.2.47. AT+Z
 Function: Re-start device;
 Format:
W

AT+ Z<CR>

5.2.2.48. AT+MID

T-

Function: Query device ID information;


 Format:
 Query Operation
AT+MID<CR>
IO

+ok=<device_id><CR><LF><CR><LF>
 Parameters:
 device_id: Device ID information;

5.2.2.49. AT+WRMID
 Function: Set device ID information;
 Format:
 Set Operation
AT+WRMID=<device_id><CR>
+ok<CR><LF><CR><LF>
 Parameters:

http://www.iotworkshop.com - 60 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 device_id: Device ID information;

5.2.2.50. AT+VER
 Function: Query device software version information;
 Format:
 Query Operation
AT+VER<CR>
+ok=<ver><CR><LF><CR><LF>
 Parameters:
 ver: Device software version information;

P
5.2.2.51. AT+H
 Function: Help;

O
 Format:
 Query Operation

SH
AT+H<CR>
+ok=<commod help><CR><LF><CR><LF>
 Parameters:
 commod help: command introduction;
RK
5.2.2.52. AT+FVEW
 Function: Enable/Disable Ethernet WANN mode. It's valid only if restore to factory
setting.;
 Format:
O

 Query Operation
AT+ FVEW<CR>
+ok=<status><CR><LF><CR><LF>
W

 Set Operation
AT+ FVEW=<status><CR>
+ok<CR><LF><CR><LF>

T-

Parameters:
 status: Enable or Disable Ethernet WANN mode..
 enable, enable Ethernet WANN mode;
 disable, disable Ethernet WANN mode, then it works in Ethernet LANN
IO

mode.(default mode)
If Ethernet WANN mode is valid. Then wireless connecting router in STA mode is invalid. It
only support connecting to router by Ethernet..

5.2.2.53. AT+FVER
 Function: Set/Query device working mode;
 Format:
 Query Operation
AT+ FVER<CR>
+ok=<status><CR><LF><CR><LF>
 Set Operation

http://www.iotworkshop.com - 61 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

AT+ FVER=<n/z><CR>
+ok<CR><LF><CR><LF>
 Parameters:
 status: device working mode..
 n: router mode.(default mode)
 z: bridge mode.

5.2.2.54. AT+WMAC
 Function: Set/Query device MAC address;
 Format:

P
Query Operation
AT+ WMAC<CR>
+ok=<address><CR><LF><CR><LF>

O
 Set Operation
AT+ WMAC=<address><CR>

SH
+ok<CR><LF><CR><LF>
 Parameters:
 address: device MAC address in AP mode.
The device‟s STA MAC address is AP‟s MAC address plus 1. For example, AP address:
ACCF23208888, then STA address: ACCF23208889.
RK
5.2.2.55. AT+PING
 Function: PING command;
 Format:
O

 Set Operation
AT+ PING=<address><CR>
+ok=<status><CR><LF><CR><LF>
W

 Parameters:
 address: target IP address.
 Status:command result.
T-

5.2.2.56. AT+HTPSV/AT+HTTPURL
 Function: Query/Set device http address and port, it is valid only in httpdclient mode,
setting is valid after reboot
IO

 Format:
 Query Operation
AT+HTPSV/AT+HTTPURL<CR>
+ok=<IP,Port><CR>< LF ><CR>< LF >
 Set Operation
AT+HTPSV/AT+HTTPURL=<IP,Port><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 IP: HTTP server address or domain name, default is 10.10.100.200
 Port: HTTP server port, default is 80.

http://www.iotworkshop.com - 62 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

5.2.2.57. AT+HTPTP/AT+HTTPTP
 Function: Query/Set device http request type, it is valid only in httpdclient mode, setting
is valid after reboot
 Format:
 Query Operation
AT+HTPTP/AT+HTTPTP<CR>
+ok=<Type><CR>< LF ><CR>< LF >
 Set Operation
AT+HTPTP/AT+HTTPTP=<Type><CR>
+ok<CR>< LF ><CR>< LF >

P
 Parameters:
 Type: GET/PUT/POST, default GET.

O
5.2.2.58. AT+HTPURL/AT+HTTPPH
 Function: Query/Set device http header directory, it is valid only in httpdclient mode,

SH
setting is valid after reboot
 Format:
 Query Operation
AT+HTPURL/AT+HTTPPH<CR>
+ok=<Path><CR>< LF ><CR>< LF >
RK
 Set Operation
AT+HTPURL/AT+HTTPPH=<Path><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
O

 Path: 1~50 length, devault "/abcd".

5.2.2.59. AT+HTTPCN
W

 Function: Query/Set device old http format header connection type, it is valid only in
httpdclient mode, setting is valid after reboot.(Reserved)
 Format:
T-

 Query Operation
AT+HTTPCN<CR>
+ok=<Connection><CR>< LF ><CR>< LF >
 Set Operation
IO

AT+HTTPCN=<Connection><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 Connection: 1~20 length, devault "keep-alive".

5.2.2.60. AT+HTTPUA
 Function: Query/Set device old http format header User-Agent, it is valid only in
httpdclient mode, setting is valid after reboot.(Reserved)
 Format:
 Query Operation

http://www.iotworkshop.com - 63 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

AT+HTTPUA<CR>
+ok=<Parameter><CR>< LF ><CR>< LF >
 Set Operation
AT+HTTPUA=<Parameter><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 Parameter: 1~20 length, devault "lwip1.3.2".

5.2.2.61. AT+HTPMODE
 Function: Query/Set device http format, it is valid only in httpdclient mode, setting is

P
valid after reboot.(Reserved)
 Format:
 Query Operation

O
AT+HTPMODE<CR>
+ok=<type><CR>< LF ><CR>< LF >

SH
 Set Operation
AT+HTPMODE=<type><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 type: HTTP format,
RK
 new: new HTTP format mode.(default mode)
 old: old HTTP format mode.(Reserved)

5.2.2.62. AT+HTPHEAD
O

 Function: Query/Set device new http format header, it is valid only in httpdclient mode,
setting is valid after reboot.(Reserved)
 Format:
W

 Query Operation
AT+HTPHEAD<CR>
+ok=<head><CR>< LF ><CR>< LF >
T-

 Set Operation
AT+HTPHEAD=<head><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
IO

 head: new HTTP format packet content, if there exist <CR><LF> characters in the
content, replace it with "<<CRLF>>", when set the content in webpage, does not
need to consider this,1~200 bytes length, default is "Content-
type:text/html;charset=utf-8"

5.2.2.63. AT+FASWD
 Function: Query/Set device find password
 Format:
 Query Operation
AT+FASWD<CR>

http://www.iotworkshop.com - 64 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

+ok=<password><CR>< LF ><CR>< LF >


 Set Operation
AT+FASWD=<password><CR>
+ok<CR>< LF ><CR>< LF >
 Parameters:
 password: scan password, 1~100 length, the default is "HF-A11ASSISTHREAD" if
blank value.

P
O
SH
RK
O
W
T-
IO

http://www.iotworkshop.com - 65 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

APPENDIX A: QUESTIONS AND ANSWERS

Q1: How to configure transparent serial port application (TCP protocol) with
two DTU devices?
 Network structure as below figure:
 DTU 1# Setting:
 Works as AP mode; --See “Mode Selection Page”

P
 LAN IP address: 10.10.100.254; --See “AP Interface Setting Page”
 Network Protocal:TCP/Server, Port ID: 8899; -- See “Application Setting Page”

O
(DTU default setting);
 DTU 2# Setting:
 Works as STA mode; --See “Mode Selection Page”

SH
 WAN connection type: DHCP or Static IP (For this example:10.10.100.100)
--See “STA Interface Setting Page”
 Network Protocal:TCP/Client, Port ID: 8899; Application IP address: Module 1#‟s LAN
IP address (10.10.100.254); -- See “Application Setting Page”
 Notes: When DTU 2# works as STA mode, DTU's WiFi interface works as WAN port.
RK
DTU‟s WAN IP address and LAN IP address shall be setting different segment. So,
DTU 2#‟s LAN IP address must change to other segment; (For this sample, we change
to 10.10.99.254); --See “AP Interface Setting Page”
O

1# 2#
UART WIFI
MCU UART MCU
DTU DTU
W

AP, STA,
LAN IP:10.10.100.254 LAN IP:10.10.99.254
TCP, Server WAN IP: 10.10.100.100
8899 TCP, Client
10.10.100.254: 8899
T-

Figure 39. Configure Transparent Serial Port Connection (TCP)


IO

Q2: Where to SetDTU LAN IP and WAN IP through Web Page?


 DTU Wireless LAN IP address setting see “AP Interface Setting Page” as below Figure,

Figure 40. DTU LAN IP Setting

http://www.iotworkshop.com - 66 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

 Wireless WAN IP address setting see “STA Interface Setting Page” as below Figure, User can set
WAN connection type to DHCP and STATIC IP.

P
Figure 41. DTU WAN IP Setting

O
Q3: How to configure transparent serial port application (UDP protocol) with
two DTUs?

SH
 Network structure as below figure:
 DTU 1# Setting:
 Works as AP mode; --See “Mode Selection Page”
 LAN IP address: 10.10.100.254; --See “AP Interface Setting Page”
 Network Protocal:UDP, Port ID: 8899; Application IP address:10.10.100.100;
RK
-- See “Application Setting Page”
 DTU 2# Setting:
 Works as STA mode; --See “Mode Selection Page”
 WAN connection type: Static IP (10.10.100.100)
O

--See “STA Interface Setting Page”


 Network Protocal:UDP, Port ID: 8899; Application IP address: DTU 1#‟s LAN IP
address (10.10.100.254); -- See “Application Setting Page”
W

 LAN IP address: 10.10.99.254 (Different net segment with WAN port)


--See “AP Interface Setting Page”
T-

1# 2#
WIFI
MCU UART UARTMCU
DTU DTU

AP, STA,
IO

LAN IP:10.10.100.254 LAN IP:10.10.99.254


UDP WAN IP: 10.10.100.100
10.10.100.100:8899 UDP
10.10.100.254:8899

Figure 42. Configure Transparent Serial Port Connection (UDP)

Q4: Where to set DTU network protocol (TCP/UDP)?


 network protocol setting see “Application Setting Page” as below Figure,
 Protocol: TCP Server
 Only Port ID required: 8899 (Default)

http://www.iotworkshop.com - 67 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

P
O
SH
Figure 43. DTU Network Protocols: TCP/Server

 Protocol: TCP Client


 Application IP address required: it‟s target TCP server „s IP address;
 Port ID required: 8899 (Default)
RK
O
W
T-
IO

Figure 44. DTU Network Protocol: TCP/Client

 Protocol: UDP
 No Server/Client selection required;
 Application IP address required: it‟s target device „s IP address;
 Port ID required: 8899 (Default)

http://www.iotworkshop.com - 68 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

P
O
Figure 45. DTU Network Protocol: UDP

SH
Q5: How to configure transparent serial port application: Two DTUs all
configured as STA and connection through AP?
 Network structure as below figure:
 DTU 1# Setting:
RK
 Works as AP mode and all default setting;
 DTU 2# Setting:
 Works as STA mode; --See “Mode Selection Page”
 WAN connection type: Static IP: 10.10.100.100; --See “STA Interface Setting Page”
O

 Network Protocal:TCP/Server, Port ID: 8899; -- See “Application Setting Page”


 LAN IP address: 10.10.99.254 (Different net segment with WAN port);
--See “AP Interface Setting Page”
W

 DTU 3# Setting:
 Works as STA mode; --See “Mode Selection Page”
 WAN connection type: Static IP: 10.10.100.101; --See “STA Interface Setting Page”
T-

 Network Protocal:TCP/Client, Port ID: 8899; Application IP address: DTU 2#‟s WAN IP
address (10.10.100.100); -- See “Application Setting Page”
 LAN IP address: 10.10.98.254 (Different net segment with WAN port);
--See “AP Interface Setting Page”
IO

http://www.iotworkshop.com - 69 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

1#
AP,
DTU LAN IP:10.10.100.254
TCP, Server
8899

WIFI WIFI

2# 3#

MCU UART UART MCU


DTU DTU

STA, STA,
LAN IP:10.10.99.254 LAN IP:10.10.98.254
WAN IP: 10.10.100.100 WAN IP: 10.10.100.101
TCP, Server TCP, Client
8899 10.10.100.100: 8899

P
Figure 46. Two DTUs Connection Through AP

O
Q6: How to avoid IP address confliction when apply DTU?

SH
 The following address allocation method can avoid the IP address confliction for dynamic and
static IP address mixed application.
 DTU dynamic IP address range from 100 to 200 for last IP address segment.
 Such as default IP: 10.10.100.254. When DTU works as AP, the IP address DTU can
allocate to STA is from 10.10.100.100 to 10.10.100.200;
RK
 So, if user needs to set static IP for dedicated STA internal network, the available IP address
range can start from 10.10.100.1 to 10.10.100.99.
O

Q7: PC works as server, all DTUs works as data acquisition card and connect
with PC, how to configure this application?
 Network structure as below figure: Three DTU setup 3 TCP links with PC server. DTU 1# works
W

as AP and all devices connect to DTU 1# through WiFi interface;


 PC Setting:
 IP address: 10.10.100.100;
 Network Protocal:TCP/Server, Port ID: 8899;
T-

 DTU 1# Setting:
 Works as AP mode;
 LAN IP address: 10.10.100.254;
IO

 Network Protocal:TCP/Client, Port ID: 8899; Application IP address:10.10.100.100;


 DTU 2# Setting:
 Works as STA mode;
 WAN connection type: Static IP: 10.10.100.101;
 Network Protocal:TCP/Client, Port ID: 8899; Application IP address:10.10.100.100;
 LAN IP address: 10.10.99.254 (Different net segment with WAN port);
 DTU 3# Setting:
 Works as STA mode;
 WAN connection type: Static IP: 10.10.100.102;
 Network Protocal:TCP/Client, Port ID: 8899; Application IP address:10.10.100.100;
 LAN IP address: 10.10.98.254 (Different net segment with WAN port);

http://www.iotworkshop.com - 70 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

AP,
LAN IP:10.10.100.254
PC WIFI TCP, Client
1# 10.10.100.100:8899
IP: 10.10.100.100 UART MCU
TCP, Server DTU
8899

WIFI WIFI

2# 3#

MCU UART UART MCU


DTU DTU

STA, STA,
LAN IP:10.10.99.254 LAN IP:10.10.98.254
WAN IP: 10.10.100.101 WAN IP: 10.10.100.102

P
TCP, Client TCP, Client
10.10.100.100:8899 10.10.100.100: 8899

O
Figure 47. Wireless Data Acquisition Card Setting

SH
Q8: DTU works in STA mode, how does the PC get the DTU IP address.

The DTU device supports UDP search function, they will return to the its IP,MAC,MID after get the
query password.
RK
1、PC send UDP broadcast password data(E.g xxx.xxx.xxx.255, port 48899), the default password is
"HF-A11ASSISTHREAD" and can be modified by AT+FASWD.

2、If the password is correct, the DTU will feedback with its IP/MAC/MID as the following pic show.
O
W
T-
IO

Figure 48. UDP Search Function

http://www.iotworkshop.com - 71 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

APPENDIX B:RECOMMEND TOOLST


Debug Tools download link : http://pan.baidu.com/s/1i413aUL, include the following tools.

B.1.UART Tools

SecureCRT

P
Accessport

O
B.2.TCPUDP Tools

SH
TCPUDPDbg:

B.3.APP Tools

Wi-Fi Config Tools:


RK
O
W
T-
IO

http://www.iotworkshop.com - 72 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

APPENDIX C: TELNET FUNCTION

C.1 Telnet Function:


a)Remote manage DTU device

b)Remote manage user device

P
O
C.2 Telnet Character:
DTU firmware required at least:4.02.11.DTU-1.8-TLS

SH
b)Telnet support one TCP client.

c)Telnet port 23

d)Telnet will be close, if no data is sent in 3 minutes.


RK
C.3 Telnet Usage:
a)Config the Secure CRT parameters. The device should be already connect to AP.

Use the device DHCP IP address assigned by router to connect to. If need remote
O

access to device, need has a public static IP and do the port mapping to the local
W

network
T-
IO

http://www.iotworkshop.com - 73 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

b)use the webpage login account to login in. The screen will show “DTU>” when

login is OK.

P
O
Telnet support 2 level directory

SH
The root DTU directory, input help to check the root directory command supported.
RK
cmd: enter AT+ command mode.

uart-str:send UART data in String format.

uart-hex: send UART data in HEX format


O

help: show command supported

exit: exit Telnet


W

c)input help.
T-
IO

d)input cmd to enter AT command mode, then can input AT command.

http://www.iotworkshop.com - 74 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

P
O
SH
d)Input quit to get back to the upper level directory, and input uart-str or uart-hex to enter

data transfer mode. Then the UART and the telenet can transfer data to each other.
RK
O
W
T-
IO

http://www.iotworkshop.com - 75 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

Telnet Details:

DTU/CMD>directory:

The client send AT+<CMD>\r\n, the device will feedback with AT command response.

See the detailed AT command in above chapter.

DTU/UART-STR>directory:

The client send [data\r\n], the device will delete the last [\r\n] and send the [data] to

UART

P
The data must end with \r\n. If there is 0x0d and 0x0a in the data itself. Then please

O
usethe UART-HEX mode to transfer data.

DTU/UART-HEX>directory:

SH
The client send [data\r\n],the device will delete the last[\r\n] and send the HEX format

data to UART.

Client send: 010a03\r\n or 01 0a 03\r\n


RK
Module send to UART:0x01,0x0a,0x03

Module UART receive :0x01,0x02,0x03

Client will get:010203\r\n


O

Telnet Scheme for develop PC software:

Step 1 Create TCP connection to device.


W

Step 2 The device will send “login”, the PC should send back with user name(must end

with <CR><LF>, input this character with Ctrl+Enter in the example tools)
T-
IO

http://www.iotworkshop.com - 76 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

P
O
SH
Step 3 Device send 0xFF 0xFB 0x01 to disable telnet input display.
RK
Step 4 Device send “password”,the PC feed back with password.
O
W
T-
IO

Step 5 Device send 0xFF 0xFC 0x01 to enable telnet input display.

Step 6 PC send “cmd” to make the device work in AT command mode.

http://www.iotworkshop.com - 77 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

P
O
SH
RK
O
W
T-
IO

http://www.iotworkshop.com - 78 -
DTU-H10X Wi-Fi/Ethernet to RS485/RS232 Server User Manual

APPENDIX C: CONTACT INFORMATION


------------------------------------------------------------------------------------------------------------
Web Site: http://www.iotworkshop.com/
Business Contact: business@iotworkshop.com
Technical Contact: support@iotworkshop.com
After Sale Contact: service@iotworkshop.com
-----------------------------------------------------------------------------------------------------------

P
O
END OF DOCUMENT
SH
RK
O
W
T-
IO

http://www.iotworkshop.com - 79 -

You might also like