High Flying Electronics Technology HF-A21-SMT Embedded Wi-Fi Module User Manual

High-Flying Electronics Technology Co., Ltd. Embedded Wi-Fi Module

User manual

HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
1
HF-A21-SMT
Embedded WiFi Module User Manual
V1.1
Overview of Characteristic
Support IEEE802.11b/g/n Wireless Standards
Support TCP/UDP/HTTP Network Protocols
Support UART/Ethernet Data Interface
Support Work As STA/AP/AP+STA Mode
Support Router/Bridge Mode Networking
Support AT+ Instruction Set for Configuration
Support Friendly Web Configuration Page
Support Palmodic Signal
Support Smart Link Application Tools
Support UART Free/Auto-Frame Function
Single +3.3V Power Supply
Small Size: 25 x 40mm
FCC/CE Certificated
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
2
FCC STATEMENT :
This device complies with Part 15 of the FCC Rules. Operation is subject to the following two
conditions:
(1) This device may not cause harmful interference, and
(2) This device must accept any interference received, including interference that may cause
undesired operation.
Warning: Changes or modifications not expressly approved by the party responsible for
compliance could void the user's authority to operate the equipment.
NOTE: This equipment has been tested and found to comply with the limits for a Class B digital
device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable
protection against harmful interference in a residential installation. This equipment generates
uses and can radiate radio frequency energy and, if not installed and used in accordance with the
instructions, may cause harmful interference to radio communications. However, there is no
guarantee that interference will not occur in a particular installation. If this equipment does cause
harmful interference to radio or television reception, which can be determined by turning the
equipment off and on, the user is encouraged to try to correct the interference by one or more of
the following measures:
Reorient or relocate the receiving antenna.
Increase the separation between the equipment and receiver.
Connect the equipment into an outlet on a circuit different from that to which the receiver is
connected.
Consult the dealer or an experienced radio/TV technician for help.
FCC Radiation Exposure Statement:
This equipment complies with FCC radiation exposure limits set forth for an uncontrolled
environment. This equipment should be installed and operated with minimum distance 20cm
between the radiator & your body.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
3
TABLE OF CONTENTS
1. PRODUCT OVERVIEW ............................................................................................................... 9
1.1. General Specification ............................................................................................................. 9
1.2. Hardware Introduction .......................................................................................................... 10
1.2.1. Pins Definition .................................................................................................................. 10
1.2.2. Mechanical Size ............................................................................................................... 12
1.2.3. On-board Chip Antenna ................................................................................................... 12
1.2.4.
Evaluation Kit ................................................................................................................... 14
1.2.5.
Order Information ............................................................................................................. 15
1.3.
Hardware Reference Design ................................................................................................ 15
1.3.1.
Hardware Typical Application .......................................................................................... 15
1.3.2.
10/100M Ethernet Interface ............................................................................................. 16
1.3.2.1.
Ethernet Connection with Transformer ........................................................................ 16
1.3.2.2.
Ethernet Connection without Transformer ................................................................... 16
1.3.3.
UART Interface ................................................................................................................ 17
1.3.4.
Power Interface ................................................................................................................ 17
1.4.
Software Reference Design.................................................................................................. 18
1.4.1.
Transparent Transmission Mode ..................................................................................... 18
1.4.2.
Configuration Mode .......................................................................................................... 18
1.4.3.
Multi-TCP Link Connection .............................................................................................. 19
1.4.4.
TCPB Function ................................................................................................................. 19
1.4.5.
Palmodic Signal ............................................................................................................... 19
2.
FUNCTIONAL DESCRIPTION ................................................................................................. 21
2.1.
Wireless Networking ............................................................................................................. 21
2.1.1.
Basic Wireless Network Based On AP (Infrastructure) ................................................... 21
2.1.2.
Wireless Network Based On AP Network ........................................................................ 21
2.1.3.
Wireless Network Based On AP+STA ............................................................................. 22
2.2.
Auto- Frequency Function ................................................................................................... 23
2.3.
Security .................................................................................................................................. 23
2.4.
UART Frame Scheme ............................................................................................................ 23
2.4.1.
UART Free-Frame ........................................................................................................... 23
2.4.2.
UART Auto-Frame ........................................................................................................... 24
2.5.
Address Binding ................................................................................................................... 24
2.6.
Ethernet Interface Communication ..................................................................................... 24
2.6.1.
HF-A21-SMT Ethernet Interface Networking (As AP) ..................................................... 24
2.6.2.
HF-A21-SMT Ethernet Interface Networking (As STA, N-Ver) ........................................ 25
2.6.3.
HF-A21-SMT Ethernet Interface Networking (As STA, Z-Ver) ........................................ 25
2.7.
Search Function for STA ...................................................................................................... 25
2.8.
Work Mode ............................................................................................................................. 25
2.9.
Network Protocol .................................................................................................................. 26
2.10.
Parameters Configuration ................................................................................................ 26
2.11.
Firmware Upgrade ............................................................................................................. 27
3.
OPERATION GUIDELINE ......................................................................................................... 28
3.1.
Configuration via Web Accessing ....................................................................................... 28
3.1.1.
Open Web Management Interface ................................................................................... 28
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
4
3.1.2. Mode Selection Page ....................................................................................................... 29
3.1.3. AP Interface Setting Page ............................................................................................... 29
3.1.4. STA Interface Setting Page ............................................................................................. 29
3.1.5. Application Setting Page .................................................................................................. 30
3.1.6. Device Management Page .............................................................................................. 31
3.2. HF-A21-SMT Usage Introduction ......................................................................................... 31
3.2.1. Software Debug Tools ..................................................................................................... 31
3.2.2. Network Connection ......................................................................................................... 31
3.2.3. Module Debug .................................................................................................................. 32
3.3. Typical Application Examples ............................................................................................. 34
3.3.1. Wireless Control Application ............................................................................................ 34
3.3.2. Remote Management Application .................................................................................... 35
3.3.3. Transparent Serial Port Application ................................................................................. 35
3.3.4. Wireless Data Acquisition Card Application..................................................................... 36
4. AT+INSTRUCTION INTRODUCTION ...................................................................................... 37
4.1. Configuration Mode .............................................................................................................. 37
4.1.1. Switch to Configuration Mode .......................................................................................... 37
4.2. AT+ Instruction Set Overview .............................................................................................. 38
4.2.1. Instruction Syntax Format ................................................................................................ 38
4.2.2. AT+ Instruction Set .......................................................................................................... 39
4.2.2.1. AT+E ............................................................................................................................ 40
4.2.2.2. AT+ENTM ..................................................................................................................... 40
4.2.2.3. AT+NETP ..................................................................................................................... 40
4.2.2.4. AT+UART ..................................................................................................................... 41
4.2.2.5. AT+ UARTF .................................................................................................................. 41
4.2.2.6. AT+ UARTFT................................................................................................................ 42
4.2.2.7. AT+ UARTFL ................................................................................................................ 42
4.2.2.8. AT+TMODE .................................................................................................................. 42
4.2.2.9. AT+WMODE................................................................................................................. 42
4.2.2.10. AT+WSKEY .............................................................................................................. 43
4.2.2.11. AT+WSSSID ............................................................................................................. 43
4.2.2.12. AT+ WSLK ................................................................................................................ 43
4.2.2.13. AT+WEBU ................................................................................................................ 44
4.2.2.14. AT+WAP ................................................................................................................... 44
4.2.2.15. AT+WAKEY .............................................................................................................. 44
4.2.2.16. AT+HIDESSID .......................................................................................................... 45
4.2.2.17. AT+MSLP ................................................................................................................. 45
4.2.2.18. AT+WSCAN .............................................................................................................. 45
4.2.2.19. AT+ TCPLK .............................................................................................................. 45
4.2.2.20. AT + TCPDIS ............................................................................................................ 46
4.2.2.21. AT+ WANN ............................................................................................................... 46
4.2.2.22. AT+ LANN ................................................................................................................ 46
4.2.2.23. AT + DHCPDEN ....................................................................................................... 47
4.2.2.24. AT+ DHCPGW .......................................................................................................... 47
4.2.2.25. AT+ TCPTO .............................................................................................................. 47
4.2.2.26. AT+ MAXSK ............................................................................................................. 47
4.2.2.27. AT+TCPB.................................................................................................................. 48
4.2.2.28. AT+TCPPTB ............................................................................................................. 48
4.2.2.29. AT+TCPADDB .......................................................................................................... 48
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
5
4.2.2.30. AT+TCPTOB ............................................................................................................ 48
4.2.2.31. AT+TCPLKB ............................................................................................................. 49
4.2.2.32. AT+EPHY ................................................................................................................. 49
4.2.2.33. AT+STTC .................................................................................................................. 49
4.2.2.34. AT+DOMAIN ............................................................................................................. 49
4.2.2.35. AT+FRLDEN ............................................................................................................. 49
4.2.2.36. AT+RELD.................................................................................................................. 50
4.2.2.37. AT+Z ......................................................................................................................... 50
4.2.2.38. AT+MID..................................................................................................................... 50
4.2.2.39. AT+WRMID .............................................................................................................. 50
4.2.2.40. AT+VER .................................................................................................................... 50
4.2.2.41. AT+H ......................................................................................................................... 50
4.2.2.42. AT+FVEW ................................................................................................................. 51
4.2.2.43. AT+FVER.................................................................................................................. 51
4.2.2.44. AT+WMAC ................................................................................................................ 51
4.2.2.45. AT+PING .................................................................................................................. 51
5. PACKAGE INFORMATION ....................................................................................................... 53
5.1 Shipping Information ............................................................................................................ 53
APPENDIX A: QUESTIONS AND ANSWERS ............................................................................... 54
Q1: How to configure transparent serial port application (TCP protocol) with two HF-
A21-SMT modules? ......................................................................................................................... 54
Q2: Where to Set HF-A21-SMT Module LAN IP and WAN IP through Web Page .................. 54
Q3: How to configure transparent serial port application (UDP protocol) with two HF-
A21-SMT modules? ......................................................................................................................... 55
Q4: Where to set HF-A21-SMT module network protocol (TCP/UDP)? ...................................... 55
Q5: How to configure transparent serial port application: Two HF-A21-SMT modules all
configured as STA and connection through AP? ........................................................................ 56
Q6: How to avoid IP address confliction when apply HF-A21-SMT module? ........................... 57
Q7: PC works as server, all HF-A21-SMT modules works as data acquisition card and
connect with PC, how to configure this application? .................................................................. 57
APPENDIX B: EVB REFERENCE DESIGN ................................................................................... 59
APPENDIX C: CONTACT INFORMATION ..................................................................................... 60
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
6
LIST OF FIGURES
Figure 1. HF-A21-SMT Appearance ................................................................................................... 10
Figure 2. HF-A21-SMT Pins Map ....................................................................................................... 10
Figure 3. HF-A21-SMT Mechanical Dimension .................................................................................. 12
Figure 4. HF-A21-SMT Chip Antenna Keep Out Region .................................................................... 12
Figure 5. Suggested Module Placement Region ................................................................................ 13
Figure 6. HF-A21-SMT Evaluation Kit ................................................................................................ 14
Figure 7. HF-A21-SMT Order Information .......................................................................................... 15
Figure 8. HF-A21-SMT Hardware Typical Application........................................................................ 15
Figure 9. Ethernet Reference Design with Transformer ..................................................................... 16
Figure 10. Ethernet Reference Design without Transformer ............................................................ 17
Figure 11. UART Interface Reference Design .................................................................................. 17
Figure 12. User MCU Software Flow Chart ...................................................................................... 18
Figure 13. Multi-TCP Link Data Transmition Structure ..................................................................... 19
Figure 14. HF-A21-SMT Functional Architecture .............................................................................. 21
Figure 15. HF-A21-SMT Basic Wireless Network Structure ............................................................. 21
Figure 16. HF-A21-SMT AP Network Structure ................................................................................ 22
Figure 17. HF-A21-SMT AP+STA Network Structure ....................................................................... 22
Figure 18. HF-A21-SMT Ethernet Interface Networking (As AP) ..................................................... 24
Figure 19. HF-A21-SMT Ethernet Interface Networking (As STA, N-Ver) ........................................ 25
Figure 20. HF-A21-SMT Ethernet Interface Networking (As STA, Z-Ver) ........................................ 25
Figure 21. HF-A21-SMT Transparent Transmission Demo .............................................................. 26
Figure 22. Open Web Management page ......................................................................................... 28
Figure 23. Mode Selection Page ....................................................................................................... 29
Figure 24. AP Interface Setting Page ............................................................................................... 29
Figure 25. STA Interface Setting Page ............................................................................................. 30
Figure 26. Application Setting Page .................................................................................................. 30
Figure 27. Device Management Page .............................................................................................. 31
Figure 28. STA Interface Debug Connection .................................................................................... 32
Figure 29. AP Interface Debug Connection ...................................................................................... 32
Figure 30. “CommTools” Serial Debug Tools ................................................................................... 32
Figure 31. “TCPUDPDbg” Tools Create Connection ........................................................................ 33
Figure 32. “TCPUDPDbg” Tools Setting ........................................................................................... 33
Figure 33. “TCPUDPDbg” Tools Connection .................................................................................... 34
Figure 34. Wireless Control Application ............................................................................................ 34
Figure 35. Remote Management Application .................................................................................... 35
Figure 36. Transparent Serial Port Application ................................................................................. 35
Figure 37. Wireless Data Acquisition Card Application..................................................................... 36
Figure 38. HF-A21-SMT Default UART Port Parameters ................................................................. 37
Figure 39. Switch to Configuration Mode .......................................................................................... 37
Figure 40. ”AT+H” Instruction for Help .............................................................................................. 38
Figure 41. Shipping Information ........................................................................................................ 53
Figure 42. Configure Transparent Serial Port Connection (TCP) ..................................................... 54
Figure 43. Module LAN IP Setting..................................................................................................... 55
Figure 44. Module WAN IP Setting ................................................................................................... 55
Figure 45. Configure Transparent Serial Port Connection (UDP) ..................................................... 55
Figure 46. Module Network Protocols: TCP/Server .......................................................................... 56
Figure 47. Module Network Protocol: TCP/Client ............................................................................. 56
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
7
Figure 48. Module Network Protocol: UDP ....................................................................................... 56
Figure 49. Two HF-A21-SMT Modules Connection Through AP ...................................................... 57
Figure 50. Wireless Data Acquisition Card Setting ........................................................................... 58
LIST OF TABLES
Table 1 HF-A21-SMT Module Technical Specifications ...................................................................... 9
Table 2 HF-A21-SMT Pins Definition ................................................................................................ 10
Table 3 HF-A21-SMT Evaluation Kit Interface Description ............................................................... 14
Table 4 HF-A21-SMT Web Access Default Setting ........................................................................... 28
Table 5 Error Code DescribtionHF-A21-SMT Web Access Default Setting ...................................... 39
Table 6 AT+ Instruction Set List ........................................................................................................ 39
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
8
HISTORY
Ed. V1.0 Created on 1-14-2015.
Ed. V1.1 Modified on 2-03-2015. Modify power consumption.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
9
1. PRODUCT OVERVIEW
1.1. General Specification
Table 1 HF-A21-SMT Module Technical Specifications
Class Item Parameters
Wireless
Parameters
Certification FCC/CE
Wireless standard 802.11 b/g/n
Frequency range 2.412GHz-2.462GHz
Transmit Power
802.11b: +20 dBm (Max.)
802.11g: +18 dBm (Max.)
802.11n: +15 dBm (Max.)
Configurable
Receiver Sensitivity
802.11b: -89 dBm
802.11g: -81dBm
802.11n: -71dBm
Antenna Option Internal:On-board PCB antenna
Hardware
Parameters
Data Interface
UART: 1200bps - 230400bps
Ethernet: 10Mbps/100Mpbs
GPIO,I2C,USB
Operating Voltage 3.3V (+/-5%)
Operating Current Avg:170mA Peak:400mA
Operating Temperature -40- 85
Storage Temperature -45- 125
Dimensions and Size 25×40×3mm SMT
Software
Parameters
Network Type STA /AP/AP+STA mode
Security Mechanisms WEP/WPA-PSK/WPA2-PSK/WAPI
Encryption WEP64/WEP128/TKIP/AES
Work Mode Transparent Transmission
Serial command AT+instruction set
Network Protocol TCP/UDP/ARP/ICMP/DHCP/DNS/HTTP
Max. TCP Connection 32
User Configuration Web ServerAT command config.
User Application SW
Support customized application SW
Provide SDK package
Provide smart link tools
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
10
1.2. Hardware Introduction
1.2.1. Pins Definition
Figure 1. HF-A21-SMT Pins Map
Table 2 HF-A21-SMT Pins Definition
Pin Description Name Direction Note
3,18,24,
26
GND GND Power
1,2 VCC 3.3V Power 3.3V @ 350mA
4 UART Data Transmit UART_TXD O Note1
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
11
5 UART Data Receive UART_RXD I
6 GPIO GPIO_0 I/O c
8 Ethernet Interface PHY_TX+ O Ethernet Data Interface.
9 Ethernet Interface PHY_TX- O
10 Ethernet Interface PHY_RX+ I
11 Ethernet Interface PHY_RX- I
12 USB_D+ USB_D+ I/O USB Host Port
13 USB_D- USB_D- I/O
14 WiFi status Indication nLink O “1”- WIFI connection
available,
“0”- No WIFI connection
15 Module reset signal nRST I “Low (0)” effective reset
input.
The reset duration should be
kept more than 300ms
16 Indicate the module
status of power on
process
nReady O “0” or “Palmodic Signal” -
Finish module boot up
process;
“1” - Module boot up not
finish.
17 Restore configuration nReload I Module will Restore factory
default configuration after
set this pin “0” more than 3s,
then set “1”.
This pin must 4.7K pull-up
outside the module.
19 I2C_SD I2C_SD I/O
20 I2C_SCLK I2C_SCLK O
21 UART1 Data Receive UART1_RXD I
22 UART1 Data Transmit UART1_TXD O Note1
23 GPIO GPIO_1 I/O
25 2.4GHz Antenna ANT O 50 Ohm resistence control
7 Reserved NC NC
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
12
1.2.2. Mechanical Size
HF-A21-SMT modules physical size as follows:
Figure 3. HF-A21-SMT Mechanical Dimension
1.2.3. On-board Chip Antenna
HF-A21-SMT module support internal ob-board chip antenna option. When costomer select
internal antenna, you shall comply with following antenna design rules and module location
suggestions:
For customer PCB, RED color region (7.5x25mm) cant put componet or paste GND net;
Antenna must away from metal or high components at least 10mm;
Antenna cant be shieldedby any meal enclosure; All cover, include plastic, shall away
from antenna at least 10mm;
Figure 4. HF-A21-SMT Chip Antenna Keep Out Region
High-Flying suggest HF-A21-SMT module better locate in following region at customer board,
which to reduce the effect to antenna and wireless signal, and better consult High-Flying technical
people when you structure your module placement and PCB layout.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
13
Figure 5. Suggested Module Placement Region
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
14
1.2.4. Evaluation Kit
High-Flying provides the evaluation kit to promote user to familiar the product and develop the
detailed application. The evaluation kit shown as below, user can connect to HF-A21-SMT
module with the RS-232 UART port, 100M Eth port or Wireless port to configure the parameters,
manage the module or do the some functional tests.
Figure 6. HF-A21-SMT Evaluation Kit
Table 3 HF-A21-SMT Evaluation Kit Interface Description
Function Name Description
External
Interface
DC-Jack 5V@1A Power input: DC-Jack
DC 5V 5V@1A Power input: 2-Pin
COM1 UART DB9, UART, Connect PC serial port
COM2 UART1 DB9, UART1, Connect PC serial port
RJ-45 100M Ethernet Interface
USB Host Seserved USB (Type A)
DIP-16 Extended 16-pin functional interface
LED Power (Red) 3.3V Power Indicator
nLink nLink/GPIO-Pin 14 Indicator
nReady nReady/GPIO-Pin 16 Indicator
Button Reset Used to reset the module.
Reload Module restore to factory default configuration.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
15
1.2.5. Order Information
Base on customer detailed requirement, HF-A21-SMT series modules provide different variants
and physical type for detailed application.
Figure 7. HF-A21-SMT Order Information
1.3. Hardware Reference Design
1.3.1. Hardware Typical Application
Figure 8. HF-A21-SMT Hardware Typical Application
Notes
nRST- Module hardware reset signal. Input. Logics “0” effective.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
16
There is 22K&4.7uF reset circuit. When module power up or some issue happened, MCU need
assert nRST signal “0at least 300ms, then set” 1” to keep module fully reset.
nReady- Module boot up ready signal. Output. Logics “0” effective.
The module will output “0” “or “Palmodic Signal” after normal boot up. This signal used to judge if
module finish boot up and ready for application or working at normal mode.
nLink- Module WIFI connection indication. Output.
When module connect to AP (STA mode) or some WiFi STA connect to module (AP mode), the
module will output “0”. This signal used to judge if module already at WiFi connection status.
nReload- Module restore to factory default configuration.Input. Logics “0” effective.
User can assert nReload signal “0” more than 3‟s through button or MCU pin, then release,
module will restore to factory default configuration and re-start boot up process.
UART_TXD/RXD- UART port data transmit and receive signal.
1.3.2.
10/100M Ethernet Interface
HF-A21-SMT modules provide one 10/100M Ethernet PHY layer interface for data transition or
user configuration. This Ethernet support with transformer and without transformer (PHY-to-PHY)
2 kinds of connection.
1.3.2.1.
Ethernet Connection with Transformer
User board put Ethernet transformer and RJ-45 connector. This is a general 10/100M Ethernet
phy layer connection. The reference design as following:
Figure 9. Ethernet Reference Design with Transformer
1.3.2.2. Ethernet Connection without Transformer
For this application, Ethernet will work as internal data transmition interface and save one
transformer and RJ-45 connector. Ethernet PHY-to-PHY connection will use AC coupled
connection. This is a space and cost optimized solution. Hardware reference design as following:
Note: VCC signal at reference design shall base on user board PHY chipset voltage level, such
as 2.5V power supply for general Ethernet PHY chipset.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
17
Figure 10. Ethernet Reference Design without Transformer
1.3.3. UART Interface
UART interface is the serial data transmition interface mainly used for HF-A21-SMT modules.
User can add RS-232 chipset on user board and convert the signal to RS-232 voltage to
communicate with outside equipment or sensors. HF-A21-SMT modules UART interface include
4 general signals: TXD/RXD/RTS/CTS. The hardware reference design with RS-232 chipset as
following:
Figure 11. UART Interface Reference Design
Notes: TXD pin is also hardware configuration pin internal module. So this pin MUST pull-down
during module power up. HF0A11x modules provide internal pull-down resister, user cant add
pull-up/pull-down resister on user board, which may cause module cant work.
1.3.4. Power Interface
HF-A21-SMT module support single +3.3V power supply. The peak current shall about 350mA
and normal WiFi working current shall about 200mA. The power save (WiFi OFF) mode will about
100mA
Decoupling at power pin suggested, At least one 100uF and one 10uF capacitor required at user
board and put near module power input pin will increase the reliability and performance.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
18
1.4. Software Reference Design
When HF-A21-SMT modules boot up phase, the general user board MCU software flow chart will
as following:
Figure 12. User MCU Software Flow Chart
When HF-A21-SMT modules boot up, user can select one work mode base on the setting, and
user can switch to the configuration mode at any kinds of work mode.
1.4.1. Transparent Transmission Mode
HF-A21-SMT modules support serial interface transparent transmission mode. The benefit of this
mode is achieves a plug and play serial data port, and reduces user complexity furthest. In this
mode, user should only configure the necessary parameters. After power on, module can
automatically connect to the default wireless network and server.
As in this mode, the module's serial port always work in the transparent transmission mode, so
users only need to think of it as a virtual serial cable, and send and receive data as using a
simple serial. In other words, the serial cable of users original serial devices is directly replaced
with the module; user devices can be easy for wireless data transmission without any changes.
The transparent transmission mode can fully compatible with user‟s original software platform and
reduce the software development effort for integrate wireless data transmission.
Notes: Transparent transmission mode as a low level phy layer data transmitting can't keep zero
error rates by itself. User can enable UART port‟s hardware flow control CTS/RTS function or
though higher layer protocol such as TCP to lower error rate and mange the data completeness.
High-Flying recommend when doing large amounts of data transmitting in transparent
transmission mode, hardware flow control should be enabled, so as to fully ensure reliable data
transmission. In the applications which doesnt need flow control, users can simply leave RTS /
CTS pin vacant.
1.4.2. Configuration Mode
In configuration mode, user can finish HF-A21-SMT module configuration management and
parameters setting work. In work mode (Transparent Transmission), user can switch to the
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
19
configuration mode through AT+instruction, detailed switch operation refer to “AT+ instruction set
chapter.
1.4.3. Multi-TCP Link Connection
When HF-A21-SMT module configured as TCP Server, it supports Multi-TCP link connection, and
maximum 32 TCP clients permit to connect to HF-A21-SMT module. User can realize multi-TCP
link connection at each work mode.
Multi-TCP link connection will work as following structure:
Upstream: All dates from different TCP connection or client will be transmitted to the serial port as
a sequence.
Downstream: All data from serial port (user) will be duplicate and broadcast to every TCP
connection or client.
Detailed multi-TCP link data transmition structure as following figure:
Figure 13. Multi-TCP Link Data Transmition Structure
1.4.4. TCPB Function
HF-A21-SMT support 2xTCP function, which means module can support 2 network connections
at the same time. The 2nd net work connection called TCPB. TCPB only works as TCP Client and
its configuration can only through AT commanrd, not Web configuration supported. The command
as following,
AT+TCPB=on, Enable TCPB function;
AT+TCPPTB=<port>, Set TCPB port number;
AT+TCPADDB=<IP or domain>, Set TCPBs server address;
AT+TCPTOB=<time>, Set TCPB timeout;
AT+TCPLKB, Query TCPB link status;
Detailed command describtion refer ro AT instruction chapter. After enable TCPB function, two
network interfaces work mode like “Multi-TCP Link”, All dates from each TCP connection will be
transmitted to the serial port as a sequence and all data from serial port (user) will be duplicate
and broadcast to each TCP connection.
1.4.5. Palmodic Signal
Base on selected factory default setting, nReady signal can have two output statuses:
Status One: The module will output “0” after normal boot up. This signal used to judge if
module finish boot up and ready for application.
Status Two: The module will output “Palmodic Signal” after normal boot up.The
palmodic signal is 0.5Hz square wave with dutyfactor 1:1. User can query this signal to
judge if moduleis active “live” or need to re-boot. When module switches to command
mode, it will output “0”, which used to distinguish work mode and command mode.
Notes:
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
20
This function is user selected factory setting and RELD instruction will not effective for this
function. If user not requires this function, the default factory setting is Status One. Contact with
Hi-flying for more detailed support.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
21
2. FUNCTIONAL DESCRIPTION
2.1. Wireless Networking
HF-A21-SMT module can be configured as both wireless STA and AP base on network type.
Logically there are two interfaces in HF-A21-SMT. One is for STA, and another is for AP. When
HF-A21-SMT works as AP, other STA equipments are able to connect to wireless LAN via HF-
A21-SMT module. Wireless Networking with HF-A21-SMT is very flexible.
Following figure shows the functional architecture of HF-A21-SMT module:
Figure 14. HF-A21-SMT Functional Architecture
Notes:
AP: that is the wireless Access Point, the founder of a wireless network and the centre of the
network nodes. The wireless router we use at home or in office may be an AP.
STA: short for Station, each terminal connects to a wireless network (such as laptops, PDA and
other networking devices) can be called with a STA device.
2.1.1. Basic Wireless Network Based On AP (Infrastructure)
Infrastructure: it‟s also called basic network. It built by AP and many STAs which join in.
The characters of network of this type are that AP is the centre, and all communication between
STAs is transmitted through the AP. The figure following shows such type of networking.
Figure 15. HF-A21-SMT Basic Wireless Network Structure
2.1.2. Wireless Network Based On AP Network
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
22
As showing in the figure below, HF-A21-SMT (1) can be treat as an AP, and HF-A21-SMT (2),
HF-A21-SMT (3) and the laptop are STAs connected to HF-A21-SMT (1). Meanwhile, all HF-A21-
SMT modules can connected to user device via UART interface. All HF-A21-SMT modules can
be operated and managed through the laptop. So it is convenient to O&M all HF-A21-SMT
modules. Moreover, in such AP network structure, the whole coverage of a wireless network can
be extended easily.
Figure 16. HF-A21-SMT AP Network Structure
2.1.3. Wireless Network Based On AP+STA
HF-A21-SMT module support AP+STA network mode, means module support one AP interface
and one STA interface at the same time, as following figure,
Figure 17. HF-A21-SMT AP+STA Network Structure
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
23
When module enables AP+STA function, Module‟s STA interface can connect with router and
connect to TCP server in the network. At the same time, modules AP interface is also active and
permit phone/PAD to connect through TCPB, then phone/PAD can control user device and and
setting the module parameters,
The advantage of AP+STA mode is:
Users can easily setting and track user device through Phone/PAD and not change the
orginal network setting.
Users can easily setting module‟s parameters through WiFi when module works as STA
mode.
AP+STA Mode Setting:
AP+STA mode need serial AT command to enable as follows:
AT+FAPSTA=on, Enable AP+STA mode;
Then, when you configure module works as STA mode, its AP interface still active;
AP+STA Mode Notes:
When user enable AP+STA function, the STA port need to keep connected with other router (AP),
or STA port will have to scan the AP frequently, which will affect AP port function and may cause
some data loss.
So,if user confirm STA port cant connect with AP at some time, user can disable the STA scan
through the following command:
AT+STTC=on/offon: Scan AP; off: No scan AP.
After re-start module, this command not saved;
AT+FSTTC=on/off;
This command is saved after re-starting the module;
2.2. Auto- Frequency Function
When module works as STA, HF-A21-SMT will adjust its wireless channel to keep the same
channel with associated AP and connect in.
When module works as AP and HF-A21-SMT enable Auto-frequency function, then when module
boot up, it will select the best wireless channel based on surrounding environment.
2.3. Security
HF-A21-SMT module supports multiple wireless encryption mechanisms, and enables to protect
the security of user‟s data transmission, the mechanisms include:
WEP
WPA-PSK/TKIP
WPA-PSK/AES
WPA2-PSK/TKIP
WPA2-PSK/AES
2.4. UART Frame Scheme
2.4.1. UART Free-Frame
HF-A21-SMT support UART free-frame function. If user select open this function, module will
check the intervals between any two bytes when reciving UART data. If this interval time exceeds
defined value (50ms default), HF-A21-SMT will think it as the end of one frame and transfer this
free-frame to WiFi port, or HF-A21-SMT will receive UART data untill 4K bytes, then transfer 4KB
frame to WiFi port.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
24
HF-A21-SMTs default interval time is 50ms. User can also set this interval to fast (10ms) through
AT command. But user have to consider if user MCU can send UART data with 10ms interval ,or
the UART data may be divide as fragment.
Through AT command: AT+FUARTTE=fash/normal, user can set the interval time: fast (10ms)
and normal (50ms). This command is factory default setting command and AT+RELD cant
change its value.
2.4.2. UART Auto-Frame
HF-A21-SMT support UART auto-frame function. If user select open this function and setting
auto-frame trigger length and auto-frame trigger time parameters, then module will auto framing
the data which received from UART port and transmitting to the network as pre-defined data
structure.
Auto-frame trigger length: The fixed data length that module used to transmitting to
the network.
Auto-frame trigger time: After the trigger time, if UART port received data cant reach
auto-frame trigger length, then module will transmitting available data to the network
and bypass the auto-frame trigger length condition.
Detailed UART auto-frame function can refer to AT+ instruction set “UARTF/UARTFT/UARTFL
introduction.
2.5. Address Binding
HF-A21-SMT module supports the feature of binding the BSSID address of target network.
According to the provisions of 802.11 protocol, different wireless networks can have a same
network name (i.e. SSID / ESSID), but must correspond to a unique BSSID address (i.e. MAC
address). Illegal intruders can create a wireless network with the same SSID / ESSID, it will make
STAs in the network to join to the illegal AP, thereby and then network leakage happen.
Users can prevent STA from joining to illegal network by binding the BSSID address, to improve
wireless network security.
2.6. Ethernet Interface Communication
HF-A21-SMT module provides one 10/100M Ethernet interface. With this Ethernet interface, user
can easily realize the three interface (WiFi, UART, and Ethernet) intercommunication and
networking. HF-A21-SMT module can configured as Bridge Mode or Router Mode base on
different networking technology.
Notes: The Ethenet function is disabled by default because of the large power consumption.
Users may input “AT+FEPHY=on” and reset to enable Ethenet. HF-A21-SMT need different
configuration to support different Ethenet Networking mode (Such as “N-Ver” and “Z-Ver” as
following, which need AT+FVER=n to switch to N-Ver or AT+FVER=z to switch to Z-Ver).
2.6.1. HF-A21-SMT Ethernet Interface Networking (As AP)
Figure 18. HF-A21-SMT Ethernet Interface Networking (As AP)
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
25
For above networking, HF-A21-SMT module works as AP and also the centre of this network. All
devices IP address in this network shall use the same network segment with HF-A21-SMT and
they can intercommunication with this method.
2.6.2. HF-A21-SMT Ethernet Interface Networking (As STA, N-Ver)
Figure 19. HF-A21-SMT Ethernet Interface Networking (As STA, N-Ver)
For above networking, HF-A21-SMT module works as STAFirmware is N-Version,and
module configured as router mode. When module connect to AP, it will get wireless port IP
address from APFor example: 192.168.1.100.At the same time, module also form a subnet
Default 10.10.100.254and all devices connected to module Ethernet interface will get
assigned IP addressFor example: 10.10.100.101.So for above networking, PC1 at internal
subnet can initiate a connection to PC2 (For HF-A21-SMT works as router mode), but PC2 can‟t
active initiate a connection to PC1.
2.6.3. HF-A21-SMT Ethernet Interface Networking (As STA, Z-Ver)
Figure 20. HF-A21-SMT Ethernet Interface Networking (As STA, Z-Ver)
For above networking, HF-A21-SMT module works as STAFirmware is Z-Version,and
module configured as bridge mode. When module connect to AP, all devices connected to
module Ethernet interface will get assigned IP address from AP (For example:
192.168.1.101).For module works as bridge mode, it can be treated as a transparent device and
PC1, PC2 can communicate without any limit. But in this networking, HF-A21-SMT module needs
assign a static LAN IP address (For example: 192.168.1.10) if module also needs
communication with AP or configuration through web page.
2.7. Search Function for STA
When using web configuration STA Interface Setting Page, user can push “Search” button to find
surrounding AP, and find a AP to associated.
2.8. Work Mode
HF-A21-SMT modules provide two kinds of work mode: Transparent transmission mode.
Transparent transmission mode achieves a plug and play serial data port, and reduces user
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
26
complexity. User can save the configuration information to the flash of HF-A21-SMT, then module
will go into the appointed work mode after power up.
For a module which already finished parameters setting, it will try to connect a wireless network
and server with these parameters after power up, and serial interface is also active with pre-
configured parameters. Then all the data is transferred directly between serial interface and Wifi
interface without any interpreted.
The parameters which need to configure include:
Wireless Network Parameters
Wireless Network NameSSID
Security Mode
Encryption Key
TCP/UDP Linking Parameters
Protocol Type
Link TypeServer or Client
Target Port ID Number
Target Port IP Address
Serial Port Parameters
Baud Rate
Data Bit
Parity (Check) Bit
Stop Bit
Hardware Flow Control
Work Mode Selection
Transparent transmission
Transparent transmission demo as showing in the following figure, a HF-A21-SMT module can be
taken as a virtual serial line when UART interface working in transparent transmission mode. And
user device will realize wireless data transmition almost without any changes.
Figure 21. HF-A21-SMT Transparent Transmission Demo
2.9. Network Protocol
HF-A21-SMT module supports TCP/UDP network protocol and the port parameters can be set
via web accessing or AT+instruction set.
2.10. Parameters Configuration
HF-A21-SMT module supports two methods to configuration parameters: Web Accessing and
AT+instruction set.
Web accessing means users can configure parameters through Web browser. When HF-A21-
SMT module connected to wireless network, parameters configuration is done on a PC
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
27
connected to the same wireless network. AT+instruction set configuration means user configure
parameters through serial interface command. Refer to “AT+instruction set” chapter for more
detail.
Notes:
High-Flying can customized the parameters setting as customer request and ship HF-A21-SMT
modules with these parameters as factory default configuration. It will reduce user‟s module
configuration time for mass production. Also, if user need different parameters setting for every
module, High-Flying can provide the auto-configuration tool to speed up the module
conguration duration. Please contact High-Flying technical interface to acquire this tool if required.
2.11. Firmware Upgrade
HF-A21-SMT module supports firmware upgrade online; User can upgrade firmware via web
access.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
28
3. OPERATION GUIDELINE
3.1. Configuration via Web Accessing
When first use HF-A21-SMT modules, user may need some configuration. User can connect to
HF-A21-SMT modules wireless interface with following default setting information and configure
the module through laptop.
Table 4 HF-A21-SMT Web Access Default Setting
Parameters Default Setting
SSID HF-A21x_AP
IP Address 10.10.100.254
Subnet Mask 255.255.255.0
User Name admin
Password admin
3.1.1. Open Web Management Interface
Step 1: Connect laptop to SSID “HF-A21x_AP” of HF-A21-SMT module via wireless LAN card;
Step 2: After wireless connection OK. Open Wen browser and access “http://10.10.100.254”;
Step 3: Then input user name and password in the page as following and clickOK” button.
Figure 22. Open Web Management page
The HF-A21-SMT web management page support English and Chinese language. User can
select language environment at the top right corner and click “Apply” button.
The main menu include five pages: “Mode Selection”,” AP Interface Setting”,”STA Interface
Setting”,”Application Setting”, and “Device Management”
Notes:
Default, High-Flying suggests all Web management related operation shall execute at AP mode.
(Even you need configure STA parameters and want module works as STA mode). If user selects
STA mode and still want to configurate the module through Web browser, you have to access the
module through another AP (and get the module IP address through this AP.)
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
29
3.1.2. Mode Selection Page
This page use to setting the module working mode (Transparent Transmission) and wireless
networking mode (AP and STA mode).
Figure 23. Mode Selection Page
3.1.3. AP Interface Setting Page
This page use to setting the parameters when HF-A21-SMT module works as AP.
Figure 24. AP Interface Setting Page
3.1.4. STA Interface Setting Page
This page use to setting the parameters when HF-A21-SMT module works as STA.
Such as SSID of AP which module need to connected, and also select the networking type:
DHCP or static IP address.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
30
Figure 25. STA Interface Setting Page
3.1.5. Application Setting Page
This page use to setting the parameters of serial port communication, such as UART setting and
high layer network protocol setting which used support serial communication.
Figure 26. Application Setting Page
Notes:
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
31
Generally, Network protocols support three modes: TCP Server, TCP Client, and UDP. UDP has
no server and client requirement according to standard.
Besides module working as TCP Server (IP address not required in this mode). User must set the
IP address of the device which need communicate with HF-A21-SMT module.
Also the Port ID between two sides of the communication devices must keep the same.
3.1.6. Device Management Page
This page use to manage HF-A21-SMT module general setting, such as administrator setting,
restart module button, restore factory default setting button, and update firmware through
webpage.
Figure 27. Device Management Page
Notes:
Restart module button: When you setting the parameters of different web pages, you will click
“Apply” button to confirm the setting, but the setting take effect only after user click the “Restart”
button here, the module will re-boot up and reflash the memory information with new changes.
3.2. HF-A21-SMT Usage Introduction
3.2.1. Software Debug Tools
High-Flying use two common software tools debugging and applying HF-A21-SMT modules.
(User can also select other tools used to debug serial and Ethernet port).
Serial Debugging Software: ComTools
Ethernet Debugging Software: TCPUDPDbg
3.2.2. Network Connection
User can select two methods to connect HF-A21-SMT module base on dedicated application.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
32
Use HF-A21-SMT STA interface
HF-A21-SMT and debug PC2 connect to a wireless AP, another PC1 (or user device) connect to
HF-A21-SMT module with serial port:
Figure 28. STA Interface Debug Connection
Use HF-A21-SMT AP interface
Debug PC2 connect to HF-A21-SMT through wireless connection, another PC1 (or user device)
connect to HF-A21-SMT module with serial port.
Figure 29. AP Interface Debug Connection
3.2.3. Module Debug
PC1 open “CommTools” program, setting the same serial port parameters with HF-A21-SMT
module and open serial port connection.
Figure 30. “CommTools” Serial Debug Tools
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
33
PC2 open “TCPUDPDbg” program, and create a new connection. If HF-A21-SMT configured as
Server mode, “TCPUDPDbg” Tools shall create “Client “mode connection. Or otherwise, create a
“Server” mode connection.
Figure 31. “TCPUDPDbg” Tools Create Connection
Then setting the TCP/UDP connection parameters. Default as following:
Figure 32. “TCPUDPDbg” Tools Setting
Then, click “Create” button to create a connection.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
34
Figure 33. “TCPUDPDbg” Tools Connection
Now, in transparent transmission mode (HF-A21-SMT default setting), data can be transferred
from “CommTools” program to “TCPUDPDbg” program, or in reverse. You can see data in
receiver side will keep same as in sender side.
3.3. Typical Application Examples
3.3.1. Wireless Control Application
Figure 34. Wireless Control Application
For this wireless control application, HF-A21-SMT works as AP mode. Modules serial port
connects to user device. So, control agent (Smart phone for this example) can manage and
control the user device through the wireless connection with HF-A21-SMT module.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
35
3.3.2. Remote Management Application
Figure 35. Remote Management Application
For this remote management application, HF-A21-SMT works as STA mode and connects to
Internet through wireless AP. Module configured as TCP Client and communicates with remote
TCP server at Internet. Module‟s serial port connects to user device.
So, user devices data or sampling information can send to remote TCP server for storage or
processing. Also remote TCP server can send command to control and manage the user device
through the wireless network.
3.3.3. Transparent Serial Port Application
For this transparent serial port application, two HF-A21-SMT modules connect as below figures to
build up a transparent serial port connection.
Figure 36. Transparent Serial Port Application
For left side HF-A21-SMT module, configured as AP mode and use default SSID and IP address,
network protocol configured as TCP/Server mode, and protocol port ID: 8899.
For right side HF-A21-SMT module, configured as STA mode and setting the same SSID HF-
A11x_AP” for this examplewith left side HF-A21-SMT module, enable DHCP network and
network protocol configured as TCP/Client mode, protocol port ID: 8899. Target IP address part
setting the same IP address with left side HF-A21-SMT module (“10.10.100.254” for this
example).
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
36
When right side HF-A21-SMT boot up, it will find wireless AP (SSIDHF-A11x_AP for this
example) and open TCP/Client network protocol to connect with left side module‟s TCP/Server.
All these operation will be automatic and after finished, the two user devices connected to HF-
A21-SMT module through serial port can communicate each other and think the connection
between them is fully transparent.
3.3.4. Wireless Data Acquisition Card Application
For this wireless data acquisition card application, one PC works as data server and every data
acquisition card connects with a HF-A21-SMT module to support wireless connection function.
Figure 37. Wireless Data Acquisition Card Application
As above figure, one HF-A21-SMT configured as AP mode and all others configured as STA
mode. All HF-A21-SMT which configured as STA and data server PC wireless connected to HF-
A21-SMT which configured as AP to make up a wires network.
Data server PC open TCP/Server protocol and all HF-A21-SMT modules open TCP/Client
protocol. All data acquisition cards data and sampling information can be transmitted to data
server PC for operation.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
37
4. AT+INSTRUCTION INTRODUCTION
4.1. Configuration Mode
When HF-A21-SMT power up, it will default works as transparent transmission mode, then user
can switch to configuration mode by serial port command. HF-A21-SMT UART default
parameters setting as below figure,
Figure 38. HF-A21-SMT Default UART Port Parameters
In configuration mode, user can setting the module through AT+ instruction set, which cover all
web page setting function.
4.1.1. Switch to Configuration Mode
Two steps to finish switching from transparent transmission mode to configuration mode.
UART input “+++”, after module receive “+++”, and feedback “a” as confirmation.
UART input “a”, after module receive “a” and feedback “+ok” to go into AT+
instruction set configuration mode.
Figure 39. Switch to Configuration Mode
Notes:
1. When user input “+++” (No “Enter” key required), the UART port will display feedback
information “a”, and not display input information”+++” as above UART display.
2. Any other input or wrong step to UART port will cause the module still works as original mode
(transparent transmission).
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
38
4.2. AT+ Instruction Set Overview
User can input AT+ Instruction through hyper terminal or other serial debug terminal, also can
program the AT+ Instruction to script. User can also input “AT+H” to list all AT+ Instruction and
description to start.
Figure 40. ”AT+H” Instruction for Help
4.2.1. Instruction Syntax Format
AT+Instruction protocol is based on the instruction of ASCII command style, the description of
syntax format as follow.
Format Description
< >: Means the parts must be included
[ ]: Means the optional part
Command Message
AT+<CMD>[op][para-1,para-2,para-3,para-4…]<CR>
AT+: Prefix of command message;
CMD: Command string;
[op]: Symbol of command operator,
“=” : The command requires parameters input;
“NULL”: Query the current command parameters setting;
[para-n]: Parameters input for setting if required;
<CR>”Enter” Key, its 0x0a or 0x0d in ASCII;
Notes: When input AT+Instruction, “AT+<CMD>character will display capital letter automatic
and other parts will not change as you input.
Response Message
+<RSP>[op] [para-1,para-2,para-3,para-4…]<CR><LF><CR><LF>
+: Prefix of response message;
RSP: Response string;
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
39
ok” : Success
“ERR”: Failure
[op] : =
[para-n]: Parameters if query command or Error code when error happened;
<CR>: ASCII 0x0d;
<LF>: ASCIII 0x0a;
Error Code
Table 5 Error Code DescribtionHF-A21-SMT Web Access Default Setting
Error Code Description
-1 Invalid Command Format
-2 Invalid Command
-3 Invalid Operation Symbol
-4 Invalid Parameter
-5 Operation Not Permitted
4.2.2. AT+ Instruction Set
Table 6 AT+ Instruction Set List
Instruction Description
<null> NULL
E Open/Close show back function
ENTM Set module into transparent transmition mode
NETP Set/Query network protocol parameters
UART Set/Query serial port parameters
UARTF Open/Close UART auto-frame function
UARTFT Set/Query UART auto-frame trigger time
UARTFL Set/Query UART auto-frame trigger length
TMODE Set/Query data transmition mode
(transparent transmition)
WMODE Set/Query WIFI work mode (AP or STA)
WSKEY Set/Query WIFI security parameters as STA
WSSSID Set/Query WIFI target AP SSID parameters as STA
WSLK Query WiFi link status as STA
WEBU Set/Query WEB page login parameters
(User Name and Password)
WAP Set/Query WIFI parameters as AP
WAKEY Set/Query WIFI security parameters as AP
HIDESSID Set/Query hide APs SSID
MSLP Set modules into power save mode.(Turn OFF WiFi)
WSCAN Seek AP when module works as STA mode
TCPLK Query if TCP link already build-up
TCPDIS Open/Cose TCP (Only TCP Client available)
WANN Set/Query WAN setting, only effective as STA mode
LANN Set/Query LAN setting, only effective as AP mode
DHCPDEN Enable/Disable LAN DHCP server function
DHCPGW Set/Query DHCP gateway address
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
40
TCPTO
Set/Query TCP timeout
MAXSK
Set/Query maxima TCP connection
TCPB
Open/Close TCPB function
TCPPTB
Set/Query TCPB port number
TCPADDB
Set/Query TCPB server address
TCPTOB
Set/Query TCPB time out time
TCPLKB
Query TCPB link status
EPHY
Open/Close ETH interface
STTC
Enable/Disable STA port scan function
DOMAIN
Set/Query domain ofmodule webpage
FRLDEN
Enable/Disable nReload pin function
RELD
Restore to factory default setting
Z
Re-start module
MID
Query module ID information
WRMID
Set module ID
VER
Query module software version information
H
Help
FVEW
Enable/Disable WANN mode
FVER
Set/Query working mode
WMAC
Set/Query AP MAC address
PING
PING command
Notes: HF-A21-SMT module can works as AP or STA, user have to use different AT+ Instruction
to set WiFi parameters when module works as AP or STA mode.
4.2.2.1. AT+E
Function: Open/Close show back function;
Format:
AT+E<CR>
+ok<CR>< LF ><CR>< LF >
When HF-A21-SMT module firstly switch from transparent transmission to configuration mode,
show back status is open, input “AT+E” to close show back function, input“AT+E” again to open
show back function.
4.2.2.2. AT+ENTM
Function: Set module into transparent transmition mode;
Format:
AT+ENTM<CR>
+ok<CR>< LF ><CR>< LF >
When operate this command, module switch from configuration mode to transparent transmission
mode.
4.2.2.3. AT+NETP
Function: Set/Query network protocol parameters;
Format:
Query Operation
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
41
AT+NETP<CR>
+ok=<protocol,CS,port,IP><CR>< LF ><CR>< LF >
Set Operation
AT+NETP=<protocol,CS,port,IP><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
protocol:
TCP
UDP
CS: Network mode:
SERVER
CLIENT
Port: protocol port ID: Decimal digit and less than 65535
IP: Server‟s IP address when module set as client
After HF-A21-SMT module boots up again, the setting will be effective.
4.2.2.4. AT+UART
Function: Set/Query serial port parameters;
Format:
Query Operation
AT+UART<CR>
+ok=<baudrate,data_bits,stop_bit,parity,flowctrl><CR>< LF ><CR>< LF >
Set Operation
AT+UART=<baudrate,data_bits,stop_bit,parity><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
baudrate:
1200,1800,2400,4800,9600,19200,38400,57600,115200,230400
data_bits:
5,6,7,8
stop_bits:
1,2
parity:
NONE,EVEN,ODD,MARK,SPACE
flowctrlhardware flow control (CTSRTS)
NFC: No flow control
FC: flow control
After HF-A21-SMT module boots up again, the setting will be effective.
4.2.2.5. AT+ UARTF
Function: Open/Close UART auto-frame function;
Format:
Query Operation
AT+ UARTF<CR>
+ok=<para><CR>< LF ><CR>< LF >
Set Operation
AT+ UARTF=<para ><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
para:
disable - Close auto-frame function;
enable - Open auto-frame function;
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
42
4.2.2.6. AT+ UARTFT
Function: Set/Query UART auto-frame trigger time;
Format:
Query Operation
AT+ UARTFT<CR>
+ok=<time><CR>< LF ><CR>< LF >
Set Operation
AT+ UARTFT=<time ><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
time: Range 100 ~10000; Unit: ms. Auto-frame trigger time
4.2.2.7. AT+ UARTFL
Function: Set/Query UART auto-frame trigger length;
Format:
Query Operation
AT+ UARTFL<CR>
+ok=<len><CR>< LF ><CR>< LF >
Set Operation
AT+ UARTFL=<len ><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
len: Range 64 ~4096; Unit: byte. Auto-frame trigger length;
4.2.2.8. AT+TMODE
Function: Set/Query data transmition mode;
Format:
Query Operation
AT+TMODE<CR>
+ok=<tmode><CR>< LF ><CR>< LF >
Set Operation
AT+ TMODE=<tmode><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
tmode: Data transmition mode
Through: Transparent transmition
After HF-A21-SMT module boots up again, the setting will be effective.
4.2.2.9. AT+WMODE
Function: Set/Query WIFI work mode;
Format:
Query Operation
AT+WMODE<CR>
+ok=<mode><CR>< LF ><CR>< LF >
Set Operation
AT+ WMODE=<mode><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
mode:WIFI work mode
AP
STA
After HF-A21-SMT module boots up again, the setting will be effective.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
43
4.2.2.10. AT+WSKEY
Function: Set/Query WIFI security parameters as STA;
Format:
Query Operation
AT+WSKEY<CR>
+ok=<auth,encry,key><CR>< LF ><CR>< LF >
Set Operation
AT+ WSKEY=< auth,encry,key><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
auth: Authentication mode
OPEN
SHARED
WPAPSK
encry:Encryption algorithm
NONE: When “auth=OPEN”, effective
WEP: When “auth=OPEN” or “SHARED”, effective
TKIP: When ”auth= WPAPSK”, effective
AES: When “auth= WPAPSK”, effective
key: password, ASCII code, shall less than 64 bit and greater than 8bit
This Instruction only effective for HF-A21-SMT works as STA. After HF-A21-SMT module boots
up again, the setting will be effective. But user can set this command when module configured as
AP.
4.2.2.11. AT+WSSSID
Function: Set/Query WIFI target AP SSID parameters as STA.
Format:
Query Operation
AT+WSSSID<CR>
+ok=<ap’s ssid><CR>< LF ><CR>< LF >
Set Operation
AT+ WSSSID=<ap’s ssid ><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
aps ssid: APs SSID
This Instruction only effective for HF-A21-SMT works as STA. After HF-A21-SMT module boots
up again, the setting will be effective. But user can set this command when module configured as
AP.
4.2.2.12. AT+ WSLK
Function: Query WiFi link status as STA
Format:
Query Operation
AT+ WSLK<CR>
+ok=<ret><CR>< LF ><CR>< LF >
Parameters:
ret
”Disconnected”, if no WiFi connection;
APSSIDAPs MAC, if WiFi connection available;
”RF Off”, if WiFi OFF;
This Instruction only effective for HF-A21-SMT works as STA. After HF-A21-SMT module boots
up again, the setting will be effective. But user can set this command when module configured as
AP.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
44
4.2.2.13. AT+WEBU
Function: Set/Query WEB page login parameters;
Format:
Query Operation
AT+WEBU<CR>
+ok=<usr,password><CR>< LF ><CR>< LF >
Set Operation
AT+ WEBU=< usr,password ><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
usr: User name for WEB page access;
passwordPassword for WEB page access;
4.2.2.14. AT+WAP
Function: Set/Query WIFI parameters as AP;
Format:
Query Operation
AT+WAP<CR>
+ok=<wifi_mode,ssid,channel><CR>< LF ><CR>< LF >
Set Operation
AT+ WAP=<wifi_mode,ssid,channel><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
wifi_mode: WiFi protocols
11BG
11B
11G
11BGN
11N
ssid: SSID when module works as AP;
channel: WIFI channel selection
AUTO
CH1~CH11
This Instruction only effective for HF-A21-SMT works as AP. After HF-A21-SMT module boots up
again, the setting will be effective. But user can set this command when module configured as
STA.
4.2.2.15. AT+WAKEY
Function: Set/Query WIFI security parameters as AP;
Format:
Query Operation
AT+WAKEY<CR>
+ok=<auth,encry,key><CR>< LF ><CR>< LF >
Set Operation
AT+ WAKEY=< auth,encry,key><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
auth: Authentication mode
OPEN
SHARED
WPAPSK
encry:Encryption algorithm
NONE: When “auth=OPEN”, effective;
WEP: When “auth=OPEN”, effective or “SHARED”, effective;
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
45
TKIP: When “auth=WPAPSK”, effective;
AES:When “auth=WPAPSK”, effective;
TKIPAES:When “auth=WPAPSK”, effective;
key: password, ASCII code, shall less than 64 bit and greater than 8bit;
This Instruction only effective for HF-A21-SMT works as AP. After HF-A21-SMT module boots up
again, the setting will be effective. But user can set this command when module configured as
STA.
4.2.2.16. AT+HIDESSID
Function: Set/Query hide APs SSID;
Format:
Query Operation
AT+ HIDESSID <CR>
+ok=<sta.><CR>< LF ><CR>< LF >
Set Operation
AT+ HIDESSID=<sta><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
When Query,sta reply if module‟s SSID is hide;
On – not hide SSID;
Off - hide SSID;
When Set,
Off - hide SSID;
On - not hide SSID;
4.2.2.17. AT+MSLP
Function: Set modules into power save mode.(Turn OFF WiFi);
Format:
Query Operation
AT+ MSLP <CR>
+ok=<sta.><CR>< LF ><CR>< LF >
Set Operation
AT+ MSLP=<on/off><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
When Query,sta reply if the module in sleep mode;
On - Module not in sleep mode (WiFi ON);
Off - Module in sleep mode(WiFi OFF);
When Set,
Off - Set module to sleep mode (WiFi OFF);
On - Set module to normal mode (WiFi ON);
When module go into sleep mode, user can input “AT+MSLP=on” to re-start the module and
module go into transparent transmission mode.
4.2.2.18. AT+WSCAN
Function: Seek AP when module works as STA mode;
Format:
AT+ WSCAN<CR>
+ok=<ap_site><CR>< LF ><CR>< LF >
Parameters:
ap_site: AP searched;
4.2.2.19. AT+ TCPLK
Function: Query if TCP link already build-up;
Format:
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
46
AT+ TCPLK<CR>
+ok=<sta><CR>< LF ><CR>< LF >
Parameters:
sta.: if module already setup TCP link;
on: TCP link setup;
off: TCP link not setup;
4.2.2.20. AT + TCPDIS
Function: Open/Cose TCP (Only TCP Client available);
Format:
Query Operation
AT+TCPDIS<CR>
+ok=<sta><CR>< LF ><CR>< LF >
Set Operation
AT+ TCPDIS=<on/off><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
sta.: set/qurey TCP link status;
on: TCP link availabe; When setting “on”, module will connect to TCP
server right away.
off: TCP link not availabe; when setting “off”, module will disconnect with
TCP server and not connect again.
4.2.2.21. AT+ WANN
Function: Set/Query WAN setting, only effective as STA mode;
Format:
Query Operation
AT+WANN<CR>
+ok=<mode,address,mask,gateway><CR>< LF ><CR>< LF >
Set Operation
AT+ WANN=< mode,address,mask,gateway ><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
mode: IP setting for WAN port
static: Static IP
DHCP: Dynamic IP
address: WAN port IP address;
mask: WAN port subnet mask;
gateway: WAN port gateway address;
This Instruction only effective for HF-A21-SMT works as STA. After HF-A21-SMT module boots
up again, the setting will be effective. But user can set this command when module configured as
AP.
4.2.2.22. AT+ LANN
Function: Set/Query LAN setting, only effective as AP mode;
Format:
Query Operation
AT+LANN<CR>
+ok=<address,mask ><CR>< LF ><CR>< LF >
Set Operation
AT+ LANN=<address,mask ><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
address: LAN port IP address;
mask: LAN port subnet mask;
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
47
This Instruction only effective for HF-A21-SMT works as AP. After HF-A21-SMT module boots up
again, the setting will be effective. But user can set this command when module configured as
STA.
4.2.2.23. AT + DHCPDEN
Function: Enable/Disable LAN DHCP server function;
Format:
Query Operation
AT+DHCPDEN<CR>
+ok=<sta><CR>< LF ><CR>< LF >
Set Operation
AT+ DHCPDEN=<sat><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
sta. if Enable/Disable LAN DHCP server function;
on: Enable LAN DHCP server function.
off: Disable LAN DHCP server function.
4.2.2.24. AT+ DHCPGW
Function: Set/Query DHCP gateway address;
Format:
Query Operation
AT+ DHCPGW<CR>
+ok=<address><CR>< LF ><CR>< LF >
Set Operation
AT+ DHCPGW=<address ><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
address: DHCP gate address;
4.2.2.25. AT+ TCPTO
Function: Set/Query TCP timeout;
Format:
Query Operation
AT+ TCPTO<CR>
+ok=<time><CR>< LF ><CR>< LF >
Set Operation
AT+ TCPTO=<time ><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
time: TCP timeout time.
<= 600, (600s);
>=0, (0 means no timeout);
Default, 300s;
4.2.2.26. AT+ MAXSK
Function: Set/Query maxima TCP connection;
Format:
Query Operation
AT+ MAXSK<CR>
+ok=<num><CR>< LF ><CR>< LF >
Set Operation
AT+ MAXSK =<num ><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
48
num: 1~32, default 32. maxima TCP connection;
When configure as TCP/Server, HF-A21-SMT support maxime 32 TCP connections. If not require
so much connection, user can resetting this parameters.
4.2.2.27. AT+TCPB
Function: Open/Close TCPB function;
Format:
Query Operation
AT+TCPB<CR>
+ok=<sta><CR>< LF ><CR>< LF >
Set Operation
AT+ TCPB=<on/off><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
sta: TCPB enable status
on, TCPB enable
off, TCPB disable
After HF-A21-SMT module boots up again, the setting will be effective.
4.2.2.28. AT+TCPPTB
Function: Set/Query TCPB port number;
Format:
Query Operation
AT+TCPPTB<CR>
+ok=<port><CR>< LF ><CR>< LF >
Set Operation
AT+ TCPB=<port><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
port: decimal ,<65535
After HF-A21-SMT module boots up again, the setting will be effective.
4.2.2.29. AT+TCPADDB
Function: Set/Query TCPB server address;
Format:
Query Operation
AT+TCPADDB<CR>
+ok=<add><CR>< LF ><CR>< LF >
Set Operation
AT+ TCPADDB=<add><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
add: TCPB server address, can be IP address or url.
After HF-A21-SMT module boots up again, the setting will be effective
4.2.2.30. AT+TCPTOB
Function: Set/Query TCPB time out time;
Format:
Query Operation
AT+TCPTOB<CR>
+ok=<time><CR>< LF ><CR>< LF >
Set Operation
AT+ TCPTOB=<time><CR>
+ok<CR>< LF ><CR>< LF >
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
49
Parameters:
time: TCPB time out time, <=600 (600s), >=0 (No time out), default 300
After HF-A21-SMT module boots up again, the setting will be effective.
4.2.2.31. AT+TCPLKB
Function: Query TCPB link status;
Format:
AT+TCPCKB<CR>
+ok=<sta><CR>< LF ><CR>< LF >
Parameters:
sta: TCPB link status
on, TCPB link OK
off, TCPB link not availabe
4.2.2.32. AT+EPHY
Function: Enable ETH interface;
Format:
Set Operation
AT+ EPHY=<CR>
+ok<CR>< LF ><CR>< LF >
Ethenet port function is disabled bydefault. Input this command to enable Ethenet. This
command is not saved, this means after the module reset, Ethenet is disabled by default. Input
“AT+FEPHY=on” to enable Ethenet forever..
4.2.2.33. AT+STTC
Function: Enable/Disable STA port scan function;
Format:
Query Operation
AT+ STTC<CR>
+ok=<sta><CR>< LF ><CR>< LF >
Set Operation
AT+ STTC=<on/off><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
sta: when query, this value feedback
On: Enable STA port scan function;
Off: Disable STA port scan function;
4.2.2.34. AT+DOMAIN
Function: Set/Query domain ofmodule webpage;
Format:
Query Operation
AT+ DOMAIN<CR>
+ok=<domain><CR>< LF ><CR>< LF >
Set Operation
AT+ DOMAIN=<domain><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
domain: domain to acess to module webpage.
4.2.2.35. AT+FRLDEN
Function: Enable/Disable nReload pin function;
Format:
Query Operation
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
50
AT+ FRLDEN<CR>
+ok=< on/off ><CR>< LF ><CR>< LF >
Set Operation
AT+ FRLDEN=<on/off><CR>
+ok<CR>< LF ><CR>< LF >
Parameters:
on/off: Enable or Disable nReload pin function.
On, enable nReload pin function;
Off, disable nReload pin function;
Notes: AT+FRLDEN is F-Setting, means restore to factory setting will not affect this
command.
4.2.2.36. AT+RELD
Function: Restore to factory default setting;
Format:
AT+ RELD<CR>
+ok=rebooting…<CR>< LF ><CR>< LF >
This command restores the module to factory default setting, and then re-starts the module.
4.2.2.37. AT+Z
Function: Re-start module;
Format:
AT+ Z<CR>
4.2.2.38. AT+MID
Function: Query module ID information;
Format:
Query Operation
AT+MID<CR>
+ok=<module_id><CR><LF><CR><LF>
Parameters:
module_id: Module ID information;
4.2.2.39. AT+WRMID
Function: Set module ID information;
Format:
Set Operation
AT+WRMID=<module_id><CR>
+ok<CR><LF><CR><LF>
Parameters:
module_id: Module ID information;
4.2.2.40. AT+VER
Function: Query module software version information;
Format:
Query Operation
AT+VER<CR>
+ok=<ver><CR><LF><CR><LF>
Parameters:
ver: Module software version information;
4.2.2.41. AT+H
Function: Help;
Format:
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
51
Query Operation
AT+H<CR>
+ok=<commod help><CR><LF><CR><LF>
Parameters:
commod help: command introduction;
4.2.2.42. AT+FVEW
Function: Enable/Disable Ethernet WANN mode. It's valid only if restore to factory
setting.;
Format:
Query Operation
AT+ FVEW<CR>
+ok=<status><CR><LF><CR><LF>
Set Operation
AT+ FVEW=<status><CR>
+ok<CR><LF><CR><LF>
Parameters:
status: Enable or Disable Ethernet WANN mode..
enable, enable Ethernet WANN mode;
disable, disable Ethernet WANN mode, then it works in Ethernet LANN
mode.(default mode)
If Ethernet WANN mode is valid. Then wireless connecting router in STA mode is
invalid. It only support connecting to router by Ethernet..
4.2.2.43. AT+FVER
Function: Set/Query module working mode;
Format:
Query Operation
AT+ FVER<CR>
+ok=<status><CR><LF><CR><LF>
Set Operation
AT+ FVER=<n/z><CR>
+ok<CR><LF><CR><LF>
Parameters:
status: module working mode..
n: router mode.(default mode)
z: bridge mode.
4.2.2.44. AT+WMAC
Function: Set/Query module MAC address;
Format:
Query Operation
AT+ WMAC<CR>
+ok=<address><CR><LF><CR><LF>
Set Operation
AT+ WMAC=<address><CR>
+ok<CR><LF><CR><LF>
Parameters:
address: module MAC address in AP mode.
The modules STA MAC address is APs MAC address plus 1. For example, AP
address: ACCF23208888, then STA address: ACCF23208889.
4.2.2.45. AT+PING
Function: PING command;
Format:
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
52
Set Operation
AT+ PING=<address><CR>
+ok=<status><CR><LF><CR><LF>
Parameters:
address: target IP address.
Status:command result.
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
53
5. PACKAGE INFORMATION
5.1 Shipping Information
TRAY BOX
Size:350*350*70 mm Size:350*350*350 mm
Figure 41. Shipping Information
Note:
1 tray = 500 pcs
1 box = 5 trays = 5 * 100 pcs = 2500pcs
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com - 54 -
APPENDIX A: QUESTIONS AND ANSWERS
Q1: How to configure transparent serial port application (TCP protocol) with
two HF-A21-SMT modules?
Network structure as below figure:
Module 1# Setting:
Works as AP mode; --See “Mode Selection Page”
LAN IP address: 10.10.100.254; --See “AP Interface Setting Page”
Network Protocal:TCP/Server, Port ID: 8899; -- See “Application Setting Page”
(Module default setting);
Module 2# Setting:
Works as STA mode; --See “Mode Selection Page”
WAN connection type: DHCP or Static IP (For this example:10.10.100.100)
--See “STA Interface Setting Page”
Network Protocal:TCP/Client, Port ID: 8899; Application IP address: Module 1#s LAN
IP address (10.10.100.254); -- See “Application Setting Page”
Notes: When module 2# works as STA mode, modules WiFi interface works as WAN
port. Modules WAN IP address and LAN IP address shall be setting different segment.
So, module 2#s LAN IP address must change to other segment; (For this sample, we
change to 10.10.99.254); --See “AP Interface Setting Page
HF-A21-SMT
AP,
LAN IP:10.10.100.254
TCP, Server
8899
HF-A21-SMT
STA,
LAN IP:10.10.99.254
WAN IP: 10.10.100.100
TCP, Client
10.10.100.254: 8899
1# 2#
WIFI
MCU
MCU UART
UART
Figure 42. Configure Transparent Serial Port Connection (TCP)
Q2: Where to Set HF-A21-SMT Module LAN IP and WAN IP through Web Page
HF-A21-SMT Wireless LAN IP address setting see “AP Interface Setting Page” as below Figure,
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com - 55 -
Figure 43. Module LAN IP Setting
HF-A21-SMT Wireless WAN IP address setting see “STA Interface Setting Page” as below Figure,
User can set WAN connection type to DHCP and STATIC IP.
Figure 44. Module WAN IP Setting
Q3: How to configure transparent serial port application (UDP protocol) with
two HF-A21-SMT modules?
Network structure as below figure:
Module 1# Setting:
Works as AP mode; --See “Mode Selection Page
LAN IP address: 10.10.100.254; --See “AP Interface Setting Page”
Network Protocal:UDP, Port ID: 8899; Application IP address:10.10.100.100;
-- See “Application Setting Page”
Module 2# Setting:
Works as STA mode; --See “Mode Selection Page”
WAN connection type: Static IP (10.10.100.100)
--See “STA Interface Setting Page
Network Protocal:UDP, Port ID: 8899; Application IP address: Module 1#‟s LAN IP
address (10.10.100.254); -- See “Application Setting Page
LAN IP address: 10.10.99.254 (Different net segment with WAN port)
--See “AP Interface Setting Page”
HF-A21-SMT
AP,
LAN IP:10.10.100.254
UDP
10.10.100.100:8899
HF-A21-SMT
STA,
LAN IP:10.10.99.254
WAN IP: 10.10.100.100
UDP
10.10.100.254:8899
1# 2#
WIFI
MCUMCU UARTUART
Figure 45. Configure Transparent Serial Port Connection (UDP)
Q4: Where to set HF-A21-SMT module network protocol (TCP/UDP)?
HF-A21-SMT network protocol setting see “Application Setting Page” as below Figure,
Protocol: TCP Server
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com - 56 -
Only Port ID required: 8899 (Default)
Figure 46. Module Network Protocols: TCP/Server
Protocol: TCP Client
Application IP address required: it‟s target TCP server „s IP address;
Port ID required: 8899 (Default)
Figure 47. Module Network Protocol: TCP/Client
Protocol: UDP
No Server/Client selection required;
Application IP address required: it‟s target device „s IP address;
Port ID required: 8899 (Default)
Figure 48. Module Network Protocol: UDP
Q5: How to configure transparent serial port application: Two HF-A21-SMT
modules all configured as STA and connection through AP?
Network structure as below figure:
Module 1# Setting: ( We use HF-A21-SMT as AP for this example)
Works as AP mode and all default setting;
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com - 57 -
Module 2# Setting:
Works as STA mode; --See “Mode Selection Page”
WAN connection type: Static IP: 10.10.100.100; --See “STA Interface Setting Page”
Network Protocal:TCP/Server, Port ID: 8899; -- See “Application Setting Page”
LAN IP address: 10.10.99.254 (Different net segment with WAN port);
--See “AP Interface Setting Page”
Module 3# Setting:
Works as STA mode; --See “Mode Selection Page”
WAN connection type: Static IP: 10.10.100.101; --See “STA Interface Setting Page”
Network Protocal:TCP/Client, Port ID: 8899; Application IP address: Module 2#s WAN
IP address (10.10.100.100); -- See “Application Setting Page”
LAN IP address: 10.10.98.254 (Different net segment with WAN port);
--See “AP Interface Setting Page”
Figure 49. Two HF-A21-SMT Modules Connection Through AP
Q6: How to avoid IP address confliction when apply HF-A21-SMT module?
The following address allocation method can avoid the IP address confliction for dynamic and
static IP address mixed application.
Module dynamic IP address range from 100 to 200 for last IP address segment.
Such as default IP: 10.10.100.254. When module works as AP, the IP address module
can allocate to STA is from 10.10.100.100 to 10.10.100.200;
So, if user needs to set static IP for dedicated STA internal network, the available IP address
range can start from 10.10.100.1 to 10.10.100.99.
Q7: PC works as server, all HF-A21-SMT modules works as data acquisition
card and connect with PC, how to configure this application?
Network structure as below figure: Three HF-A21-SMT module setup 3 TCP links with PC server.
Module 1# works as AP and all devices connect to module 1# through WiFi interface;
PC Setting:
IP address: 10.10.100.100;
Network Protocal:TCP/Server, Port ID: 8899;
Module 1# Setting:
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com - 58 -
Works as AP mode;
LAN IP address: 10.10.100.254;
Network Protocal:TCP/Client, Port ID: 8899; Application IP address:10.10.100.100;
Module 2# Setting:
Works as STA mode;
WAN connection type: Static IP: 10.10.100.101;
Network Protocal:TCP/Client, Port ID: 8899; Application IP address:10.10.100.100;
LAN IP address: 10.10.99.254 (Different net segment with WAN port);
Module 3# Setting:
Works as STA mode;
WAN connection type: Static IP: 10.10.100.102;
Network Protocal:TCP/Client, Port ID: 8899; Application IP address:10.10.100.100;
LAN IP address: 10.10.98.254 (Different net segment with WAN port);
HF-A21-SMT
AP,
LAN IP:10.10.100.254
TCP, Client
10.10.100.100:8899
HF-A21-SMT
STA,
LAN IP:10.10.98.254
WAN IP: 10.10.100.102
TCP, Client
10.10.100.100: 8899
2# 3#
WIFI
MCUMCU UARTUART
HF-A21-SMT
1#
WIFI
STA,
LAN IP:10.10.99.254
WAN IP: 10.10.100.101
TCP, Client
10.10.100.100:8899
WIFI
PC
IP: 10.10.100.100
TCP, Server
8899
MCU
UART
Figure 50. Wireless Data Acquisition Card Setting
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com - 59 -
APPENDIX B: EVB REFERENCE DESIGN
HF-A21-SMT Embedded WiFi Module User Manual
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com - 60 -
APPENDIX C: CONTACT INFORMATION
------------------------------------------------------------------------------------------------------------
Address: Room 1002,Building 1,No.3000,Longdong Avenue,Pudong New
Area,Shanghai,China, 201203
Web: www.hi-flying.com
Service Online: 400-189-3108
Mail Contact: sales@hi-flying.com
-----------------------------------------------------------------------------------------------------------
END OF DOCUMENT
© Copyright High-Flying, May, 2011
The information disclosed herein is proprietary to High-Flying and is not to be used by or disclosed to unauthorized persons
without the written consent of High-Flying. The recipient of this document shall respect the security status of the information.
The master of this document is stored on an electronic database and is “write-protected” and may be altered only by
authorized persons at High-Flying. Viewing of the master document electronically on electronic database ensures access to
the current issue. Any other copies must be regarded as uncontrolled copies.
FCC INFORMATION (additional)
OEM INTEGRATION INSTRUCTIONS:
This device is intended only for OEM integrators under the following conditions:
The module must be installed in the host equipment such that 20 cm is maintained
between the antenna and users, and the transmitter module may not be co-located with
any other transmitter or antenna. The module shall be only used with the internal
antenna(s) that has been originally tested and certified with this module.
As long as 3 conditions above are met, further transmitter test will not be required.
However, the OEM integrator is still responsible for testing their end-product for any
additional compliance requirements required with this module installed (for example,
digital device emissions, PC peripheral requirements, etc.).
Validity of using the module certification:
In the event that these conditions cannot be met (for example certain laptop
configurations or co-location with another transmitter), then the FCC authorization for this
module in combination with the host equipment is no longer considered valid and the
FCC ID of the module cannot be used on the final product. In these circumstances, the
OEM integrator will be responsible for re-evaluating the end product (including the
transmitter) and obtaining a separate FCC authorization.
End product labeling:
This transmitter module is authorized only for use in device where the antenna may be
installed such that 20 cm may be maintained between the antenna and users. The final
end product must be labeled in a visible area with the following: Contains FCC ID:
2ACSV-HF-A21-SMT”.
Information that must be placed in the end user manual:
The OEM integrator has to be aware not to provide information to the end user regarding
how to install or remove this RF module in the user's manual of the end product which
integrates this module. The end user manual shall include all required regulatory
information/warning as show in this manual.
This device must be kept away from all persons by 20cm or more and installations using less
distance, or installations using antennas with gain greater than that with which this was
Certified will require additional approvals.
Antenna Specification:
Type: PCB Antenna
Model: HF-A21-SMT
Brand: High-Flying
Gain: 2.07dBi

Navigation menu