Waveshare UART-WIFI232-B2 User manual

UART-WIFI232-B2 User Manual
www.waveshare.com
2
1. OVERVIEW
Features:
Support 802.11b/g/n wireless standard.
CE/FCC/ROHS standard certifications.
Support WiFi protocol and TCP/IP network protocol stack.
Support UART/Ethernet data communication interface.
Support wireless operation on STA/AP/AP+STA mode.
Support router/bridge network mode.
Support transparent/protocol data transmission mode.
Support heartbeat signal, WiFi connection indicating.
Support registration ID, MAC, and user-defined registration packets.
Support user-defined heartbeat packets and socket distribution protocols.
Support MODBUS polling function.
Support remote upgrade function.
Support timeout reboot and scheduled reboot function.
Support flexible and automatic framing for serial communication, achieving higher forwarding
efficiency.
Support WebSocket functionality, enabling real-time interaction between serial ports and web
pages.
Support three parameter configuration methods: web page, serial port AT commands, and
network AT commands.
Provide a user-friendly web configuration interface and AT command set.
External antenna, maximum transmission distance of 280 meters (open line of sight, 3dBi
antenna).

UART-WIFI232-B2 User Manual
www.waveshare.com
3
CATALOGUE
1. Overview ................................................................................................................................................2
2. Quick get start ....................................................................................................................................... 6
2.1 Hardware Connection ..................................................................................................................6
2.2 network connections ...................................................................................................................7
2.3 Data transmission test .................................................................................................................9
3. Overview ..............................................................................................................................................10
3.1 Introduction ...............................................................................................................................10
3.2 Electrical parameter .................................................................................................................. 10
3.3 Product appearance .................................................................................................................. 11
3.4 Antenna ..................................................................................................................................... 12
3.4 Interface description ................................................................................................................. 13
3.5 Outline dimensions ....................................................................................................................15
3.7 Application scenarios .................................................................................................................15
4. Product Parameters Setting ................................................................................................................ 17
4.1 Web management page ............................................................................................................ 17
4.1.1 Open the management page ..........................................................................................17
4.1.2 Quick configuration page ............................................................................................... 18
4.1.3 Mode selection page ...................................................................................................... 19
4.1.4 Wireless access point settings page ............................................................................... 19
4.1.5 Wireless terminal settings page ..................................................................................... 20
4.1.6 Serial port and network settings page ........................................................................... 21
4.1.7 Ethernet function settings ..............................................................................................22
4.1.8 HTTPDClient mode page .................................................................................................23
4.1.9 MQTT function settings page ......................................................................................... 25
4.1.10 Module Management Page ..........................................................................................26
4.2 Software configuration ..............................................................................................................27
4.2.1 Download link .................................................................................................................27
4.2.2 Software introduction .................................................................................................... 27

UART-WIFI232-B2 User Manual
www.waveshare.com
4
5. Product networking application .......................................................................................................... 29
5.1 Wireless networking settings .................................................................................................... 29
5.2 Wireless networking applications ............................................................................................. 31
5.2.1 Wireless Networking Applications (AP) ..........................................................................31
5.2.2 Wireless networking application (STA) .......................................................................... 32
5.2.3 Wireless networking application (AP+STA) .................................................................... 33
5.2.4 Wireless networking application (AP, STA) .................................................................... 35
5.3 Wired networking setup ............................................................................................................37
5.4 Wired networking application ...................................................................................................38
5.4.1 Wired networking application (APLAN) ......................................................................... 38
5.4.2 Wired networking application (APWAN) ........................................................................39
5.4.3 Wired networking application (routing) .........................................................................40
5.4.4 Wired networking application (bridge) .......................................................................... 42
6. Product function description ...............................................................................................................42
6.1 Working mode ........................................................................................................................... 43
6.1.1 Transparent transmission mode .................................................................................... 43
6.1.2 Serial command mode ....................................................................................................44
6.1.3 HTTPDCLIENT mode ........................................................................................................46
6.1.4 ModbusTCP<=>ModbusRTU conversion mode ............................................................. 56
6.1.5 AT Command Mode ........................................................................................................57
6.2 Wireless characteristics .............................................................................................................57
6.2.1 Automatic frequency selection function ........................................................................57
6.2.2 Security mechanism ....................................................................................................... 57
6.2.3 STA joins the routing function ........................................................................................58
6.2.4 STA address binding function .........................................................................................58
6.3 Socket communication .............................................................................................................. 58
6.4 UART framing mechanism ......................................................................................................... 59
6.4.1 Serial Parameters ........................................................................................................... 59
6.4.2 UART Free-Frame Mode .................................................................................................60

