High Flying Electronics Technology HF A21 SMT User Manual

HF-A21-SMT Embedded WiFi Module User Manual
HF-A21-SMT
Embedded WiFi Module User Manual
V1.1
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
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
1
HF-A21-SMT Embedded WiFi Module User Manual
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.
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
2
HF-A21-SMT Embedded WiFi Module User Manual
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. FUNCT IONAL 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. OPERATIO N GU IDEL INE ......................................................................................................... 28
3.1. Configuration via Web Accessing ....................................................................................... 28
3.1.1. Open Web Management Interface ................................................................................... 28
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
3
HF-A21-SMT Embedded WiFi Module User Manual
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+IN STRUCTION 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
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
4
HF-A21-SMT Embedded WiFi Module User Manual
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 INFORM ATION ..................................................................................... 60
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
5
HF-A21-SMT Embedded WiFi Module User Manual
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
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
6
HF-A21-SMT Embedded WiFi Module User Manual
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
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
7
HF-A21-SMT Embedded WiFi Module User Manual
HISTORY
Ed. V1.0 Created on 1-14-2015.
Ed. V1.1 Modified on 2-03-2015. Modify power consumption.
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
8
HF-A21-SMT Embedded WiFi Module User Manual
1. PRODUCT OVERVIEW
1.1. General Specification
Table 1 HF-A21-SMT Module Technical Specifications
Class Item Parameters
Certification FCC/CE
Wireless standard 802.11 b/g/n Frequency range 2.412GHz-2.462GHz
802.11b: +20 dBm (Max.)
Transmit Power
Wireless Parameters
Receiver Sensitivity
802.11g: +18 dBm (Max.)
802.11n: +15 dBm (Max.) Configurable
802.11b: -89 dBm
802.11g: -81dBm
802.11n: -71dBm
Hardware Parameters
Software Parameters
Antenna Option
Data Interface
Operating Voltage 3.3V (+/-5%) Operating Current Avg:170mA Peak:400mA Operating Temperature Storage Temperature Dimensions and Size
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
User Application SW
Internal:On-board PCB antenna
UART: 1200bps - 230400bps Ethernet: 10Mbps/100Mpbs GPIO,I2C,USB
-40- 85
-45- 125 25×40×3mm SMT
Web ServerAT command config.
Support customized application SW Provide SDK package Provide smart link tools
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
9
HF-A21-SMT Embedded WiFi Module User Manual
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 1,2 4
Shanghai High-Flying Electronics Technology Co., Ltd
GND GND Power
VCC 3.3V Power 3.3V @ 350mA UART Data Transmit UART_TXD O
www.hi-flying.com
Note1
10
HF-A21-SMT Embedded WiFi Module User Manual
5
6 8
9
10
11
12
13
14
15
16
17
19 20 21 22
23
25
7
UART Data Receive UART_RXD I
GPIO GPIO_0 I/O c Ethernet Interface PHY_TX+ O Ethernet Data Interface.
Ethernet Interface PHY_TX- O
Ethernet Interface PHY_RX+ I
Ethernet Interface PHY_RX- I
USB_D+ USB_D+ I/O USB Host Port
USB_D- USB_D- I/O
WiFi status Indication nLink O “1”- WIFI connection
available, “0”- No WIFI connection
Module reset signal nRST I “Low (0)” effective reset
input. The reset duration should be
kept more than 300ms Indicate the module status of power on process
Restore configuration nReload I Module will Restore factory
I2C_SD I2C_SD I/O I2C_SCLK I2C_SCLK O UART1 Data Receive UART1_RXD I UART1 Data Transmit UART1_TXD O
GPIO GPIO_1 I/O
2.4GHz Antenna ANT O 50 Ohm resistence control Reserved NC NC
nReady O “0” or “Palmodic Signal” -
Finish module boot up process;
“1” - Module boot up not
finish.
default configuration after
set this pin “0” more than 3s,
then set “1”.
This pin must 4.7K pull-up
outside the module.
Note1
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
11
HF-A21-SMT Embedded WiFi Module User Manual
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.
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
12
HF-A21-SMT Embedded WiFi Module User Manual
Figure 5. Suggested Module Placement Region
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
13
HF-A21-SMT Embedded WiFi Module User Manual
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.
Function
External Interface
LED
Button
Figure 6. HF-A21-SMT Evaluation Kit
Table 3 HF-A21-SMT Evaluation Kit Interface Description
Name Description
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
Power (Red) 3.3V Power Indicator nLink nLink/GPIO-Pin 14 Indicator nReady nReady/GPIO-Pin 16 Indicator Reset Reload Module restore to factory default configuration.
5V@1A Power input: DC-Jack
Used to reset the module.
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
14
HF-A21-SMT Embedded WiFi Module User Manual
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.
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
15
HF-A21-SMT Embedded WiFi Module User Manual
There is 22K&4.7uF reset circuit. When module power up or some issue happened, MCU need assert nRST signal “0” at 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.
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
16
HF-A21-SMT Embedded WiFi Module User Manual
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.
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
HF-A21-SMT Embedded WiFi Module User Manual
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
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
HF-A21-SMT Embedded WiFi Module User Manual
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:
Shanghai High-Flying Electronics Technology Co., Ltd
www.hi-flying.com
Loading...
+ 42 hidden pages