USR IOT USR-C321 User manual

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
1
1
1
1
/
41
41
41
41
USR-C32
USR-C32
USR-C32
USR-C32 1
1
1
1
-
-
-
-Low
Low
Low
Low Power
Power
Power
Power Minisize
Minisize
Minisize
Minisize WiFi
WiFi
WiFi
WiFi Module
Module
Module
Module User
User
User
User Manual
Manual
Manual
Manual
V1.
V1.
V1.
V1. 1
1
1
1
Support [email protected] GHz 802.11 b/g/n wireless standards
Support WEP
、
WPA/WPA2 security mode
Support AP/STA working mode
Based on ARM Cortex-M4 kernel running frequency of 80 MHZ
Fully integrated serial port turn wireless TCP/UDP transmission function,the rate of serial
port up to 3M bps
Support 485 Control
Search in local area network (LAN) and wireless parameter s setting function
Support TCP/UDP Client registered packet mechanism
Support Simplelink/usrlink Networking configuration
Support c ustom web function
Support similar RFC2217 automatic baud rate adaptation function
Support AT+ simple instruction set configuration
Single 3.3 V power supply
Ultra low power mode, support deep dormancy
Support Internal/External(I-PEX) Antenna Option
Minisize:18.22mm*26.65mm*2.8mm SMT
FCC/CE Certificated

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
2
2
2
2/41
41
41
41
Catalogue
Catalogue
Catalogue
Catalogue
1
1
1
1
、
、
、
、
Module
Module
Module
Module Overview
Overview
Overview
Overview ..............................................................................................................................
..............................................................................................................................
..............................................................................................................................
.............................................................................................................................. 3
3
3
3
1.1
1.1
1.1
1.1 Module
Module
Module
Module Overview
Overview
Overview
Overview
.......................................................................................................................
.......................................................................................................................
.......................................................................................................................
.......................................................................................................................
3
3
3
3
1.2
1.2
1.2
1.2 Characteristics
Characteristics
Characteristics
Characteristics of
of
of
of Module
Module
Module
Module
.......................................................................................................
.......................................................................................................
.......................................................................................................
.......................................................................................................
3
3
3
3
1.3
1.3
1.3
1.3 Product
Product
Product
Product Feature
Feature
Feature
Feature
.........................................................................................................................
.........................................................................................................................
.........................................................................................................................
.........................................................................................................................
4
4
4
4
1.4
1.4
1.4
1.4 Application
Application
Application
Application Area
Area
Area
Area
........................................................................................................................
........................................................................................................................
........................................................................................................................
........................................................................................................................
5
5
5
5
2
2
2
2
、
、
、
、
Hardware
Hardware
Hardware
Hardware Description
Description
Description
Description ......................................................................................................................
......................................................................................................................
......................................................................................................................
...................................................................................................................... 6
6
6
6
2.1
2.1
2.1
2.1 Pin
Pin
Pin
Pin Definitions
Definitions
Definitions
Definitions
............................................................................................................................
............................................................................................................................
............................................................................................................................
............................................................................................................................
6
6
6
6
2.2
2.2
2.2
2.2 Antenna
Antenna
Antenna
Antenna Shows
Shows
Shows
Shows
..........................................................................................................................
..........................................................................................................................
..........................................................................................................................
..........................................................................................................................
7
7
7
7
2.3
2.3
2.3
2.3 Size
Size
Size
Size and
and
and
and Layout
Layout
Layout
Layout Recommendations
Recommendations
Recommendations
Recommendations
....................................................................................
....................................................................................
....................................................................................
....................................................................................
8
8
8
8
2.4
2.4
2.4
2.4 The
The
The
The Hardware
Hardware
Hardware
Hardware Circuit
Circuit
Circuit
Circuit Design
Design
Design
Design Reference
Reference
Reference
Reference
............................................................................
............................................................................
............................................................................
............................................................................
9
9
9
9
3
3
3
3
、
、
、
、
Product
Product
Product
Product Function
Function
Function
Function ............................................................................................................................
............................................................................................................................
............................................................................................................................
............................................................................................................................ 11
11
11
11
3.1
3.1
3.1
3.1 Work
Work
Work
Work Mode
Mode
Mode
Mode
................................................................................................................................
................................................................................................................................
................................................................................................................................
................................................................................................................................
11
11
11
11
3.2
3.2
3.2
3.2 Wireless
Wireless
Wireless
Wireless Network
Network
Network
Network Mode
Mode
Mode
Mode
.........................................................................................................
.........................................................................................................
.........................................................................................................
.........................................................................................................
12
12
12
12
3.3
3.3
3.3
3.3 Socket
Socket
Socket
Socket Communication
Communication
Communication
Communication
.........................................................................................................
.........................................................................................................
.........................................................................................................
.........................................................................................................
13
13
13
13
3.4
3.4
3.4
3.4 Custom
Custom
Custom
Custom web
web
web
web function
function
function
function
.............................................................................................................
.............................................................................................................
.............................................................................................................
.............................................................................................................
14
14
14
14
3.5
3.5
3.5
3.5 Search
Search
Search
Search in
in
in
in local
local
local
local area
area
area
area network
network
network
network
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
14
14
14
14
3.6
3.6
3.6
3.6 TCP/UDP
TCP/UDP
TCP/UDP
TCP/UDP Client
Client
Client
Client Registration
Registration
Registration
Registration Packet
Packet
Packet
Packet Mechanism
Mechanism
Mechanism
Mechanism
..........................................................
..........................................................
..........................................................
..........................................................
15
15
15
15
3.7
3.7
3.7
3.7 Fast
Fast
Fast
Fast Access
Access
Access
Access Wi-Fi(usrlink)
Wi-Fi(usrlink)
Wi-Fi(usrlink)
Wi-Fi(usrlink)
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
15
15
15
15
3.8
3.8
3.8
3.8 Simplelink
Simplelink
Simplelink
Simplelink Configuration
Configuration
Configuration
Configuration
......................................................................................................
......................................................................................................
......................................................................................................
......................................................................................................
18
18
18
18
3.9
3.9
3.9
3.9 RFC2217
RFC2217
RFC2217
RFC2217 Automatic
Automatic
Automatic
Automatic Baud
Baud
Baud
Baud Rate
Rate
Rate
Rate Function
Function
Function
Function
.........................................................................
.........................................................................
.........................................................................
.........................................................................
18
18
18
18
3.10
3.10
3.10
3.10 Sleep
Sleep
Sleep
Sleep Mode
Mode
Mode
Mode Introduction
Introduction
Introduction
Introduction
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
19
19
19
19
4
4
4
4
、
、
、
、
Parameter
Parameter
Parameter
Parameter Setting
Setting
Setting
Setting ...........................................................................................................................
...........................................................................................................................
...........................................................................................................................
........................................................................................................................... 21
21
21
21
4.1
4.1
4.1
4.1 Web
Web
Web
Web Page
Page
Page
Page Configuration
Configuration
Configuration
Configuration
.......................................................................................................
.......................................................................................................
.......................................................................................................
.......................................................................................................
21
21
21
21
4.2
4.2
4.2
4.2 AT+
AT+
AT+
AT+ Commands
Commands
Commands
Commands Configuration
Configuration
Configuration
Configuration
............................................................................................
............................................................................................
............................................................................................
............................................................................................
28
28
28
28
5
5
5
5
、
、
、
、
service
service
service
service and
and
and
and support
support
support
support .......................................................................................................................
.......................................................................................................................
.......................................................................................................................
....................................................................................................................... 40
40
40
40
Appendix
Appendix
Appendix
Appendix A:
A:
A:
A: Contact
Contact
Contact
Contact Information
Information
Information
Information
.....................................................................................................
.....................................................................................................
.....................................................................................................
.....................................................................................................
41
41
41
41
Appendix
Appendix
Appendix
Appendix B:
B:
B:
B: Disclaimer
Disclaimer
Disclaimer
Disclaimer
......................................................................................................................
......................................................................................................................
......................................................................................................................
......................................................................................................................
41
41
41
41
Appendix
Appendix
Appendix
Appendix C:
C:
C:
C: Update
Update
Update
Update History
History
History
History
..............................................................................................................
..............................................................................................................
..............................................................................................................
..............................................................................................................
41
41
41
41

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
3
3
3
3/41
41
41
41
1
1
1
1、
、
、
、Module
Module
Module
Module Overview
Overview
Overview
Overview
1.1
1.1
1.1
1.1 Module
Module
Module
Module Overview
Overview
Overview
Overview
USR - C321 is a low-cost module of the series wifi module C32 x.The module is a low-power
802.11 b/g/n modules that design for achieving the application of the embedded system,
wireless network communication. Through the module, the customer can set a physical device
connected to a wifi network, so as to realize the control and management of the Internet of iot.
The hardware of module integrate MAC, baseband chip, rf transceiver unit, as well as the
power amplifier; Adopting CC3200 chip of TI company, the kernel of industrial-grade ARM
architecture (M4 kernel, running frequency of 80 MHZ. The internal ultra-low power operation
mechanism, can run effectively low-power module; Support WiFi protocol and TCP/IP protocol,
the user only needs simple configuration, can achieve the function of UART devices connected
to the Internet.
Small size, easy to welding in the customer product veneer of hardware circuit. And the
module can choose the application of the internal or external antenna, supplying customers
multiple choices.
Module size: 18.22 mm * 26.65 mm * 2.8 mm SMT assembly
The basic function of the module is described below:
Can work in AP mode for other WIFI devices access communication, can also work in
the STA mode, access to the wireless router to realize communication
With a Socket communication links, can be set to the TCP Server, TCP Client, and UDP
Server, UDP Client communication; The Socket in the TCP Server mode, can support
up to four TCP Client connection
Module supports UART translate, can use AT commands to arbitrary switching.
If you have problems when use the module,you can submit the question to
http://h.usriot.com
http://h.usriot.com
http://h.usriot.com
http://h.usriot.com .We will solve your question at the first time .
1.2
1.2
1.2
1.2 Characteristics
Characteristics
Characteristics
Characteristics of
of
of
of Module
Module
Module
Module
Support [email protected] GHz 802.11 b/g/n wireless standards
Support WEP-A
、
WPA/WPA2 security mode
Support AP/STA working mode
Based on ARM Cortex-M4 kernel running frequency of 80 MHZ
Fully integrated serial port turn wireless TCP/UDP transmission function,the rate of serial
port up to 3M bps
Support 485 control
Search in local area network (LAN) and wireless parameter s setting function
Support TCP/UDP Client registered packet mechanism
Support Simplelink/usrlink Networking configuration
Support similar RFC2217 automatic baud rate adaptation function
Support AT+ simple instruction set configuration

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
4
4
4
4/41
41
41
41
Single 3.3 V power supply
Ultra low power mode, support deep dormancy
Support Internal/External(I-PEX) Antenna Option
Minisize:18.22mm*26.65mm*2.8mm SMT
FCC/CE Certificated
1.3
1.3
1.3
1.3 Product
Product
Product
Product Feature
Feature
Feature
Feature
Module parameters
classify parameter value
Wireless P ara
meter
Certification FCC/CE
Wlan S tandard 802.11 b/g/n
T ransmit P ower
17.0 dBm @ 1 DSSS
17.25 dBm @ 11 CCK
13.5 dBm @ 54 OFDM
R eceive
S ensitivity
– 94.7 dBm @ 1 DSSS
– 87.0 dBm @ 11 DSSS
– 73.0 dBm @ 54 OFDM
A ntenna
External : I-PEX
Internal : On-board antenna
Hardware
D ata I nterface UART 300-3M bps
W orking V oltage 3.0V~3.6V
W orking C urrent
(voltage 3.3 V )
Continue to send : ~75mA
normal mode : average: ~18mA ,top: 200mA
In the web : 3.5mA
Standby : lowest 25uA
W orking
T emperature
- 40 ℃- 85 ℃
S torage
T emperature
-45 ℃- 125 ℃
S ize 18.22mm*26.65mm*2.8mm
Footprint SMT
S oftware
Wireless
N etwork T ype
AP/STA
S ecurity R egime WEP/WPA-PSK/WPA2-PSK
Encryption Type TKIP , AES , TKIP/AES
N etworking
P rotocol
IPv4, TCP/UDP
User
Configuration
AT+ instruction set
Web

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
5
5
5
5/41
41
41
41
1.4
1.4
1.4
1.4 Application
Application
Application
Application Area
Area
Area
Area
Cloud C onnected
H ome A utomation
H ousehold A ppliances
A ccess C ontrol
S ecurity and P rotection S ystem
Smart Energy
I ndustrial C ontrol
I ntelligent E lectrical O utlet B ox/ I nstrument M easurement
IP N etwork S ensor N odes
W ireless P rinter

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
6
6
6
6/41
41
41
41
2
2
2
2、
、
、
、Hardware
Hardware
Hardware
Hardware Description
Description
Description
Description
2.1
2.1
2.1
2.1 Pin
Pin
Pin
Pin Definitions
Definitions
Definitions
Definitions
The module pin
P in Net Name F unctional D escription
1 GND GND
2 GPIO General GPIO
3 GPIO General GPIO
4 nReset Module reset pin, low level effectively
5 SOP2
Start the choice, see 2.4
2.4
2.4
2.4 The
The
The
The Hardware
Hardware
Hardware
Hardware Circuit
Circuit
Circuit
Circuit Design
Design
Design
Design
Reference
Reference
Reference
Reference
6 SOP1 default NC
7 SOP0 default NC
8 ANA DC-DC The RF power output pin, hung up
9 NC NC
10 NC NC
11 GND GND
12 GND GND
13 VBT_CC Power input pin, please connect + 3.3 V

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
7
7
7
7/41
41
41
41
14 VDD_ANA2 RF Power input pin, please connect + 3.3 V
15 GPIO General GPIO
16 NC NC
17 GND GND
18 GPIO General GPIO
19 UART TX UART TX for
module
20 UART RX UART RX for module
21 nReload
Down 1-3 Seconds start simplelink setting.
Down more 3 seconds set the Module to factory default
setting
22 nReady
Work instructions pin of module, low effective, connect an
external LED
23 nLink
WiFi link pin of module, low effective, connect an external
LED
24 UART CTS A serial port flow control pin CTS
25 UART RTS A serial port flow control pin RTS
26 GPIO General GPIO
27 GPIO General GPIO
28 GND GND
29 GND GND
30 GPIO General GPIO
31 GPIO General GPIO
32 GPIO General GPIO
33 GPIO General GPIO
34 GPIO General GPIO
35 GPIO General GPIO
36 GPIO General GPIO
37 GPIO General GPIO
38 GPIO General GPIO
39 NC NC
40 NC NC
41 GPIO General GPIO
42 NC NC
43 NC NC
44 GND GND
2.2
2.2
2.2
2.2 Antenna
Antenna
Antenna
Antenna Shows
Shows
Shows
Shows
Module has two antenna version, internal antenna and external IPEX interface respectively:

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
8
8
8
8/41
41
41
41
Internal Antenna External:I-PEX
2.3
2.3
2.3
2.3 Size
Size
Size
Size and
and
and
and Layout
Layout
Layout
Layout Recommendations
Recommendations
Recommendations
Recommendations
Advise PCB F ootprint :
Cloth plate specification:
1) Internal Antenna
Customers to use the internal antenna, the need to abide by the following
considerations and internal antenna module placed general rules:
On the user's PCB, and grey shaded area above the corresponding area cannot be

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
9
9
9
9/41
41
41
41
placed components and GND.
Antennas away from the metal, at least distance with high components around
more than 10 mm;
Antenna part cannot be metal shell, plastic shell need at least more than 10 mm
away from the antenna;
It is suggested that module is placed in the following areas of the user's board as far
as possible, to reduce the influence of the antenna and wireless signal, and at the same
time, please consult someone technical support staff to assist the placement of
modules and related areas of the Layout design.
2) external antenna
Customers to use external antenna lead, according to the requirement of the
IEEE802.11 b/g/n standard, need to connect the 2.4 g external antenna. External antenna
using IPEX interface. The parameters of the external antenna requirements in the table
below details.
item paramter
frequency range 2.4~2.5GHz
impedance 50 Ohm
VSWR 2 (Max)
Return Loss -10dB (Max)
Connection Type IPEX
2.4
2.4
2.4
2.4 The
The
The
The Hardware
Hardware
Hardware
Hardware Circuit
Circuit
Circuit
Circuit Design
Design
Design
Design Reference
Reference
Reference
Reference
The hardware design considerations:
Need to add more than 200uf capacitance module power supply pin.
SOP0 、SOP1 、no connect .
SOP2 reserved a port,used to upgrade firmware in uart0
Reset 、Reload n eed to pick up on the 4.7 K resistor.
nLink,nReady Effective for low level output.
Serial port RXD, TXD series a 0 Ωresistance
Serial port RXD, TXD need to pick up on the 10K resistor.

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
11
11
11
11 /41
41
41
41
3
3
3
3、
、
、
、Product
Product
Product
Product Function
Function
Function
Function
3.1
3.1
3.1
3.1 Work
Work
Work
Work Mode
Mode
Mode
Mode
Module consists of two work modes: translate mode and command mode
Translate
Translate
Translate
Translate Mode
Mode
Mode
Mode
In this mode, the module realizes the UART and transparent transmission between
network, realize common serial data transfer between devices and network equipment.
Command
Command
Command
Command Mode
Mode
Mode
Mode
In this mode, the user can through the AT command to UART module and query
and network parameters Settings. When using the AT + ENTM exit command mode,
the default back to translate mode.
3.1.1
3.1.1
3.1.1
3.1.1 Translate
Translate
Translate
Translate Mode
Mode
Mode
Mode
1.
1.
1.
1. Translate
Translate
Translate
Translate Mode
Mode
Mode
Mode
UART interface can transparent transmission mode has the advantage of UART
interface and network communication of the plug and play, which reduce the complexity of
the user to a great extent. Modules to work in a transparent transmission mode, the users
only need to configure the necessary parameters, UART interface and network
communication can be realized. After power on, module automatically connected to the
wireless network and server configured.
Transparent transmission mode is fully compatible with your own software platform,
reducing the workload of integration of wireless data transmission software development.
Users need to preset parameters usually include:
Wireless network parameters
SSID
security mode
secret key
TCP/UDP parameter
protel
connection type
destination port
destination address
UART parameter
Baud rate
data bits
stop bit
parity bit
Hardware flow control
2.
2.
2.
2. UART
UART
UART
UART Frame
Frame
Frame
Frame Scheme
Scheme
Scheme
Scheme
Module in the receiving UART data, will continue to check the time interval of two
adjacent bytes. If the time interval is greater than the set packing time (default 5 ms, can be

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
12
12
12
12 /41
41
41
41
set up by the
AT
+ UARTTE), argues that the end of a frame, or has been receiving data, in
command mode is greater than 1 k bytes are discarded the received data, in translate mode
is greater than 1 k bytes are sent packing.
3.1.2
3.1.2
3.1.2
3.1.2 Command
Command
Command
Command Mode
Mode
Mode
Mode
In command mode, the module will no longer work to translate, UART port
AT
this time
for receiving the
AT
command, the user can through UART port to send
AT
commands to
module, UART for querying and setting module, network and other related parameters.
3.2
3.2
3.2
3.2 Wireless
Wireless
Wireless
Wireless Network
Network
Network
Network Mode
Mode
Mode
Mode
There are two kinds of wireless module WIFI working mode: the
STA
and
AP,
can
provide users with flexible network mode and the network topology method.
< Nouns that >
AP:The wireless access point, is the center of a wireless network node. Commonly
used wireless router is an
AP,
other wireless terminal can be interconnected by AP
STA: wireless site, is a wireless network terminal. Such as notebook computer, PDA,
etc.
3.2.1
3.2.1
3.2.1
3.2.1 Module
Module
Module
Module As
As
As
As a
a
a
a STA
STA
STA
STA
Module as the
STA
is one of the most commonly used network mode, and is composed
of a router AP and many STA, the following figure. Its characteristic is AP in a central
position, communication between the
STA
forward by
AP.
3.2.2
3.2.2
3.2.2
3.2.2 Module
Module
Module
Module As
As
As
As a
a
a
a AP
AP
AP
AP
Modules as AP mode, can achieve phone/PAD/computer without any configuration, fast
access module for data transmission. In addition, you can login module internal web page
to set parameters

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
13
13
13
13 /41
41
41
41
<
<
<
< note
note
note
note >
>
>
>: module in AP mode, can support only 1
STA
access devices.
3.2.3
3.2.3
3.2.3
3.2.3 Encryption
Encryption
Encryption
Encryption Type
Type
Type
Type
Encryption is scrambling to message data, ensure the security of data transmission,
increase the security of communication. Support multiple wireless network encryption
methods, including:
WEP
WPA-PSK/TKIP
WPA-PSK/AES
WPA2-PSK/TKIP
WPA2-PSK/AES
3.3
3.3
3.3
3.3 Socket
Socket
Socket
Socket Communication
Communication
Communication
Communication
The module has a TCP Socket. When the module in translate mode, to write the data of
the UART interface module, module will automatically send a Socket; Module through
the Socket received data, send out through the UART interface.
Socket works include: the TCP Server, the TCP Client, UDP Client, and UDP Server,
please refer to the
AT
command set method in the
AT
+ SOCKA instruction set or
through a web page Settings.
When a TCP Server Socket set, can support up to four TCP Client TCP link connection.
In a multiple TCP link connection mode, from the TCP transport data will be forwarded
to them one by one on the UART interface. Come from the UART interface data will be
copied into a more, in every TCP forwarding a link. Specific data flow diagram shown
below:

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
14
14
14
14 /41
41
41
41
When the Socket set to UDP Server, if a serial port receives data first, module sends
the data to the already set
IP,
port
(AT
+ SOCKA set), if the UDP Server receives data,
data source address, the module will remember after a serial port, after receipt of the
data module will be transmitted to the address data.
When the module is set to the UDP Client module only to have set the IP and port to
send data, and receive only has set the IP and port address data
(AT
+ SOCKA
Settings), other address to send more data is not forwarded to the UART.
3.4
3.4
3.4
3.4 Custom
Custom
Custom
Custom web
web
web
web function
function
function
function
USR
-
C322 support Custom web function. User can modify the web page content or add
your own web page. Please refer to the specific implementation method " reference : USR-C32 1
custom ed web function ".
3.
3.
3.
3. 5
5
5
5 Search
Search
Search
Search in
in
in
in local
local
local
local area
area
area
area network
network
network
network
Module support within the local area network (LAN) search function, that is, when the
module is connected to a wireless router, the user can through to a fixed port sends UDP
broadcast way, to get the IP address of the module of the current, in order to realize the search
and communications equipment. SEARCH the port and keyword can be set by the
AT
+
SEARCH commands, default: 48899, www.usr.cn.
Search tool operation process:
1. Through the UDP broadcast (broadcast address: xx. Xx. Xx. 255, port: 48899) to send a
password, the default password is: "www.usr.cn", the longest can be set up 20 bytes.
2. Module after receiving the password, if the password is correct, the module to enter
configuration mode, to the address (unicast, source port) send the local IP address, MAC
address, the module name, version number.
(IP,
MAC, MID, ver 10.10.100.254,
D8B04CFC0000, USR - C321, 01.01.10). Module to enter configuration mode set if not
received within 30 seconds after the command, the module will exit the configuration mode, the
user needs to send search command word, enter configuration mode.

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
15
15
15
15 /41
41
41
41
3. Users can through the network to the port to send
AT
commands to set up and read the
module working state, the
AT
command format with a serial port the
AT
command.
Note: search tools and modules must be within the same LAN, if multiple
STA
even on a
router, run the search tools of the computer and even on the router. This search tool to search
all of the STA.
3.
3.
3.
3. 6
6
6
6 TCP/UDP
TCP/UDP
TCP/UDP
TCP/UDP Client
Client
Client
Client Registration
Registration
Registration
Registration Packet
Packet
Packet
Packet Mechanism
Mechanism
Mechanism
Mechanism
When the module working in TCP or UDP Client Client mode, the user can open registration
packet mechanism, in order to realize the server to the distinction between the data source,
data of different equipment monitoring. MAC and ID registration packet is divided into two kinds,
MAC is 6 bytes, ID 0-65535, ID value can be set. Registration packet ID is mainly used for the
D2D software of the company..
Registered packet opened and closed by
AT
+ REGENA.
Registered packet implementation mechanism is as follows:
TCP Client: There are two kinds of TCP Client: registration mechanism:
1Just send a registration packet, when the module is connected to the TCP Server
module will send TCP Server MAC (6 bytes) or ID (4 bytes), Server by MAC or ID to
distinguish between different devices.
2Every packet of data has registration information, TCP Client after the link to the server,
a serial port receives each packet of data to increase MAC or ID, to distinguish between
equipment. ID or MAC choice, can be set by the
AT
+ REGENA.
UDP Client: each module on the sending UDP packets, MAC or ID will increase in each
packet header information, and then send.
3.
3.
3.
3. 7
7
7
7 Fast
Fast
Fast
Fast Access
Access
Access
Access Wi-Fi(usrlink)
Wi-Fi(usrlink)
Wi-Fi(usrlink)
Wi-Fi(usrlink)
When one module works in AP mode, it opens a UDP port used to receive fast access Wi-Fi
commands, the port number is 49000. The phone PDA can directly connect to Wi-Fi network of
the module, send commands to search router list and set SSID and password. After the
completion of set up, module will automatically restart, connected to the router, work in the STA
mode at this time.
Protocol format:
Searching command
No Name Num of Bytes Description
1 head 1 fixed value:0xFF
2 length 2 Sum of data bytes from length bytes to check
byte(not contain length bytes and check byte).

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
16
16
16
16 /41
41
41
41
3 cmd 1 Command type, 0x01
4 check 1 Sum of bytes from head (not contained) byte to
check byte (not contained).
Response for searching
No Name Num of Bytes Description
1 head 1 fixed value:0xFF
2 length 2 Sum of data bytes from length bytes to check
byte(not contain length bytes and check byte).
3 cmd 1 Command type, 0x81
4 AP num 1 The number of AP what module scans
5 SSID1 Unsized The SSID of router 1
6 separator 1 Separator of SSID1, fixed value:0x00
7 Signal
strength1
1 Signal strength of router 1,0~100:0%~100%
8 separator 2 Separator of signal strength1, fixed value:
0x0D,0x0A
… … … ………
M SSID n Unsized The SSID of router n
M+1 separator 1 Separator of SSID n, fixed value:0x00
M+2 Signal
strength
1 Signal strength of router n,0~100:0%~100%
M+3 separator 2 fixed value:0x0D,0x0A
M+4 check 1 Sum of bytes from head (not contained) byte to
check byte (not contained).
Example:
Data from phone PDA to module (HEX): FF 00 01 01 02
Data from module to phone PDA (HEX): FF 00 14 81 02 54 45 53 54 31 00 40 0D 0A 54 45
53 54 32 00 37 0D 0A 1F

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
17
17
17
17 /41
41
41
41
Explanation:
The phone PDA send searching command to module, the response from module is: SSID
of router1 is “ TEST1 ” , signal strength of router1 is 64%; SSID of router2 is “ TEST2 ” , signal
strength of router2 is 55%.
Note: The information of routers is ordered by signal strength.
a) Setting Command
No Name Num of Bytes Description
1 head 1 fixed value:0xFF
2 length 2 Sum of data bytes from length bytes to check byte
(not contain length bytes and check byte).
3 cmd 1 Command type, 0x02
4 reserve 1 fixed value:0x00
5 SSID Unsized SSID of router
6 separator 2 fixed value:0x0D,0x0A
7 password Unsized Password of router
8 check 1 Sum of bytes from head (not contained) byte to
check byte (not contained).
Response for Setting
No Name Num of Bytes Description
1 head 1 fixed value:0xFF
2 length 2 Sum of data bytes from length bytes to check
byte(not contain length bytes and check byte).
3 cmd 1 Command type, 0x82
4 Check for
SSID
1 If the SSID set by PDA exist, check value is 0x01,
otherwise is 0x00.
5 Check for
password
1 If the form of password set by PDA is correct, check
value is 0x01, otherwise is 0x00.
6 check 1 Sum of bytes from head (not contained) byte to

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
18
18
18
18 /41
41
41
41
check byte (not contained).
Example:
Data from phone PDA to module (HEX): FF 00 0F 02 00 54 45 53 54 31 0D 0A 31 32 33 34
35 36 CE
Data from module to phone PDA (HEX): FF 00 03 82 01 01 87
Explanation:
The phone PDA send setting command to module, SSID is set to “ TEST1 ” , password is set
to “ 123456 ” . The response from module is that the “ TEST1 ” Wi-Fi network exist, the form of
password is correct.
3.
3.
3.
3. 8
8
8
8 Simplelink
Simplelink
Simplelink
Simplelink Configuration
Configuration
Configuration
Configuration
Simplelink function main realization module of intelligent network, namely the quick
connect to the
AP.
Modules work in
STA
and AP mode, lower Reload pin 0 to 3 seconds, the
module get into the Smartconfig configuration, at this time Ready pin output high and low
level of 0.5 Hz. The handheld device connected to the module to connect to the
AP,
open
the
APP,
enter the password, click on "start". Module will automatically restart after
successfully connect to the
AP.
Note
Note
Note
Note : when using the
AT
+ WSTA AP information query module is connected, password
show SAFE, password is not visible.
3.
3.
3.
3. 9
9
9
9 RFC2217
RFC2217
RFC2217
RFC2217 Automatic
Automatic
Automatic
Automatic Baud
Baud
Baud
Baud Rate
Rate
Rate
Rate Function
Function
Function
Function
3.
3.
3.
3. 9
9
9
9 .1
.1
.1
.1 RFC2217
RFC2217
RFC2217
RFC2217 Functional
Functional
Functional
Functional Description
Description
Description
Description
1. RFC2217 is an instant change via Ethernet equipment serial port parameters of a
standard protocol, this device supports a similar RFC2217 agreement, not a standard
RFC2217, realize the same function, but the deal easier.
2. Sends a command to the device after this agreement, if do set serial port parameters
meet the requirements, not return anything, if the calibration error or agreement is
wrong, will be as a common packet via a serial port forwarding.
3. TCP Client, TCP Server, UDP Client, and UDP Server, and broadcast the several
patterns are support this function.
4. This command changes take effect immediately, do not need to restart, when effective,
not save, power is lost.
3.9.2
3.9.2
3.9.2
3.9.2 RFC2217
RFC2217
RFC2217
RFC2217 Protocol
Protocol
Protocol
Protocol Specification
Specification
Specification
Specification
Protocol length is 8 bytes, specific agreement content as follows, for example the value
for the HEX format:

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
19
19
19
19 /41
41
41
41
Attachment: a serial port parameters meaning a bit
Bit num Explain Data describe
1:0 Data bits 00 5 bits
01 6 bits
10 7 bits
11 8 bits
2 Stop bit 0 1 bit
1 2 bits
3 Enabled check 0 Disable check
1 Enable check
5:4 Check type 00 ODD
01 EVEN
10 Mark
11 Clear
7:6 NC 00 Write 0
3.
3.
3.
3. 10
10
10
10 Sleep
Sleep
Sleep
Sleep Mode
Mode
Mode
Mode Introduction
Introduction
Introduction
Introduction
Modules can open low power mode. In module under normal condition, if the network and
uart port for certain time 10-240 seconds
(AT
+ SLPTYPE Settings) does not data
communication module into low power mode. The user can choose different sleep mode (0 to
4).
Ways there are to awaken the network side and serial port: network side refers to establish
the wifi connection, to establish a socket connection with module and send data to the socket, a
serial port end points to a serial port to send data.
For example: set up
AT
+ SLPTYPE = 2,200
When the module network end (refer to the socket end) and a serial port for 200 seconds
didn't receive the data, the module into Deepsleep mode (mode 2).
designation Header Bps Data bit Check
length(bytes) 3 3 1 1
explain
reduce
misjudg
ment
baud rate value,
high in the former
Different bits to
represent different
meanings, see
table
Sum of the
front four
Exam p le
(115200,N,8,
1)
55 AA
55
01 C2 00 83 46
Example
(9600,N,8,1)
55 AA55 00 25 80 83 28

