High Flying Electronics Technology HF DTU H100 User Manual

DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
1
DTU-H100
Wi-Fi/Ethernet to RS232/RS485 Server
User Manual
Overview of Characteristic
Embedded UART to Wi-Fi device, hardware flow
control (RTS/CTS) RS232 interface
Support IEEE802.11b/g/n Wireless standards Support TCP/UDP/HTTP Network Protocols Support SSL Encryption Support Telnet Communication Support RS232/RS485/Ethernet Data Interface RS232 RS485 automatic switching Support Work As STA/AP/AP+STA Mode Support Router/Bridge Mode Networking Support AT+ Instruction Set for Configuration 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
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
2
TABLE OF CONTENTS
1. PRODUCT OVERVIEW ...........................................................................................................10
1.1. General Specification .........................................................................................................10
1.2. Hardware Introduction .......................................................................................................11
1.2.1. Interface Description ......................................................................................................11
1.2.2. RS232 Interface ............................................................................................................12
1.2.3. RS485 Interface ............................................................................................................12
1.2.4. RJ45 Interface ...............................................................................................................12
1.2.5. Button Interface .............................................................................................................13
1.2.6. Mechanical Size ............................................................................................................14
1.2.7. Order Information ..........................................................................................................14
1.2.8. Device Difference ..........................................................................................................15
1.2.9. Package Information ......................................................................................................15
2. APPLICATION .........................................................................................................................16
2.1. Wireless Networking ..........................................................................................................16
2.1.1. AP Application ...............................................................................................................16
2.1.2. STA Application .............................................................................................................17
2.1.3. AP+STA Applicatioin .....................................................................................................17
2.1.4. One AP One STA Applicatioin .......................................................................................19
2.2. Ethernet Interface Communication ...................................................................................19
2.2.1. Ethernet Interface Networking (As AP, N-Ver) ...............................................................20
2.2.2. Ethernet Interface Networking (As STA, N-Ver) ................................ .............................20
2.2.3. Ethernet Interface Networking (As STA, Z-Ver) .............................................................21
3. FUNCTION DESCRIPTION ....................................................................................................22
3.1. User Configuration Process ..............................................................................................22
3.2. Working Mode .....................................................................................................................22
3.2.1. Transparent Transmission Mode ...................................................................................22
3.2.2. Agreement(Serial Command Mode) ..............................................................................23
3.2.3. HTTPD Client Mode ......................................................................................................24
3.3. Wi-Fi Parameter Setting .....................................................................................................25
3.3.1. Auto- Frequency Function .............................................................................................25
3.3.2. Security .........................................................................................................................25
3.3.3. Search Function for STA ...............................................................................................25
3.3.4. Address Binding ............................................................................................................25
3.4. UART Frame Scheme .........................................................................................................25
3.4.1. UART Free-Frame .........................................................................................................25
3.4.2. UART Auto-Frame .........................................................................................................26
3.5. Network Setting ..................................................................................................................26
3.5.1. Socket A ........................................................................................................................26
3.5.2. Socket B ........................................................................................................................27
3.6. TCP Password Authentication ...........................................................................................27
3.7. Upload ID ............................................................................................................................28
3.8. Keepalive(Reserved) ..........................................................................................................28
3.9. Multiple STA Parameters ...................................................................................................28
3.10. Websocket(Reserved) .....................................................................................................28
3.11. Parameters Setting .........................................................................................................28
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
3
3.12. Palmodic Signal ..............................................................................................................28
3.13. Firmware Upgrade ..........................................................................................................29
4. OPERATION GUIDELINE .......................................................................................................30
4.1. Configuration via Web Accessing .....................................................................................30
4.1.1. Open Web Management Interface .................................................................................30
4.1.2. Quick Configure .............................................................................................................30
4.1.3. Mode Selection Page ....................................................................................................31
4.1.4. AP Interface Setting Page .............................................................................................32
4.1.5. STA Interface Setting Page ...........................................................................................32
4.1.6. Application Setting Page................................................................................................33
4.1.7. Ethernet Setting .............................................................................................................34
4.1.8. HTTPD Client Mode ......................................................................................................34
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
4.2.3. Device Debug ................................................................................................................36
4.3. Typical Application Examples ...........................................................................................38
4.3.1. Wireless Control Application ..........................................................................................38
4.3.2. Remote Management Application ..................................................................................39
4.3.3. Transparent Serial Port Application ...............................................................................39
4.3.4. Wireless Data Acquisition Card Application ...................................................................40
5. AT+INSTRUCTION INTRODUCTION ....................................................................................42
5.1. Configuration Mode ............................................................................................................42
5.1.1. Switch to Configuration Mode ........................................................................................42
5.2. AT+ Instruction Set Overview ................................................................ ............................43
5.2.1. Instruction Syntax Format ..............................................................................................43
5.2.2. AT+ Instruction Set ........................................................................................................44
5.2.2.1. AT+E .........................................................................................................................45
5.2.2.2. AT+ENTM ..................................................................................................................46
5.2.2.3. AT+NETP ..................................................................................................................46
5.2.2.4. AT+UART ..................................................................................................................46
5.2.2.5. AT+ UARTF ...............................................................................................................47
5.2.2.6. AT+ UARTFT ............................................................................................................. 47
5.2.2.7. AT+ UARTFL .............................................................................................................47
5.2.2.8. AT+TMODE ...............................................................................................................48
5.2.2.9. AT+WMODE ..............................................................................................................48
5.2.2.10. AT+WSKEY/AT+WSKEYA .....................................................................................48
5.2.2.11. AT+WSKEYB .........................................................................................................49
5.2.2.12. AT+WSKEYC .........................................................................................................49
5.2.2.13. AT+WSSSID/AT+WSSSIDA ...................................................................................50
5.2.2.14. AT+WSSSIDB ........................................................................................................50
5.2.2.15. AT+WSSSIDC ........................................................................................................51
5.2.2.16. AT+MSSID .............................................................................................................51
5.2.2.17. AT+WSLK ..............................................................................................................51
5.2.2.18. AT+WEBU ..............................................................................................................52
5.2.2.19. AT+WAP ................................................................................................................52
5.2.2.20. AT+WAKEY ............................................................................................................53
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
4
5.2.2.21. AT+HIDESSID ........................................................................................................53
5.2.2.22. AT+MSLP ...............................................................................................................53
5.2.2.23. AT+WSCAN ...........................................................................................................54
5.2.2.24. AT+ TCPLK ............................................................................................................54
5.2.2.25. AT + TCPDIS .........................................................................................................54
5.2.2.26. AT+ WANN .............................................................................................................55
5.2.2.27. AT+ LANN ..............................................................................................................55
5.2.2.28. AT + DHCPDEN .....................................................................................................55
5.2.2.29. AT+ DHCPGW .......................................................................................................56
5.2.2.30. AT+ TCPTO ...........................................................................................................56
5.2.2.31. AT+ MAXSK ...........................................................................................................56
5.2.2.32. AT+TCPB ...............................................................................................................57
5.2.2.33. AT+TCPPTB ..........................................................................................................57
5.2.2.34. AT+TCPADDB........................................................................................................57
5.2.2.35. AT+TCPTOB ................................ ..........................................................................58
5.2.2.36. AT+TCPLKB ...........................................................................................................58
5.2.2.37. AT+REGEN ................................ ............................................................................58
5.2.2.38. AT+REGTCP ..........................................................................................................59
5.2.2.39. AT+REGID .............................................................................................................59
5.2.2.40. AT+EPHY ...............................................................................................................59
5.2.2.41. AT+STTC ...............................................................................................................60
5.2.2.42. AT+DOMAIN ..........................................................................................................60
5.2.2.43. AT+FRLDEN ..........................................................................................................60
5.2.2.44. AT+RELD ...............................................................................................................61
5.2.2.45. AT+Z ......................................................................................................................61
5.2.2.46. AT+MID ..................................................................................................................61
5.2.2.47. AT+WRMID ............................................................................................................61
5.2.2.48. AT+VER ................................................................ .................................................61
5.2.2.49. AT+H ......................................................................................................................61
5.2.2.50. AT+FVEW ..............................................................................................................62
5.2.2.51. AT+FVER ...............................................................................................................62
5.2.2.52. AT+WMAC .............................................................................................................62
5.2.2.53. AT+PING ................................................................................................................63
5.2.2.54. AT+HTPSV/AT+HTTPURL .....................................................................................63
5.2.2.55. AT+HTPTP/AT+HTTPTP ........................................................................................63
5.2.2.56. AT+HTPURL/AT+HTTPPH .....................................................................................64
5.2.2.57. AT+HTTPCN ................................ .......................................................................... 64
5.2.2.58. AT+HTTPUA ..........................................................................................................64
5.2.2.59. AT+HTPMODE .......................................................................................................64
5.2.2.60. AT+HTPHEAD........................................................................................................65
5.2.2.61. AT+FASWD ............................................................................................................65
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
Q5: How to configure transparent serial port application: Two DTUs all configured as
STA and connection through AP? ...............................................................................................69
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
5
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 TOOLS ...........................................................................................72
B.1UART Tools ..........................................................................................................................72
B.2TCPUDP Tools .....................................................................................................................72
B.3APP Tools ............................................................................................................................72
APPENDIX C: CONTACT INFORMATION ...................................................................................73
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
6
LIST OF FIGURES
Figure 1. DTU-H100 Appearance .....................................................................................................11
Figure 2. RS232 Pin Defination(Male/Needle Type) ........................................................................12
Figure 3. RJ45 Pin Defination .........................................................................................................13
Figure 4. DTU-H100 Mechanical Dimension ....................................................................................14
Figure 5. DTU-HXXX Series Order Information ................................................................................14
Figure 6. DTU-H1XX Functional Architecture ...................................................................................16
Figure 7. DTU AP Application ..........................................................................................................16
Figure 8. DTU STA Application ........................................................................................................17
Figure 9. DTU AP+STA Application .................................................................................................18
Figure 10. One AP and One STA Application .................................................................................19
Figure 11. Ethernet Interface Networking (As AP) ..........................................................................20
Figure 12. Ethernet Interface Networking (As STA, N-Ver) .............................................................20
Figure 13. Ethernet Interface Networking (As STA, Z-Ver) .............................................................21
Figure 14. Search Page..................................................................................................................25
Figure 15. Multi-TCP Link Data Transmition Structure ................................................................ ....27
Figure 16. Dual Socket Working Data Flow ....................................................................................27
Figure 17. Open Web Management page .......................................................................................30
Figure 18. Quick Configure Page ...................................................................................................31
Figure 19. Mode Selection Page ....................................................................................................31
Figure 20. AP Interface Setting Page .............................................................................................32
Figure 21. STA Interface Setting Page ...........................................................................................33
Figure 22. Application Setting Page................................................................................................33
Figure 23. Ethernet Setting Page ...................................................................................................34
Figure 24. HTTPD Client Mode Page .............................................................................................34
Figure 25. Device Management Page ............................................................................................35
Figure 26. STA Interface Debug Connection ..................................................................................36
Figure 27. AP Interface Debug Connection ....................................................................................36
Figure 28. “CommTools" Serial Debug Tools ..................................................................................36
Figure 29. “TCPUDPDbg" Tools Create Connection .......................................................................37
Figure 30. “TCPUDPDbg" Tools Setting .........................................................................................37
Figure 31. “TCPUDPDbg" Tools Connection ..................................................................................38
Figure 32. Wireless Control Application ..........................................................................................38
Figure 33. Remote Management Application .................................................................................. 39
Figure 34. Transparent Serial Port Application ...............................................................................40
Figure 35. Wireless Data Acquisition Card Application ...................................................................41
Figure 36. The device Default UART Port Parameters ...................................................................42
Figure 37. Switch to Configuration Mode ................................ ........................................................ 42
Figure 38. "AT+H" Instruction for Help ............................................................................................43
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
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
7
Figure 48. UDP Search Function ....................................................................................................71
LIST OF TABLES
Table 1 DTU-H100 Technical Specifications ...................................................................................10
Table 2 DTU-H100 External Interface .............................................................................................11
Table 3 RS232 Interface ..................................................................................................................12
Table 4 RJ45 Interface ....................................................................................................................13
Table 7 Serial Command Mode .......................................................................................................23
Table 5 The device Web Access Default Setting .............................................................................30
Table 6 Error Code DescribtionThe device Web Access Default Setting .........................................44
Table 7 AT+ Instruction Set List ................................................................................................ ......44
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
8
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 featureAT+VER::4.02.11.DTU-1.8-TLS)Add DTU-H101 DTU-H102 Type.
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
9
FCC STATEMENT :
This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions:
(1) This device may not cause harmful interference, and (2) This device must accept any interference received, including interference that may cause
undesired operation. Warning: Changes or modifications not expressly approved by the party responsible for
compliance could void the user's authority to operate the equipment.
NOTE: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:
 Reorient or relocate the receiving antenna.  Increase the separation between the equipment and receiver.
 Connect the equipment into an outlet on a circuit different from that to which the receiver is
