HF-A21-SMT Embedded WiFi Module User Manual HF-A21-SMT Embedded WiFi Module User Manual V1.1 Overview of Characteristic Support IEEE802.
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.
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 ...............
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 .......................................
HF-A21-SMT Embedded WiFi Module User Manual 4.2.2.30. 4.2.2.31. 4.2.2.32. 4.2.2.33. 4.2.2.34. 4.2.2.35. 4.2.2.36. 4.2.2.37. 4.2.2.38. 4.2.2.39. 4.2.2.40. 4.2.2.41. 4.2.2.42. 4.2.2.43. 4.2.2.44. 4.2.2.45. 5. AT+TCPTOB ............................................................................................................ 48 AT+TCPLKB ............................................................................................................. 49 AT+EPHY ...................................................
HF-A21-SMT Embedded WiFi Module User Manual LIST OF FIGURES Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. Figure 6. Figure 7. Figure 8. Figure 9. Figure 10. Figure 11. Figure 12. Figure 13. Figure 14. Figure 15. Figure 16. Figure 17. Figure 18. Figure 19. Figure 20. Figure 21. Figure 22. Figure 23. Figure 24. Figure 25. Figure 26. Figure 27. Figure 28. Figure 29. Figure 30. Figure 31. Figure 32. Figure 33. Figure 34. Figure 35. Figure 36. Figure 37. Figure 38. Figure 39. Figure 40. Figure 41.
HF-A21-SMT Embedded WiFi Module User Manual Figure 48. Figure 49. Figure 50. Module Network Protocol: UDP ....................................................................................... 56 Two HF-A21-SMT Modules Connection Through AP ...................................................... 57 Wireless Data Acquisition Card Setting ...........................................................................
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.
HF-A21-SMT Embedded WiFi Module User Manual 1. PRODUCT OVERVIEW 1.1. General Specification Table 1 Class HF-A21-SMT Module Technical Specifications Item Parameters Certification FCC/CE Wireless standard Frequency range 802.11 b/g/n 2.412GHz-2.462GHz 802.11b: +20 dBm (Max.) 802.11g: +18 dBm (Max.) 802.11n: +15 dBm (Max.) Configurable 802.11b: -89 dBm 802.11g: -81dBm 802.
HF-A21-SMT Embedded WiFi Module User Manual 1.2. Hardware Introduction 1.2.1. Pins Definition Figure 1. Table 2 Pin 3,18,24, 26 1,2 4 HF-A21-SMT Pins Map HF-A21-SMT Pins Definition Description GND Name GND Direction Power Note VCC UART Data Transmit 3.3V UART_TXD Power O 3.3V @ 350mA Note1 Shanghai High-Flying Electronics Technology Co., Ltd www.hi-flying.
HF-A21-SMT Embedded WiFi Module User Manual 5 UART Data Receive UART_RXD I 6 8 GPIO Ethernet Interface GPIO_0 PHY_TX+ I/O O 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 13 USB_D- USB_D- I/O 14 WiFi status Indication nLink O 15 Module reset signal nRST I 16 Indicate the module status of power on process nReady O 17 Restore configuration nReload I 19 20 21 22 I2C_SD I2C_SCLK UART1 Data Receive
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.
HF-A21-SMT Embedded WiFi Module User Manual Figure 5. Suggested Module Placement Region Shanghai High-Flying Electronics Technology Co., Ltd www.hi-flying.
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. Figure 6.
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.
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.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual 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. Shanghai High-Flying Electronics Technology Co., Ltd www.hi-flying.
HF-A21-SMT Embedded WiFi Module User Manual 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 HFA21-SMT module. Wireless Networking with HF-A21-SMT is very flexible.
HF-A21-SMT Embedded WiFi Module User Manual 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-A21SMT 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.
HF-A21-SMT Embedded WiFi Module User Manual 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, module‟s 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.
HF-A21-SMT Embedded WiFi Module User Manual HF-A21-SMT‟s 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 can‟t change its value. 2.4.2.
HF-A21-SMT Embedded WiFi Module User Manual 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 Embedded WiFi Module User Manual 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 preconfigured parameters.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual 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 module‟s wireless interface with following default setting information and configure the module through laptop. Table 4 HF-A21-SMT Web Access Default Setting Parameters SSID Default Setting HF-A21x_AP IP Address 10.10.100.254 Subnet Mask 255.255.255.0 User Name admin Password admin 3.1.1.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual 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: Shanghai High-Flying Electronics Technology Co., Ltd www.hi-flying.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual 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. Shanghai High-Flying Electronics Technology Co.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual 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 device‟s data or sampling information can send to remote TCP server for storage or processing.
HF-A21-SMT Embedded WiFi Module User Manual When right side HF-A21-SMT boot up, it will find wireless AP (SSID:HF-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 HFA21-SMT module through serial port can communicate each other and think the connection between them is fully transparent. 3.3.4.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual “ok” : Success “ERR”: Failure [op] : = [para-n]: Parameters if query command or Error code when error happened; : ASCII 0x0d; : ASCIII 0x0a; Error Code Table 5 4.2.2.
HF-A21-SMT Embedded WiFi Module User Manual TCPTO MAXSK TCPB TCPPTB TCPADDB TCPTOB TCPLKB EPHY STTC DOMAIN FRLDEN RELD Z MID WRMID VER H FVEW FVER WMAC PING Set/Query TCP timeout Set/Query maxima TCP connection Open/Close TCPB function Set/Query TCPB port number Set/Query TCPB server address Set/Query TCPB time out time Query TCPB link status Open/Close ETH interface Enable/Disable STA port scan function Set/Query domain ofmodule webpage Enable/Disable nReload pin function Restore to factory default settin
HF-A21-SMT Embedded WiFi Module User Manual AT+NETP +ok=< LF >< LF > Set Operation AT+NETP= +ok< LF >< 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.
HF-A21-SMT Embedded WiFi Module User Manual 4.2.2.6. AT+ UARTFT Function: Set/Query UART auto-frame trigger time; Format: Query Operation AT+ UARTFT +ok=
HF-A21-SMT Embedded WiFi Module User Manual 4.2.2.10.
HF-A21-SMT Embedded WiFi Module User Manual 4.2.2.13. AT+WEBU Function: Set/Query WEB page login parameters; Format: Query Operation AT+WEBU +ok=< LF >< LF > Set Operation AT+ WEBU=< usr,password > +ok< LF >< LF > Parameters: usr: User name for WEB page access; password:Password for WEB page access; 4.2.2.14.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual AT+ TCPLK +ok=< LF >< 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 +ok=< LF >< LF > Set Operation AT+ TCPDIS= +ok< LF >< LF > Parameters: sta.
HF-A21-SMT Embedded WiFi Module User Manual 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 +ok=< LF >< LF > Set Operation AT+ DHCPDEN= +ok< LF >< LF > Parameters: sta.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual 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 +ok=< LF >< LF > Parameters: sta: TCPB link status on, TCPB link OK off, TCPB link not availabe 4.2.2.32.
HF-A21-SMT Embedded WiFi Module User Manual AT+ FRLDEN +ok=< on/off >< LF >< LF > Set Operation AT+ FRLDEN= +ok< LF >< 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.
HF-A21-SMT Embedded WiFi Module User Manual Query Operation AT+H +ok= 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 +ok= Set Operation AT+ FVEW= +ok Parameters: status: Enable or Disable Ethernet WANN mode..
HF-A21-SMT Embedded WiFi Module User Manual Set Operation AT+ PING=
+ok= Parameters: address: target IP address. Status:command result. Shanghai High-Flying Electronics Technology Co., Ltd www.hi-flying.HF-A21-SMT Embedded WiFi Module User Manual 5. PACKAGE INFORMATION 5.1 Shipping Information TRAY Size:350*350*70 mm BOX Size:350*350*350 mm Figure 41. Shipping Information Note: 1 tray = 500 pcs 1 box = 5 trays = 5 * 100 pcs = 2500pcs Shanghai High-Flying Electronics Technology Co., Ltd www.hi-flying.
HF-A21-SMT Embedded WiFi Module User Manual 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; LAN IP address: 10.10.100.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual 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; LAN IP address: 10.10.99.254 (Different net segment with WAN port); -- See “Application Setting Page” --See “AP Interface Setting Page” Module 3# Setting: Works as STA mode; --See “Mode Selection Page” WAN connection type: Static IP: 10.10.100.
HF-A21-SMT Embedded WiFi Module User Manual 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.
HF-A21-SMT Embedded WiFi Module User Manual APPENDIX B: EVB REFERENCE DESIGN Shanghai High-Flying Electronics Technology Co., Ltd www.hi-flying.
HF-A21-SMT Embedded WiFi Module User Manual 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.
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.