Coolmay CX-WIFI-2NET User Manual

CX-WIFI-2NET module user manual
Page 1 ,Total 93 Pages
CX-WIFI-2NET Module user
manual
Version 7.21
CX-WIFI-2NET module is an all-in-one 802.11 b/g/n Wi-Fi and Ethernet module that provides a way to connect a user's physical device to a Wi-Fi wireless network or Ethernet. Provides a solution for the UART data transfer interface. The module comes with an RS485 port, a standard RS232 communication port and two RJ45 standard network ports. Through this module, the traditional low-end serial device or MCU-controlled device can easily access Wi-Fi wireless network or Ethernet. Transparent transmission is realized to realize the control and management of the Internet of Things. As a hotspot, CX-WIFI-2NET module can accommodate 32 wifi clients simultaneously,
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 2 ,Total 93 Pages
and can also accommodate 32 TCP clients at the same time. At the same time, the module can be used as a secondary router and can be connected hand-in-hand.
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 3 ,Total 93 Pages
Contents
Contents........................................................................................................................ 3
Chapter 1 Hardware description ................................................................................... 6
1.1. Module model and appearance ....................................................................... 6
1.2. Indicator function ............................................................................................. 7
1.3 Features............................................................................................................ 8
1.4 Main application areas ...................................................................................... 8
1.5 Module basic parameters ................................................................................. 9
Chapter 2 Product function description ....................................................................... 10
2.1 User configuration process ............................................................................. 10
2.2 Operating mode .............................................................................................. 10
2.2.1 Transparent transmission mode ............................................................ 10
2.2.2 Serial command mode ........................................................................... 11
2.2.3 HTTPD Client mode .............................................................................. 12
2.2.4 Modbus TCP and Modbus RTU mutual conversion ............................... 13
2.3 Wireless networking ........................................................................................ 14
2.3.1 STA-based wireless network ................................................................. 14
2.3.2 AP-based wireless network ................................................................... 15
2.3.3 AP+STA wireless network ...................................................................... 16
2.4 Ethernet interface networking mode ............................................................... 17
2.4.1 CX-WIFI-2NET module Ethernet interface function (AP) ....................... 17
2.4.2 CX-WIFI-2NET module Ethernet interface function (STA routing mode) 18
2.4.3 CX-WIFI-2NET module Ethernet interface function (STA bridge mode) 18
2.4.4 CX-WIFI-2NET Ethernet interface function (switch) .............................. 19
2.5 WI-FI parameter settings ................................................................................ 19
2.5.1 Automatic frequency selection ............................................................... 19
2.5.2 Security Mechanism .............................................................................. 19
2.5.3 Add router function when STA ............................................................... 20
2.5.4 STA address binding function ................................................................ 21
2.6 Network parameter setting .............................................................................. 21
2.6.1 Socket A ................................................................................................ 21
2.6.2 Socket B ................................................................................................ 22
2.7 New feature settings ....................................................................................... 22
2.7.1 Tcp password authentication when establishing connection .................. 22
2.7.2 Register ID/MAC function ...................................................................... 22
2.7.3 Adaptive baud rate function ................................................................ ... 23
2.7.4 KeepAlive Function ................................................................................ 24
2.7.5 Multi-STA Function ................................................................................ 24
2.7.6 Domain name backup and smart STA ................................................... 24
2.8 Parameter setting ........................................................................................... 24
2.9 Firmware upgrade ........................................................................................... 25
Chapter 3 Module parameter setting ........................................................................... 26
3.1 Web Management page .................................................................................. 26
3.1.1 Open management page ............................................................................. 26
3.1.2 Quick Configuration ............................................................................... 27
3.1.3 Wireless Mode Selection ....................................................................... 27
3.1.4 Wireless Access Point Settings ........................................................... 28
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 4 ,Total 93 Pages
3.1.5 Wireless Terminal Settings .................................................................... 29
3.1.6 Serial Port and Network Settings ........................................................... 31
3.1.7 Ethernet Function Settings .................................................................... 32
3.1.8 HTTPD Client Mode .............................................................................. 33
3.1.9 Advanced setting ................................................................................... 34
3.1.10 Module Management ................................ ................................ ........... 34
3.2 Serial Port Configuration ................................................................................. 35
3.2.1 Module operation mode ......................................................................... 35
3.2.1.1 Switch transparent mode to command mode ............................... 37
3.2.2 AT+ Command instruction ..................................................................... 37
3.2.2.1 Command format .......................................................................... 39
3.2.2.2 Instruction Set .............................................................................. 41
3.2.2.2.1 AT+E ................................................................................... 44
3.2.2.2.2 AT+ENTM ............................................................................ 44
3.2.2.2.3 T+NETP .............................................................................. 44
3.2.2.2.4 AT+UART ............................................................................ 44
3.2.2.2.5 AT+UARTF .......................................................................... 45
3.2.2.2.6 AT+UARTFT ........................................................................ 45
3.2.2.2.7 AT+UARTFL ........................................................................ 46
3.2.2.2.8 AT+TMODE ......................................................................... 46
3.2.2.2.9 AT+WMODE ........................................................................ 46
3.2.2.2.10 AT+WSKEY ....................................................................... 47
3.2.2.2.11 AT+WSSSID ...................................................................... 48
3.2.2.2.12 AT+WSLK .......................................................................... 48
3.2.2.2.13 AT+WEBU ......................................................................... 48
3.2.2.2.14 AT+WAP ............................................................................ 49
3.2.2.2.15 AT+WAKEY ....................................................................... 49
3.2.2.2.16 AT+MSLP .......................................................................... 50
3.2.2.2.17 AT+WSCAN ...................................................................... 51
3.2.2.2.18 AT+TCPLK ........................................................................ 51
3.2.2.2.19 AT+TCPDIS ....................................................................... 51
3.2.2.2.20 AT+WANN ......................................................................... 52
3.2.2.2.21 AT+LANN .......................................................................... 53
3.2.2.2.22 AT+DHCPGW ................................................................... 53
3.2.2.2.23 AT+TCPTO ........................................................................ 54
3.2.2.2.24 AT+MAXSK ....................................................................... 54
3.2.2.2.25 AT+TCPB .......................................................................... 54
3.2.2.2.26 AT+TCPPTB ...................................................................... 55
3.2.2.2.27 AT+TCPADDB ................................................................... 55
3.2.2.2.28 AT+TCPTOB ..................................................................... 56
3.2.2.2.29 AT+TCPLKB ...................................................................... 56
3.2.2.2.30 AT+FUDLX ........................................................................ 56
3.2.2.2.31 AT+MMID .......................................................................... 57
3.2.2.2.32 AT+IDFIR .......................................................................... 57
3.2.2.2.33 AT+IDEVE ......................................................................... 57
3.2.2.2.34 AT+AABR .......................................................................... 57
3.2.2.2.35 AT+DHCPDEN .................................................................. 58
3.2.2.2.36 AT+HIDESSID ................................................................... 58
3.2.2.2.37 AT+DOMAIN ..................................................................... 58
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 5 ,Total 93 Pages
3.2.2.2.38 AT+RELD .......................................................................... 59
3.2.2.2.39 AT+Z .................................................................................. 59
3.2.2.2.40 AT+MID ............................................................................. 59
3.2.2.2.41 AT+VER ............................................................................ 59
3.2.2.2.42 AT+H ................................................................................. 60
3.2.2.2.43 AT+HTTPURL ................................................................... 60
3.2.2.2.44 AT+HTTPTP ...................................................................... 60
3.2.2.2.45 AT+HTTPPH ..................................................................... 61
3.2.2.2.46 AT+HTTPCN ..................................................................... 61
3.2.2.2.47 AT+HTTPUA ..................................................................... 61
3.2.2.2.48 AT+EPHYA ........................................................................ 62
3.2.2.2.49 AT+EPHYB ........................................................................ 62
3.2.2.2.50 AT+WSSSIDA ................................................................... 62
3.2.2.2.51 AT+WSSSIDB ................................................................... 63
3.2.2.2.52 AT+WSSSIDC ................................ ................................ ... 63
3.2.2.2.53 AT+WSKEYA ..................................................................... 64
3.2.2.2.54 AT+WSKEYB .................................................................... 65
3.2.2.2.55 AT+WSKEYC .................................................................... 65
3.2.2.2.56 AT+WSQY ......................................................................... 66
3.2.2.2.57 AT+HTPMODE .................................................................. 67
3.2.2.2.58 AT+HTPSV ........................................................................ 67
3.2.2.2.59 AT+HTPTP ........................................................................ 68
3.2.2.2.60 AT+HTPURL ..................................................................... 68
3.2.2.2.61 AT+HTPHEAD ................................................................... 69
3.2.2.2.62 AT+REGEN ....................................................................... 69
3.2.2.2.63 AT+REGTCP ..................................................................... 69
3.2.2.2.64 AT+REGID ........................................................................ 70
3.2.2.2.65 AT+IPBUP ......................................................................... 70
3.2.2.2.66 AT+STAPRO ..................................................................... 71
3.3 AP Mode Setting Procedure ............................................................................ 72
3.4 STA mode setting procedure ........................................................................... 77
Appendix A: FAQ and Answers ................................................................................... 88
Question 1: Two CX-WIFI-2NET modules are interconnected, and the TCP protocol
is used as a transparent serial port. How to set it? ............................................... 88
Question 2CX-WIFI-2NET module LAN IP settings, WAN IP settings Where are
they set? ............................................................................................................... 88
Question 3: Two WIFI modules are interconnected, and the transparent serial port
is made by UDP protocol. How to set it?............................................................... 89
Question 4: Where is the TCP/UDP protocol of the CX-WIFI-2NET module? ...... 90
Question 5: Two WIFI modules are set as STAs, which are interconnected by APs
and do transparent serial ports. How to set them? ............................................... 91
Question 6:
How to avoid IP address conflict when using CX-WIFI-2NET module?
.............................................................................................................................. 91
Question 7: The WIFI module is connected to the PC (Server) as a data acquisition
card. How to set it? ............................................................................................... 92
Question 8: Does the WIFI module TCP support UDP multicast?
................... 93
Question 9: The WIFI module works in STA mode. How does the host computer obtain the IP of the module?
............................................................................... 93
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 6 ,Total 93 Pages
RJ45 LAN2
Restart button
RS485
A
485+
B
485-
RS232
2
RX
3
TX 5 GND
Power
terminal
24V+
24V-
Ground
wire
Restore factory settings button Long press around 5S
External antenna detachable
RJ45 LAN1
Chapter 1 Hardware description
1.1. Module model and appearance
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 7 ,Total 93 Pages
Indicator
Indication function
Status
POWER
Power Indicator
Power supply works normally.
CHAR
Lithium battery charging indicator
(optional)
It is equipped with a lithium battery
and is always on when the
rechargeable battery is charging. It
automatically turns off when the
battery is fully charged.
READY
System operation work indicator
Always bright after the system is
LINK
Module WIFI connection status indication
Connection is established with
data constantly lit
NET1
LAN1 port connection status indicator
Connection establishment has data
NET2
LAN2 port connection status indicator
Connection establishment has data
RX
Data transmission indication
Serial network RX has data flashing
See the table below for the indicator function
1.2. Indicator function
There are eight indicators on CX-WIFI-2NET module, which are POWER, CHAR, READY, LINK, NET1, NET2, RX, TX. The status of the indicator light is as follows:
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 8 ,Total 93 Pages
TX
Data transmission indication
Serial network TX has data flashing
1.3 Features
● Support 802.11b/g/n wireless standard
● Support TCP/IP/UDP network protocol stack
● Support UART/Ethernet data communication interface
● Support wireless work in STA/AP/AP+STA mode
● Support routing / bridging / switch mode network architecture
● Support transparent / protocol data transmission mode
● Provide web configuration page
● Support heartbeat signal, WIFI connection indication
● Support serial free/auto framing function
● Flexible software platform to provide customized services
1.4 Main application areas
Intelligent lighting
Smart socket
Industrial control
Remote device monitoring
Internet of Things applications
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 9 ,Total 93 Pages
Item
Index
Wireless
parameter
Wireless standard
802.11 b/g/n
Frequency range
2.412GHz-2.484GHz
Transmit power
802.11b: +20dBm(Max.)
802.11g: +18dBm(Max.)
802.11n: +15dBm(Max.)
User can configure power
Receiving sensitivity
802.11b: -89dBm
802.11g: -81dBm
802.11n: -71dBm
Antenna option
External I-PEX connector
Hardware
parameter
Data interface
UART300bps-460800bps
Ethernet100Mpbs
Operating Voltage
5-30V
Working current
50mA~350mA
Operating temperature
-40-85
Storage temperature
-40-125
Size
65×90×36mm
Software
parameter
Wireless network type
Station/AP mode
Security Mechanism
WEP/WPA-PSK/WPA2-PSK
Encryption type
WEP64/WEP128/TKIP/AES
Operating mode
Transparent transmission mode, serial command mode
AT command
AT+ command structure
Network protocol
TCP/UDP/ARP/ICMP/DHCP/DNS/HTTP
Maximum number of TCP connections
32
User configuration
Web server + AT command configuration
1.5 Module basic parameters
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 10 ,Total 93 Pages
Chapter 2 Product function description
2.1 User configuration process
After CX-WIFI-2NET module is powered on, it will automatically connect to the
wireless network and server according to the parameters set by the user, and enter the set working mode, and open the serial port according to the preset serial port parameters.
The parameters that the user needs to preset are Operating mode
Transparent transmission / serial command mode / HTTPD Client mode
Wireless network parameters
Network name (SSID) Safe mode Key
Default TCP/UDP connection parameters
Protocol type Connection type (server or client) Destination port Destination IP address
Serial port parameter
Baud rate Data bit Check position Stop bit Hardware flow control After the user has configured all the parameters and restarted, the module can
work according to the set parameters. Each section will be described in detail in the following sections.
2.2 Operating mode
The module has three working modes: transparent transmission, serial command
mode, and HTTPD client mode.
2.2.1 Transparent transmission mode CX-WIFI-2NET module supports serial port transparent transmission mode, which
can realize serial port plug and play, thus minimizing the complexity of user use. In this mode, all data that needs to be sent and received is transparently transmitted between the serial port and the WiFi or Ethernet interface, enabling data transfer between the universal serial device and the network device without any analysis.
In transparent transmission mode, it can be fully compatible with the user's original
software platform. User equipment can support wireless data transmission without any software changes.
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 11 ,Total 93 Pages
Baotou
Length
Functional
word
Alternate
parameter area
Target
port
Target
address
Data
Sum
check
2
2
(n+m+5)
1 2 2 m n
1
<Description>: Transparent transmission mode is the least complex data transmission. The user
turns on the hardware flow control (CTS/RTS) function of the serial port, which can minimize the bit error rate.
2.2.2 Serial command mode
In this mode, users can send serial port data to different server addresses
according to our protocol, and send data to different servers without restarting. This mode can send data to the server using UDP or TCP client.
The client MCU sends the packet in the following format. After the module is parsed,
only n bytes of data are sent to the destination address. When there is data return, the data is directly output from the serial port without parsing.
Serial command mode protocol table
Baotou Constant for 0x55 0xaa Length The sum of all the number of bytes from the start of the function word to the check
(without the checksum). High byte first function word:
Bit0:( UDP0 TCP1 Bit1:( Short connection: 0; long connection:1 Bit2:( IP0Domain name1 Bit7:( Streamlined protocol: 0; Full protocol:1)Note: Currently only the streamlined
protocol is supported.
Note
● For Bit1, if it is a short connection, the data will be disconnected after sending the
data; if it is a long connection, after the data is sent, the connection will remain until the target address is changed again.
● For Bit2, it indicates whether the destination address is IP or domain name. If it is
IP, the destination address is 4 bytes. If it is a domain name, the target address length is the length of the entire domain name string (where the last byte of the destination address is 0x00). , that is, the end of the string, the length of the domain name is not fixed).
● For Bit7, in the thin protocol, the reply frame contains only data. Under the full
protocol, the reply frame will have a frame failure such as sending failure, waiting for timeout, and responding to the device IP under UDP broadcast.
Alternate parameter area The first byte: If it is a short connection, this location is the TCP wait timeout period
(1-255). If the response is not received after the send command is completed, wait for the corresponding number of seconds. If it is 5, it means the maximum wait. 5s disconnected; if the return data is received immediately after sending the command, the connection is immediately disconnected; if it is a long connection, it is 0x00 here.
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 12 ,Total 93 Pages
Second byte: reserved Target port Little endian format, low byte first, such as port 23, here the order is 17 00 Target address If it is IP, it is 4 bytes, for example, 192.168.0.7 is represented as 07 00 A8 C0; if it
is a domain name, the address length is not fixed, ending with '\0'
Data Variable length, up to 1000 bytes Calibration From the beginning of the function word, before the check byte, add the checksum. The following are specific application examples: Send data: 55 aa 00 0a 00 00 00 21 00 85 00 A8 C0 01 0f Length byte 00 0a: length is n+m+5, here is 10 Function word 00: UDP mode Target ip address 85 00 A8 C0:192.168.0.133 Data area 00: length is 1 Check calculation:
0x00+0x00+0x00+0x21+0x00+0x85+0x00+0xA8+0xC0+0x01=0x0f
2.2.3 HTTPD Client mode
This mode is used to request data from an HTTP server or to submit data to a
server.
After the user sets the specific content of the HTTP protocol header with the AT
command or the web page. Each time data is sent, the module automatically encapsulates the sent data into HTTP protocol data and sends it to the specified HTTP server. It is convenient for users to read or submit data directly from the HTTP server. In this mode, the user can send the data to the specified http server, and the module will automatically add the http protocol header in front of the sent data. The content of the specific protocol header can be set by the AT command or the web page.
The following are specific application examples: First set the HTTP related parameters with the AT command. AT+HTTPURL=192.168.1.1,80 Set the server's address and port AT+HTTPTP=POST Set the HTTP type, GET, PUT,
or POST
AT+HTTPPH=/set Set the path in the protocol
header, up to 50 bytes
AT+HTTPCN=keep-alive Set Connection in the protocol
header, up to 20 bytes
AT+HTTPUA=lwip13.2 Set the User-Agent in the protocol
header, up to 20 bytes.
If the data sent is 1234. Then on the 192.168.1.1 port 80 will receive the following data POST/set HTTP/1.1 Connection:keep-alive User-Agent:lwip1.3.2 Content-Length:4 Host:192.168.1.1:80
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 13 ,Total 93 Pages
1234 If the HTTP type is GET, the data received on port 80 of 192.168.1.1 is POST/set1234 HTTP/1.1 Connection:keep-alive User-Agent:lwip1.3.2 Content-Length:0 Host:192.168.1.1:80
If the module receives data from the server, it will print directly to the serial port
without any processing.
Users can customize the content of the HTTP header in the new definition mode.
You can add, delete, and modify the content of each HTTP header according to your needs. (If the HTTP request type is POST/PUT, the module will automatically add Content-Length. ). The set commands include AT+HTPMODE, AT+HTPSV, AT+HTPTP, AT+HTPURL, AT+HTPHEAD. For the specific command setting procedure, please refer to the AT command section. Similarly, there are corresponding settings pages in the web page.
Note: In the new setting mode, if you use the AT command to set the protocol
header, please use "<<CRLF>>" instead of the carriage return. You don't need to consider the carriage return when setting the built-in webpage.
2.2.4 Modbus TCP and Modbus RTU mutual conversion
This module supports Modbus TCP to Modbus RTU (Modbus ASCII is not
supported); the network parameters of the module should correspond to the network parameters of the application software. The TCP server corresponds to the TCP client, and the port should also be configured to be the same. The working mode is Modbus TCP<= >Modbus RTU (AT command: AT+TMODE=modbus).
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 14 ,Total 93 Pages
User equipment
T C P 2 3 2 -4 0 1
P C
ModbusRTU to ModbusTCP
2.3 Wireless networking
The wireless module of the CX-WIFI-2NET module can be configured as a wireless
STA or as an AP. Therefore, the CX-WIFI-2NET module logically supports two wireless interfaces, one as a STA and the other as an AP. Other STAs can connect to the wireless network through the AP interface of this module. Therefore, the CX-WIFI-2NET module can provide a very flexible networking mode and network topology. The functional modules of the CX-WIFI-2NET module are shown below:
< Description >
AP: The wireless access point is the central node of a wireless network. A
commonly used wireless router is an AP, and other wireless terminals can be connected to each other through an AP.
STA: A wireless station is a terminal of a wireless network. Such as laptops, PDAs,
etc.
2.3.1 STA-based wireless network
The CX-WIFI-2NET module is connected to other APs as STAs (using the AP CLI interface) to
form a wireless network. All STAs use the AP as the center of the wireless network, and the mutual communication between the STAs is completed by the AP. As shown below:
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 15 ,Total 93 Pages
2.3.2 AP-based wireless network
Because the CX-WIFI-2NET module can be set to either AP or STA, the CX-WIFI-2NET
module can easily implement the wireless network of the ad hoc network. As shown below. The CX-WIFI-2NET module No. 1 is used as an AP. Other modules and computers can be connected to this module as STAs. It can also be connected to user equipment through the UART interface; CX-WIFI- 2 and 3 The 2NET module is connected to the No. 1 module as a STA, so that all CX-WIFI-2NET modules can be managed by a computer. The self-organizing network mode can facilitate the unified management of all CX-WIFI-2NET modules, and the self-organizing network can easily expand the coverage of the entire wireless network.
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 16 ,Total 93 Pages
2
No.3
No.1
2.3.3 AP+STA wireless network
The CX-WIFI-2NET module can support AP+STA. That is, the module supports one AP interface and one STA interface at the same time.
In the figure, the module activates the function of AP+STA. The STA interface of the
module can be connected to the router and connected to the server in the network through TCP connection. At the same time, the AP interface on the module is also available. The mobile phone/PAD can be connected to this AP interface (via TCPB connection) to control the serial device or set the module.
With the AP+STA function, it is convenient to use the mobile phone/PAD and
other hand-held devices to monitor the user device without changing its original network settings.
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 17 ,Total 93 Pages
The module can be easily set by the AP+STA function, which solves the
problem that the previous module can only be set through the serial port when it is in the STA.
AP+STA Function setting:
The AP+STA function needs to be set through the serial port command
(F-logarithmic setting).
AT+FAPSTA=on Sets the AP+STA function (the factory settings are in effect). Then when the module is set to STA mode, the AP interface is still valid.
Note on AT+STA mode:
When the AP+STA function is enabled, the STA port needs to be connected to
other routers. Otherwise, the STA port will continuously scan the router. When scanning, it will affect the AP port, such as data loss.
If the user determines that the STA cannot connect to the AP at this time, you can
use the command to stop scanning the STA port.
AT+STTC=on/off, on means scanning the router, off is not scanning, and the
command is not saved after restarting.
AT+FSTTC=on/off, this command can be saved, and the original settings will be
maintained after restarting.
2.4 Ethernet interface networking mode
The CX-WIFI-2NET module provides a 100M Ethernet interface. Through this
100M Ethernet interface, users can implement WIFI port, serial port, Ethernet port, and three interfaces to communicate with each other. In terms of networking, the CX-WIFI-2NET module supports bridging mode, routing mode and switch mode to correspond to different specific applications.
<Description>: The Ethernet function has two network ports. The second network port can be used
as either a LAN port or a WAN port. The first network port can only be used as a LAN. The bridge mode described below uses only the network port 2. The route mode can use either network port 1 or network port 2. The switch mode uses two network ports at the same time.
For different networking modes, the CX-WIFI-2NET module needs to be
version-switched through commands. Use the command AT+FVER=n to switch to the (2.4.2) routing mode, and AT+FVER=z to switch to the (2.4.3) bridge mode.
2.4.1 CX-WIFI-2NET module Ethernet interface function (AP)
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 18 ,Total 93 Pages
Ethernet interface function (AP)
CX-WIFI-2NET module Ethernet interface function (AP+ dual network port)
The CX-WIFI-2NET module functions as an AP and forms a network centered on
the module. The IP addresses of all devices on the network work in the same network segment as the modules.
2.4.2 CX-WIFI-2NET module Ethernet interface function (STA routing mode)
CX-WIFI-2NETModule Ethernet interface functionSTA
The CX-WIFI-2NET block acts as a STA and the module works in routing mode.
After the module is connected to the AP, obtain the IP address from the AP (as shown in Figure 192.168.1.100). The modules themselves form a subnet (default
10.10.100.254), and the devices on the Ethernet interface are assigned addresses by
the module (see Figure 10.10.100.101). Thus, as PC1 is in the subnet (NAT), the connection from PC1 can be connected to PC2 (because CX-WIFI-2NET works in routing mode), but PC2 cannot actively connect to PC1.
2.4.3 CX-WIFI-2NET module Ethernet interface function (STA bridge mode)
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 19 ,Total 93 Pages
CX-WIFI-2NET Module Ethernet interface functionSTA
The CX-WIFI-2NET module acts as a STA and the module works in bridge mode.
After the module is connected to the AP, the device on the Ethernet interface obtains the IP address from the AP (as shown in Figure 192.168.1.101). At this time, the entire network, the module is like a transparent device, and PC1 and PC2 can communicate with each other without any constraint. However, if the CX-WIFI-2NET module is to communicate with other devices, you need to statically set the LAN IP address (as shown in Figure 192.168.1.10).
2.4.4 CX-WIFI-2NET Ethernet interface function (switch)
CX-WIFI-2NET module Ethernet interface function (switch)
The CX-WIFI-2NET module acts as an AP and the module works in switch mode.
The module is connected to the AP through the network cable 2, and is connected to the PC1 through the network port 1, so that the PC1 obtains an IP (192.168.1.101) from the AP. In this way, PC1 and PC2 can communicate directly under a LAN. Multiple D2 modules can be added between PC1 and AP (both work in switch mode), so that the modules can be extended by hand, so that the coverage of the AP network can be extended.
Note: In this mode, the module DHCP should be turned off with
AT+DHCPDEN=off, otherwise the network will be abnormal. To access the module, you need to manually change the LAN port address of D2 to the same network segment (192.168 above). 1.102).
2.5 WI-FI parameter settings
2.5.1 Automatic frequency selection
When the module works in STA mode, the module adjusts itself to the same
channel as the AP according to the wireless channel of the AP and accesses it.
When the module works in AP mode, it can be set to automatic frequency
selection mode, so when the module starts, it will choose a better wireless channel according to the surrounding environment.
2.5.2 Security Mechanism
The CX-WIFI-2NET module supports multiple wireless network encryption
methods to fully guarantee the secure transmission of data, including:
WEP WPA-PSK/TKIP
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 20 ,Total 93 Pages
WPA-PSK/AES WPA2-PSK/TKIP WPA2-PSK/AES Note: When WEP is encrypted, the HEX mode is a 10-bit or a 26-digit password,
the ASCII mode is a 5-digit or a 13-digit password, and the WPA-PSK and WPA2-PSK passwords are at least 8 bits.
2.5.3 Add router function when STA
A "Search" button has been added to the module "Wireless Terminal Settings"
page. After clicking this button, a window will pop up showing the information of the surrounding APs and select. As shown below:
There are three STA settings on this page. You can fill in one or fill in three. If all
three are filled in, the module will automatically switch to the next STA network if the current network signal is less than the signal threshold (if the threshold is Filling in 100 will not automatically switch the network).
Shenzhen Coolmay Technology Co.,Ltd www.coolmay.com
CX-WIFI-2NET module user manual
Page 21 , Total 93 pages
After selecting the router, it will return to the original page. At this time, the
encryption mode and encryption algorithm have been filled in. You only need to
Follow the prompts to write your password.
2.5.4 STA address binding function
CX-WIFI-2NET module supports the function of binding the BSSID of the
destination network during the networking process (as the STA, to connect to the AP). According to the 802.11 protocol, different wireless networks may have the same network name (ie, SSID/ESSID), but must correspond to a unique BSSID address (ie, MAC address). Because the illegal intruder can connect the STAs in the network to the illegal AP by establishing a wireless network with the same SSID/ESSID, the network is leaked. Therefore, by binding the BSSID address, the STA can be prevented from accessing the illegal network, thereby improving the security of the wireless network.
2.6 Network parameter setting
CX-WIFI-2NET module has two TCP Sockets: Socket A and Socket B. The data
written to the serial port of the module will be sent to the Socket A and B simultaneously; the data received by the module through Socket A or B will be sent out through the serial port.
Through the different settings of the dual Socket, a variety of network
interconnection methods can be realized. Currently Sock B only supports tcp client.
2.6.1 Socket A
Socket A works in the following ways: TCP Server, TCP Client, UDP Server,
Shenzhen Coolmay Technology www.coolmay.net
CX-WIFI-2NET module user manual
Page 22 , Total 93 pages
UDP Client. For the setting method, please refer to the AT+NETP command in the AT command.
When Socket A is set to TCP Server, it can support TCP link connections of up
to 32 TCP Clients. In the multi-TCP link connection mode, data transmitted from TCP is forwarded one by one to the serial port. The data coming from the serial port will be copied into multiple copies and forwarded on each TCP link. The specific data flow chart shows:
2.6.2 Socket B
The working mode of Socket B is currently only TCP Client. For the setting
method, please refer to the AT+TCPB/AT+TCPPTB/TCPADDB/TCPTOB/TCPLKB command in the AT command.
2.7 New feature settings
2.7.1 Tcp password authentication when establishing connection
This function is only applicable when the module is used as the tcp server. When
the tcp client is connected to the module, the module will authenticate each connected tcp.
The first data sent after tcp clien is connected should be the module's webpage
password plus carriage return. By default, the password of the module is admin, so the first data sent by the tcp client should be "0x61 0x64 0x6D 0x69 0x6E 0x0D 0x0A" (hexadecimal). If the password is correct, the module returns "OK" and vice versa returns "NO" and disconnects.
This feature can be turned on or disabled in "TCP Connection Password
Authentication" on the web page. Please refer to the "Web Management Page" section for details.
2.7.2 Register ID/MAC function
This function is only applicable when the module is used as the tcp client. When
the module is connected to the server, it will have a two-byte ID number in front of the data (the ID range is 0~65535, the high byte is first, the low byte is at After) add two bytes of ID inversion or upload a 6-byte MAC address. For example, if the default ID of the module is 1111 (MAC address: D8B04CF20000), the first four bytes are sent to the server as “0x04 0x57 0xFB 0xA8” (or 0xD8 0xB0 0x4C 0xF2 0x00
Shenzhen Coolmay Technology www.coolmay.net
Shenzhen Coolmay Technology Co.,Ltd
CX-WIFI-2NET module user manual
Page 23 , Total 93 Pages
www.coolmay.com
0x00).
There are two ways to register: one is to register your own ID/MAC when
connecting to the server for the first time; the other is to add ID/MAC in front of each sent data.
The parameters related to this function are set on the “Serial Port and Other
Settings” section of the webpage. The ID/MAC function is built for the first time and
the ID/MAC function is disabled by default.
2.7.3 Adaptive baud rate function
Please use this function with our company's virtual serial port software. In the virtual serial port software, select "synchronous baud rate (class
RFC2217)", and use the at command "AT+AABR=on" to open the module's adaptive baud rate function and restart. As shown below:
www
Shenzhen Coolmay Technology Co.,Ltd
CX-WIFI-2NET module user manual
Page 24 , Total 93 pages
www.coolmay.com
In the virtual serial port software, select "synchronous baud rate (class RFC2217)", and use the at command "AT+AABR=on" to open the module's adaptive baud rate function and restart. As shown below:
In the picture, the virtual serial port synchronizes the baud rate. The baud rate of the module changes with the baud rate of the virtual serial port at any time, and the module does not need to be restarted. If the module is restarted, the baud rate will return to the previous baud rate.
2.7.4 KeepAlive Function
When the TCP connected, the keep-alive mechanism is added. Therefore, when the network of the module is abnormal, the network abnormality can be judged and disconnected in time. When the network is restored, the network can also be connected to the server in time.
2.7.5 Multi-STA Function
Added multiple SAT network setting function. In STA mode, if the connected network has a low signal, it will automatically switch to other AP networks (it will automatically restart when switching networks).
This function provides a signal threshold that automatically switches to the network and restarts when the current network signal is below the signal threshold. If the signal value is set to 100, the module will not switch to networks. Even if the current network signal is not available, it will always search the current network and will not reconnect to other networks.
The specific settings page of this function,Please refer to section 2.5.3 chapter.
This function can also be set by the AT command, refer to section
3.2.2.2.49-3.2.2.2.55 chapters.
2.7.6 Domain name backup and smart STA
After the domain name backup function is enabled, the IP address of the
domain name will be automatically saved when the module is connected to the
server of the domain name. If the server can’t be connected over five minutes
(Including the IP address cannot be resolved or the resolved IP address cannot be connected.) it will automatically enable the alternate IP to connect.
This function can be turned on/off in the web page or AT command (AT+IPBUP).
Smart STA function. If the module is in STA mode and has not been connected to the router for five minutes, the module will automatically start its own AP function and connect the router every 80 seconds at a later time. This function allows the user to continue to control the module or set the parameters of the module wireless.
This feature is always off.
2.8 Parameter setting
Shenzhen Coolmay Technology Co.,Ltd
CX-WIFI-2NET module user manual
Page 25 , Total 93 pages
www.coolmay.com
CX-WIFI-2NET module support web parameter settings, which can be easily set by user using IE browser. If the module is connected to a wireless network, the PC can be set up only if it is connected to the same wireless network. In addition, since the CX-WIFI-2NET module is also an AP,PC can be set by being connected to the module which needs to be set .
2.9 Firmware upgrade
The CX-WIFI-2NET module supports web online firmware upgrading.
Shenzhen Coolmay Technology Co.,Ltd
CX-WIFI-2NET module user manual
Page 26 , Total 93 pages
www.coolmay.com
Parameter
Default setting
SSID
USR-WIFI232-AP_xxxx
IP Address
10.10.100.254
Subnet Mask
255.255.255.0
User Name
admin
Password
admin
Chapter 3 Module parameter setting
3.1 Web Management page
When using the CX-WIFI-2NET module for the first time,needs to do some configuration of this module. You can connect AP interface of the CX-WIFI-2NET module via PC and manage page configuration via web.
By default, the SSID of the AP interface of the CX-WIFI-2NET module is USR-WIFI232-AP_xxxx, and the IP address and user name and password are as follows:
CX-WIFI-2NET Module network default settings table:
3.1.1 Open management page
First connect the CX-WIFI-2NET module with the PC's wireless network card. The SSID is USR-WIFI232-AP_xxxx. After connecting, open IE, enter web page: http://10.10.100.254, Fill in the username and password in the pop-up dialog box, then "confirm".
Then the web page will display the management page of the CX-WIFI-2NET module. It supports Chinese and English language which can be selected in the upper right
corner. There are 10 pages, namely “Quick Configuration”, “Wireless Mode Selection”, “Wireless Access Point Settings”, “Wireless Terminal Settings”, “Serial Port and Network Settings”, “Ethernet Function Settings”, “HTTPD Client Mode”. ",
"IO Control" mode ,"advanced setting" and "module management".
Shenzhen Coolmay Technology Co.,Ltd
CX-WIFI-2NET module user manual
Page 27 , Total 93 pages
www.coolmay.com
3.1.2 Quick Configuration
Quick Configuration page provides users with a quick way to configure modules. After configuring the parameters according to the page steps and restarting the startup module, the module can work normally, reducing the configuration steps and time. Of course, there are fewer options on this page. If you have some detailed configuration, needs to visit corresponding page configuration.
This page has four options to configure and a restart item. Below corresponding instructions:
Wireless configuration: configure the wifi working mode of the module, which can be either AP mode or STA mode;
Ethernet function configuration: open/close the Ethernet port and set the corresponding working mode;
Serial port configuration: configure the serial port parameters of the module, including serial port baud rate, parity bit, 485 function, etc.
Network configuration: configure the network parameters of the module, only TCPA relevant parameters;
Restart module: After all the above parameters are configured, click Restart Module.
3.1.3 Wireless Mode Selection
This page can be set to select the module to work in AP mode or STA mode. The working modes of the "Data Transfer Mode" selection module are "Transparent Transfer Mode", "Serial Command Mode", and "HTTPD Client Mode".
Shenzhen Coolmay Technology Co.,Ltd
CX-WIFI-2NET module user manual
Page 28 , Total 93 pages
www.coolmay.com
3.1.4 Wireless Access Point Settings
The CX-WIFI-2NET module supports the AP interface,which could be used to manage the module conveniently, and realize self-organizing network. The management page is as shown below. Including: SSID settings, wireless network mode settings and wireless security settings, and the setting of the LAN composed of APs.
Loading...
+ 65 hidden pages