UART-WIFI232-B2 User Manual
www.waveshare.com
5
6.4.3 UART automatic framing mode ......................................................................................61
6.5 Password authentication when TCP establishes connection ....................................................62
6.6 Description of RFC2217 protocol .............................................................................................. 63
6.7 Fast Networking Protocol ..........................................................................................................64
6.8 Local area network search .........................................................................................................67
6.9 Registration packet function ..................................................................................................... 68
6.10 Customized heartbeat packets ................................................................................................69
6.11 Socket distribution function .................................................................................................... 71
6.12 Timeout reboot function ......................................................................................................... 73
6.13 Timed reboot function ............................................................................................................ 74
6.14 Modbus polling ........................................................................................................................74
6.15 KeepALIVE Function .................................................................................................................75
6.16 Websocket function ................................................................................................................ 75
6.17 MQTT function .........................................................................................................................75
6.17.1 MQTT function introduction ........................................................................................ 75
6.17.2 UART-WIFI232-B2 Parameter Configuration ................................................................76

UART-WIFI232-B2 User Manual
www.waveshare.com
6
2. QUICK GET START
The UART-WIFI232-B2 module is designed for achieving bidirectional transparent transmission of
data packets between a serial port and WiFi. The module handles protocol conversion internally,
allowing customers to connect their physical devices to WiFi networks and thereby enabling control
and management in the context of the Internet of Things (IoT).
This chapter provides a quick start guide for the UART-WIFI232-B2 module. It's recommended
for users to read through this chapter and follow the instructions provided. Doing so will offer a
systematic understanding of the module product. Users can also choose to explore chapters that align
with their specific interests. For more detailed information and instructions, please refer to
subsequent chapters.
This section primarily provides a quick start guide for UART-WIFI232-B2 module in AP mode.
The following software is involved: SSCOM.exe: Serial Debugging Assistant.
2.1 HARDWARE CONNECTION
The default configuration for UART-WIFI232-B2 is as follows:
Figure UART-WIFI232-B2 default configuration
In order to test the communication conversion of UART to WiFi/Ethernet, we replace the UART
of the UART-WIFI232-B2 module with a USB-to-Serial module (such as the CH343 USB UART Board or
FT232 USB UART Board) and a wireless network card. The hardware connection is as shown in the
following diagram:

UART-WIFI232-B2 User Manual
www.waveshare.com
7
Figure Hardware Connection
2.2 NETWORK CONNECTIONS
Let's take WIFI connection as an example to introduce the network connection process.
Open the wireless network connection and search for the network. As shown in the figure below,
"Waveshare_xxxx" (xxxx is the last four digits of the MAC address) is the default network name (SSID)
for the serial server.

UART-WIFI232-B2 User Manual
www.waveshare.com
9
Figure Wireless Network Connection
At this point, the Link indicator on the module changes from flashing once every 1 second to
flashing once every 2 seconds.
2.3 DATA TRANSMISSION TEST
The initial parameters for UART-WIFI232-B2 are as follows:
The default SSID is "Waveshare_xxxx" ("xxxx" represents the last four digits of the module's MAC
address).
The default encryption method is "open” and “none”.
The default user serial parameters: 57600,8,1,None;
The default value of network parameters: TCP,Server,8899,10.10.100.254;
Local IP address: 10.10.100.254
We just need to follow the appropriate parameter settings for network communication, and
then bidirectional communication between the serial port and Wi-Fi can be achieved. The operation
steps are as follows:
Open the testing software "SSCOM.exe". Connect to the computer's COM5 (select the
appropriate port based on your situation). Choose the UART-WIFI232-B2 serial server's default baud
rate of 57600, and click "Open Port".
Open another instance of "SSCOM.exe". In the network settings section, choose TCP Client mode.
Enter the server IP address as 10.10.100.254, which is the default IP address of the module. Enter the
server port number as 8899, which is the default TCP port number the module listens on. Click
"Connect" to establish a TCP connection.
By now, we can test data transmission between the serial ports and network:
Data flow from the serial port to the network:
Computer serial port → UART-WIFI232-B2 serial port → WIFI/Ethernet of UART-WIFI232-B2 →
Computer network.
The data flow from the network to the serial port is:
Computer network -> UART-WIFI232-B2 WiFi/Ethernet -> UART-WIFI232-B2 serial port ->
Computer serial port. The specific demonstration is shown in the following figure:

UART-WIFI232-B2 User Manual
www.waveshare.com
10
Figure Serial port/network transmission test
3. OVERVIEW
3.1 INTRODUCTION
The UART-WIFI232-B2 serial server supports UART-to-Wi-Fi, allowing you to convert a serial port
into a TCP/IP network port. This enables bidirectional transparent data transmission between the
serial interface and Wi-Fi. This enables serial devices to immediately have TCP/IP network interface
functions, connect to the network for data communication, greatly expanding the communication
distance of serial devices, as shown in the following figure:
Figure Basic functions of serial server
Users do not need to worry about specific details. The module completes protocol conversion
internally, and can achieve bidirectional data transmission between the serial port and WIFI through
simple settings.
3.2 ELECTRICAL PARAMETER
Table Electrical Parameters
Name
Item
Index
Wireless
standards
802.11b/g/n
Frequency range
2.412GHz-2.484GHz
Transmitting
802.11b:+19dBm(Max.@11Mbps)

UART-WIFI232-B2 User Manual
www.waveshare.com
11
WIRELESS
SPECIFICATION
power
802.11g:+18dBm(Max.@54Mbps)
+17dBm(Max.@HT20,MCS7)
+17dBm(Max.@HT40,MCS7)
Configured by users
Receiving
sensitivity
802.11b:-89dBm(@11Mbps)
802.11g:-81dBm(@54Mbps)
802.11n:-73dBm(@HT20,MCS7)
-71dBm(@HT40,MCS7)
HARDWARE
SPECIFICATION
Data port
UART: 300~460.8Kbps
Network port
Ethernet (adapted by pin headers):
10Mbps/100Mbps
Operating
voltage
3.2V~3.6V
Operating
temperature
-40℃~85℃
Dimensions
25*40*8mm(L*W*H)
SOFTWARE
SPECIFICATION
Wireless network
Station/AP/AP+Station mode
Security
mechanism
WPA PSK/WPA2 PSK
Encryption type
TKIP/AES
Operating mode
transparent transmission mode, protocol
transmission mode
Command setting
AT+Command Structure
Protocol
TCP/UDP/ARP/ICMP/DHCP/DNS/HTTP/MQTT
Maximum TCP
connections
24
User
Configuration
Web Server+AT Command Configuration
Customer
application
software
Support customer customization of application
software
3.3 PRODUCT APPEARANCE
The following image shows the appearance of UART-WIFI232-B2:

UART-WIFI232-B2 User Manual
www.waveshare.com
12
Figure Product Appearance
3.4 ANTENNA
The module defaults to the external antenna version, which can be connected to the matching
WiFi antenna externally through the IPEX connector. If users need to switch to the on-board PCB
antenna, they can modify the pads at the red box to switch.

UART-WIFI232-B2 User Manual
www.waveshare.com
13
3.4 INTERFACE DESCRIPTION
Description
Network
Name
PIN
Network
Name
Description
Ethernet output+
PHY_TX+
13
14
PHY_TX-
Ethernet output-
Ethernet input+
PHY_RX+
11
12
PHY_RX-
Ethernet input-
Module startup status
indications
nReady
9
10
nReload
Restore factory settings
Module Reset
RESET
7
8
nLink
WiFi status indications

UART-WIFI232-B2 User Manual
www.waveshare.com
14
UART request to send signal
UART_RTS
5
6
UART_CTS
UART allowed to send
signal
UART sends data
UART_TXD
3
4
UART_RXD
UART receives data
GND
GND
1
2
3.3V
VCC 3.3V(350mA)
Pin
Description
Network
Name
Type
Note
1
GND
GND
Power
Ground
2
VCC 3.3V@350mA
3.3V
Power
External power: 3.3V@ 350mA
3
UART sends data
UART_TXD
O
Note: The GPIO port is a reserved functional
interface and is temporarily unavailable.
GPIO
GPIO3
I/O
4
UART receives data
UART_RXD
I
GPIO
GPIO4
I/O
5
UART request to
send a signal
UART_RTS
O
GPIO
GPIO5
I/O
6
UART allowed to
send signal
UART_CTS
I
GPIO
GPIO6
I/O
7
Module reset
RESET
I
Low-level reset, reset time > 300ms.
8
WIFI status
indications
nLink
O
When WIFI is connected, output "0";
otherwise, output "1".
GPIO
GPIO8
I/O
9
Module startup
indications
nReady
O
After the module has completed startup, output
"0" (or heartbeat signal); otherwise, output "1".
GPIO
GPIO9
I/O
10
Factory restore
setting
nReload
I
Pins must be pulled up through a resistor
(4.7K~10K).
Input low level "0" pulled high after more than
3 seconds, module restores factory settings and
restarts.
GPIO
GPIO10
I/O