connected.  Consult the dealer or an experienced radio/TV technician for help.
FCC Radiation Exposure Statement:
This equipment complies with FCC radiation exposure limits set forth for an uncontrolled environment. This equipment should be installed and operated with minimum distance 20cm between the radiator & your body.
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
10
Class
Item
Parameters
Ethernet Port
Port Number
1
Interface
8-Pin RJ45
PHY Rate
10/100Mbps, MDI/MDIX
Network Protocol
IP/TCP/UDP/DHCP/DNS/HTTP/ARP/ ICMP/Web socket/Http Client
Wi-Fi Port
Standard
802.11 b/g/n
Network Mode
STA/AP/STA+AP
Max Connection
32
Transmit Power
802.11b: +20 dBm (Max.)
802.11g: +18 dBm (Max.)
802.11n: +15 dBm (Max.)
Receiver Sensitivity
802.11b: -89 dBm (@11Mbps, CCK)
802.11g: -81dBm(@54Mbps, OFDM)
802.11n: -71dBm(@HT20, MCS7)
Antenna Option
External: 3dBi Antenna
Port Number
2(1 x RS232, 1x RS485)
UART Port
Interface Standard
RS232: DB9 Pin Type RS485: 2 wire(A+, B-)
Data Bits
5,6,7,8
Stop Bit
1,2
Check Bit
None, Even, Odd, Space, Mark
Baud Rate
300 bps ~ 460800bps
Flow Control
RTS / CTS
Hardware Parameters
Input Voltage
5~18V DC Input
Operating Current
Avg:170mA Peak:400mA
Operating Temp.
-40~85
Storage Temp.
-45- 125 / 5 ~ 95% RH
Dimensions
84 x 84 x25mm
Certificate
CE/FCC/TELEC/RoHS
Warranty
2 Years
Software Parameters
Network Type
STA/AP/STA+AP
Security Type
WEP/WPAPSK/WPA2PSK
Encryption
WEP64/WEP128/TKIP/ AES
Network Protocol
TCP/UDP/ARP/ICMP/DHCP/DNS/HTTP
Max. TCP Connection
32
Configure Interface
Web Server / AT Command
Customization
Support Software Customization
1. PRODUCT OVERVIEW
1.1. General Specification
Table 1 DTU-H100 Technical Specifications
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
11
Function
Name
Description
External
Interface
RJ45 Ethernet
10/100M Ethernet
RS232
RS232 Communication
RS485
RS485 Communicaton
DC5-18V
DC Power 5~18V Input
LED
Indicator
Power
3.3V Internal Power Supply Indicator
Ready
Boot Indicator
On: Device boot OK.
Off: Waiting For Device boot.
(The device need about 7 seconds to boot)
Link
Wi-FIi Connection Indication On:STA mode Connect to AP or AP mode
other device connect to it.
OffNo Wi-Fi Conectoin
RXD
RS232/RS485 Data Receive
TXD
RS232/RS485 Data Transfer
1.2. Hardware Introduction
Figure 1. DTU-H100 Appearance
1.2.1. Interface Description Table 2 DTU-H100 External Interface
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
12
Function
Name
Description
Button
Reload
Restore to Factory Setting Button
Long Press this button for 3 seconds and
loosen, the device will restore to factory
setting in 10 seconds. Pin Number
Name
Description
2
RXD
Receive Data
3
TXD
Send Data
5
GND
GND
7
RTS
Request to Send
8
CTS
Clear to Send
9
VCC
Defualt not used. May connect the jumper of
the DTU main board to make this pin
connected with DTU DC power supply.
1.2.2. RS232 Interface
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, 7-8 no connection), see the following table for pin defination.
Figure 2. RS232 Pin Defination(Male/Needle Type)
Table 3 RS232 Interface
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-H100 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
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
13
Pin Number
Name
Description
1
TX+
Transfer Data+
2
TX-
Transfer Data-
3
RX+
Receive Data+
4
PHY-VCC
Transformer Tap Voltage
5
PHY-VCC
Transformer Tap Voltage
6
RX-
Receive Data-
7
N.C.
None Connect
8
N.C.
None Connect
Figure 3. RJ45 Pin Defination
Table 4 RJ45 Interface
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).
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
14
1.2.6. Mechanical Size
DTU-H100 device physical size as follows:
Figure 4. DTU-H100 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.
Figure 5. DTU-HXXX Series Order Information
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
15
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.8. Device Difference
Device difference is as following.
1.2.9. Package Information
1 * DTU-HXXX 1 * 5V/1A Power Adapter 1 * Serial Cable(Only for DTU-H100) 1 * Ethernet Cable(Only for DTU-H100) 1 * 3dBi Antenna
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
16
Phone
Laptop
PLC Device
Tablet
Wi
-
Fi Link
Wi
-
Fi Link
Wi-Fi Link
RS
232
/
RS
485
DTU Device AP Mode
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:
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. 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 STAs is transmitted through the AP. The figure following shows such type of networking.
http://www.iotworkshop.com
Figure 7. DTU AP Application
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
17
Phone
Laptop
PLC Device
Tablet
Wireless Connection
RS
232
/
RS
485
DTU Device STA Mode
Server
Server
WWW. Network Cloud
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.
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.
Figure 8. DTU STA Application
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
18
Phone
Laptop
PLC Device
Tablet
Wireless Connection
RS
232
/
RS
485
DTU Device AP+STA Mode
Server
Server
AP
STA
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 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 Users can easily setting device‟s parameters through WiFi when device works as STA
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
AP+STA Mode Notes:
http://www.iotworkshop.com
Figure 9. DTU AP+STA Application
orginal network setting. mode.
active;
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
19
Phone
Laptop
PLC Device
Tablet
Wireless Connection
RS
232
/
RS
485
IP: 10.10.100.100 IP: 10.10.100.101 IP: 10.10.100.102
AP IP: 10.10.100.254
STA IP: 10.10.101.100
AP IP: 10.10.101.254
AP
AP
STA
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
Figure 10. One AP and One STA Application
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
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
20
Phone
Laptop
Tablet
Wi
-
Fi Link
Wi
-
Fi Link
Wi-Fi Link
RJ
45
Ethernet
DTU Device AP Mode
Laptop
AP
IP:10.10.100.254
IP:10.10.100.100
IP:10.10.100.101 IP:10.10.100.102
IP:10.10.100.2
Laptop
Wireless
RJ45 Ethernet
Ethernet IP:10.10.100.254
STA IP:192.168.1.100
IP:10.10.100.100
Laptop
IP:192.168.1.1
Wireless
IP:192.168.1.102
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)
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 intercommunication with this method.
2.2.2. Ethernet Interface Networking (As STA, N-Ver)
Figure 12. Ethernet Interface Networking (As STA, N-Ver)
For above networking, device works as STAFirmware is N-Version,and device configured as router mode. When device connect to AP, it will get wireless port IP address from APFor example: 192.168.1.100.At the same time, device also form a subnetDefault 10.10.100.254 and all devices connected to device Ethernet interface will get assigned IP addressFor example:
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
21
Laptop
Wireless
RJ45 Ethernet
IP:192.168.1.101
Laptop
IP:192.168.1.1
Wireless
IP:192.168.1.102
STATIC IP:192.168.1.10
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)
Figure 13. Ethernet Interface Networking (As STA, Z-Ver)
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.
http://www.iotworkshop.com
DTU-H100 Wi-Fi/Ethernet to RS485/RS232 Server User Manual
22
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 NameSSID Security Mode Encryption Key
TCP/UDP Linking Parameters
Protocol Type Link TypeServer or Client Target Port ID Number Target Port IP Address
Serial Port Parameters
Baud Rate Data Bit Parity (Check) Bit Stop Bit Hardware Flow Control
Work Mode Selection
Transparent/Agreement/HTTPD Client mode(AT+TMODE to set)
The following introduce the work mode in detail.
3.2. Working Mode
3.2.1. Transparent Transmission Mode
The device support serial interface transparent transmissioin mode. The benefit of this mode is to 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.
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
Loading...
+ 51 hidden pages