USR-C321 Low Power M inisize WiFi Module User Manual www.usr.so
20
20
20
20 /41
41
41
41
3.
3.
3.
3. 10
10
10
10 .1
.1
.1
.1 Mode
Mode
Mode
Mode Introduction
Introduction
Introduction
Introduction
Mode
Mode
Mode
Mode 0:
0:
0:
0: Active
Active
Active
Active Mode
Mode
Mode
Mode
The Active mode, the system clock is 80 MHZ. Module running various peripherals.
Corresponding mode 0, that is, normal work mode, the module optimal performance.
Mode
Mode
Mode
Mode 1:
1:
1:
1: Sleep
Sleep
Sleep
Sleep Mode
Mode
Mode
Mode
Sleep mode, the system clock to 80 MHZ. Through a serial port or network packets,
gpio port output, module after awakening from entering hibernation continues to run, wake
up the response time shorter than deepsleep mode. Corresponding mode 1.
Mode
Mode
Mode
Mode 2:
2:
2:
2: Deepsleep
Deepsleep
Deepsleep
Deepsleep Mode
Mode
Mode
Mode
Module into deepsleep dormancy, reduced to 40 MHZ system clock. Might wake up via
a serial port or network packets, gpio port output, module after awakening from entering
hibernation continues to run, wake up the response time a bit longer than the sleep mode.
Than the normal operation of the lower power consumption about 5 ma. The corresponding
mode 2.
Mode
Mode
Mode
Mode 3:
3:
3:
3: LPDS
LPDS
LPDS
LPDS Mode
Mode
Mode
Mode
Module into LPDS mode, network part keep running, module gpio port output is high
impedance state. Via a serial port or network packets wake up, wake up after the restart
operation module. Corresponding mode 3.
Mode
Mode
Mode
Mode 4:
4:
4:
4: Hibernate
Hibernate
Hibernate
Hibernate Mode
Mode
Mode
Mode
Module into the hibernate mode, network and MCU are entering sleep mode, gpio port
output high impedance state, only through a serial port data. Module after the restart. Power
consumption can be achieved the uA level. Corresponding mode 4.
3.
3.
3.
3. 10
10
10
10 .2
.2
.2
.2 Power
Power
Power
Power Reference
Reference
Reference
Reference Table
Table
Table
Table
No data transmission module, the power consumption mode reference is as follows:
Power
mode
UART 、GPIO 、network
Wake up mode STA AP
0
UART 、GPIO 、network
working
none 18 mA 74 mA
1
UART 、GPIO 、network
working
Uart,network 13 mA 71 mA
2 UART 、network working Uart,network 9 mA 70 mA
3 UART 、network working Uart,network 3.5 mA 70 mA
4 GPIO (RXD )working Uart(RXD) 24 uA 24 uA
The mode to distinguish the table:
Powe
r
mode
Still working Wakeup source
Run
frequency
MCU WIFI UART GPIO network UART GPIO network
0 80M
1 80M
RXD
2 40M
RXD
3 32.768Khz
RXD
Table of contents
Other USR IOT Network Card manuals