UART-WIFI232-B2 User Manual
www.waveshare.com
15
11
Ethernet input +
PHY_RX+
I
Current driving mode.
Supports direct connection with an external
transformer; also supports Ethernet AC
coupling mode without an external transformer.
12
Ethernet input -
PHY_RX-
I
13
Ethernet output +
PHY_TX+
O
14
Ethernet output -
PHY_TX-
O
3.5 OUTLINE DIMENSIONS
Figure Outline dimensions
3.7 APPLICATION SCENARIOS
The application scenarios of UART-WIFI232-B2 is as shown below:
The seial port (RS232/485) to WiFi/ETH are as follows:
WiFi remote control/monitor, TCP/ip AND WiFi co-processor.
WIFI remote control in the field of toys such as airplanes and cars.
WIFI network radio, camera, digital photo frame;
Medical instrument, data acquisition device, handheld devices.
Wi-Fi body fat scale, smart card terminal and smart home.
Instruments and meters, equipment parameter monitoring, wireless POS machine;

UART-WIFI232-B2 User Manual
www.waveshare.com
17
4. PRODUCT PARAMETERS SETTING
The UART-WIFI232-B2 serial server supports AT command and Web parameter setting. For the
setting of AT command, please refer to the chapter of "AT instruction set" in the document. This
chapter mainly explains how to set up the Web.
4.1 WEB MANAGEMENT PAGE
When using UART-WIFI232-B2 serial server for the first time, it is necessary to configure the WIFI
serial server. You can connect the AP interface of UART-WIFI232-B2 through a PC and configure it
with a web management page.
By default, the AP interface SSID of UART-WIFI232-B2 is Waveshare_xxxx, and the IP address,
user name and password are as follows:
Table Network Default Settings
Specifications
Default
SSID
Waveshare_xxxx
IP Address
10.10.100.254
subnet mask
255.255.255.0
user name
admin
password
admin
4.1.1 OPEN THE MANAGEMENT PAGE
Firstly, connect UART-WIFI232-B2 with the wireless network card of PC, and the SSID is
Waveshare_xxxx. When connected, open the browser, enter 10.10.100.254 in the address bar and
press enter. Fill in the user name and password in the pop-up dialog box, and then "confirm".
Figure the second step of opening the management web page
Then; The UART-WIFI232-B2 management page supports Chinese and English, and can be set in
the upper right corner. It is divided into 9 pages, namely, quick configuration, mode selection,

UART-WIFI232-B2 User Manual
www.waveshare.com
18
wireless access point settings, wireless terminal settings, serial port and network settings, Ethernet
function settings, HTTPDClient mode, advanced settings and module management.
4.1.2 QUICK CONFIGURATION PAGE
Figu
re Quick Setup Page
The quick configuration page provides a method for users to quickly configure UART-WIFI232-B2
serial server. After configuring the parameters according to the steps on the page and restarting the
WIFI serial server, the WIFI serial server can work normally, which reduces the steps and time of
configuration. Of course, there are fewer options on this page, and the detailed configuration should
be configured on the corresponding page.
This page has five options to configure and a restart item, which are explained below:
Wireless configuration: configure the working mode of WIFI, AP or STA mode.
Ethernet function configuration: Enable/disable Ethernet port and set corresponding working
mode.
Serial port configuration: configure serial port parameters, including serial port baud rate, parity
bit, 485 function and so on.
Network configuration: configure network parameters, only related parameters of SocketA.
MQTT configuration: configure MQTT enabling and MQTT connection server related parameters.

UART-WIFI232-B2 User Manual
www.waveshare.com
19
Module management: When all the above parameters are configured, click Restart to restart the
module.
4.1.3 MODE SELECTION PAGE
The first page of the Web can be set to select UART-WIFI232-B2 serial server to work in AP mode
or STA mode.
"Data transmission mode" the working modes of WIFI serial server are transparent transmission
mode, serial command mode, HTTPDClient mode and ModbusTCP<=>ModbusRTU mode.
Figure wireless mode settings
4.1.4 WIRELESS ACCESS POINT SETTINGS PAGE
UART-WIFI232-B2 supports AP interface, through which the WIFI serial server can be managed
very conveniently, and the self-organizing network can be realized. The management page is shown
below. Including the setting of SSID, wireless network mode and wireless security, and the setting of
local area network composed of AP.

UART-WIFI232-B2 User Manual
www.waveshare.com
20
Figure Access point settings
4.1.5 WIRELESS TERMINAL SETTINGS PAGE
Wireless terminal interface, also known as STA interface. UART-WIFI232-B2 can be connected to
other wireless networks through the STA interface, as shown in the following figure:
The settings on this page include two tables. The top one is the wireless settings for STA,
including the SSID of the AP to be connected, security settings, etc. The following table shows the
network connection mode settings, including DHCP and static connection mode.
Table of contents
Other Waveshare Network Hardware manuals