Uniform AG1311 Contactless Smart Card Reader Module User Manual
Uniform Industrial Corp. Contactless Smart Card Reader Module Users Manual
Uniform >
Users Manual
ŇŏĵıijłġʼnŢųťŸŢųŦġŔűŦŤį őųŦűŢųŦť łűűųŰŷŦť œŦŷŪŴŪŰů Description ĹıijįIJIJůġŸŪŧŪġŔźŴŵŦŮġŎŰťŶŭŦ System CPU Flash DRAM RTC Ethernet RF łŵũŦųŰŴġłœĺĴĴIJġĩłœIJĴIJIJĪ ĹġŎŃ ĴijġŎŃ ŏŰ IJıİIJııġŎţűŴġŇŢŴŵġņŵũŦųůŦŵġīijġĩŰűŵŪŰůŢŭġŵŰġŐůŦġœŋĮĵĶĪ IJŕIJœĭġĹıijįIJIJůĭġũŪĮűŰŸŦųġĩĶııġŮŸĪ(2.4GHz Band) Switch port Power Input DC jack I/O & Peripherial JTAG RS-232 (console) USB USB extension Wifi antenna LEDs Reset Button Environmental PCB dimension Housing Operating temperature Humidity ĶŗĭġŮŪůŪŅńġŋŢŤŬ ŏİł ŤŰůŴŰŭŦġűŰųŵġŸŪŵũġĵĮűŪůġűŪůġũŦŢťġŤŰůůŦŤŵŰų ŐůŦġűŰųŵĭġŖŔŃġijįıġũŰŴŵ ķĮűŪůġŦŹŵŦůťŦťġŧųŰŮġŖŔŃġűŰųŵ ŷŪŢġŔŎłġœŇġŤŰůůŦŤŵŰųġŧŰųġŦŹŵŦųůŢŭġŢůŵŦůůŢ ķġōņŅŴ ŚŦŴĭġŔŰŧŵŸŢųŦġœŦŴŦŵ ĶĸŮŮġīġĸıġŮŮ ŕŅŃ ıƱńġſĶıƱń ĺıĦġůŰůĮŤŰůťŦůŴŪŷŦ ŌŦůůźġńũŦů ŔűŦůŤŦųġńũŦů ŷŦųġIJįIJ ĴįIJIJįijıIJĴ GPIO definition ňőŊŐġı ňőŊŐġIJĴ ňőŊŐġIJĸ őŰŸŦų ňőŊŐġijĸ ňőŊŐġijķ ňőŊŐġijı ňőŊŐġijĴ ňőŊŐġIJij ōņŅġIJ ōņŅġij ōņŅġĴ ōņŅġĵ ōņŅġĶ ōņŅġķ ŊƳńġŅŢŵŢ ŊƳńġńŭŰŤŬ œŦŴŦŵġţŶŵŵŰůġĩŴŰŧŵŸŢųŦġœŦŴŦŵĪ Revision record ųŦŷįIJįIJŎ PRELIMINARY Revision History Revision Date Description 0.5 November 2008 Original Release 0.6 November 2008 Updated to include Web interface and configuration methods. 0.7 Jan 2010 Updated for UMAC baseline PRELIMINARY Table of Contents 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4 1.4.1 1.4.2 1.5 1.6 2.1 2.2 2.3 2.3.1 2.3.1.1 2.3.1.2 2.3.1.3 2.3.1.4 2.3.2 2.3.2.1 2.3.2.2 2.3.2.3 2.3.3 2.3.3.1 2.3.3.2 2.4 2.4.1 2.4.2 2.4.2.1 2.4.2.2 2.4.2.3 2.4.2.4 2.4.2.5 2.4.2.6 2.4.2.6.1 2.4.3 2.5 2.5.1 Introduction................................................................................................................................................ 6 Top Level architecture ........................................................................................................................ 6 Fusion Overview ................................................................................................................................. 6 Lower MAC ........................................................................................................................................ 7 HAL .................................................................................................................................................... 7 ATH .................................................................................................................................................... 7 Rate Control ........................................................................................................................................ 7 Packet Logging ................................................................................................................................... 8 DFS ..................................................................................................................................................... 8 Upper MAC ........................................................................................................................................ 8 802.11 Layer ....................................................................................................................................... 8 Shim Layer.......................................................................................................................................... 8 WLAN Driver Interface and OS Abstraction Layer ........................................................................... 9 WBUF Abstraction ............................................................................................................................. 9 User Interface ........................................................................................................................................... 10 Configuration File ............................................................................................................................. 10 Environmental Variables................................................................................................................... 10 Shell Scripts ...................................................................................................................................... 19 Initialization Scripts .......................................................................................................................... 26 rcS ..................................................................................................................................................... 27 rc.network ......................................................................................................................................... 27 rc.bridge ............................................................................................................................................ 27 rc.wlan............................................................................................................................................... 27 Driver Operation Scripts ................................................................................................................... 27 makeVAP.......................................................................................................................................... 28 activateVAP ...................................................................................................................................... 29 killVAP ............................................................................................................................................. 29 Compatibility Scripts ........................................................................................................................ 29 apup................................................................................................................................................... 29 apdown.............................................................................................................................................. 29 Wireless Tools .................................................................................................................................. 30 iwconfig ............................................................................................................................................ 30 iwpriv ................................................................................................................................................ 32 Radio Layer....................................................................................................................................... 33 Protocol Layer................................................................................................................................... 41 WMM related.................................................................................................................................... 42 Security Related ................................................................................................................................ 44 802.11n related.................................................................................................................................. 48 Regulatory commands....................................................................................................................... 52 General commands .................................................................................................................... 54 Changing parameters using iwconfig and iwpriv.............................................................................. 63 wlanconfig utility .............................................................................................................................. 63 Creating a VAP ................................................................................................................................. 63 PRELIMINARY Listing VAP Parameters.................................................................................................................... 63 2.5.2 2.5.2.1 Station (sta) ....................................................................................................................................... 64 2.5.2.2 AP List (ap)....................................................................................................................................... 65 2.5.2.3 Channel (chan) .................................................................................................................................. 65 2.5.2.4 Capabilities (caps)............................................................................................................................. 66 2.5.2.5 WMM Configuration (wme) ............................................................................................................. 66 2.5.3 Deleting a VAP ................................................................................................................................. 66 AP Configuration Guide .......................................................................................................................... 67 3.1 AP Modes of Operation .................................................................................................................... 67 3.1.1 Network Configuration ..................................................................................................................... 67 3.1.1.1 Bridged Mode ................................................................................................................................... 67 3.1.1.2 Static IP address Mode...................................................................................................................... 67 3.1.1.3 DHCP Client ..................................................................................................................................... 67 3.1.1.4 DHCP Server .................................................................................................................................... 67 3.1.2 Radio Configuration.......................................................................................................................... 68 3.1.3 Operating Mode ................................................................................................................................ 68 3.2 Security ............................................................................................................................................. 69 3.2.1 WEP Configuration........................................................................................................................... 69 3.2.2 WPA.................................................................................................................................................. 69 3.2.2.1 Enabling WPA Preauthorization (AP only) ...................................................................................... 69 3.2.2.2 WPA PSK ......................................................................................................................................... 70 3.2.2.3 WPA Enterprise ................................................................................................................................ 70 3.2.3 WSC Configuration........................................................................................................................... 70 3.2.3.1 Including WSC in the build............................................................................................................... 70 3.2.3.2 Activating WSC support on the AP .................................................................................................. 70 3.3 VLAN Configuration ........................................................................................................................ 71 3.3.1 Bridge configuration in mBSSID and VLAN mode ......................................................................... 72 3.4 Multiple BSS..................................................................................................................................... 72 3.4.1 Multiple Open APs............................................................................................................................ 72 3.4.2 Multiple AP’s with different security modes .................................................................................... 73 3.4.3 Changing Parameters in mBSSID Modes ......................................................................................... 73 3.5 Wi-Fi Distribution System (WDS).................................................................................................... 73 3.5.1 AP With Single WDS Repeater ........................................................................................................ 73 3.5.1.1 Limitations ........................................................................................................................................ 73 3.5.1.2 Setup Instructions.............................................................................................................................. 74 3.5.2 AP with Multiple Repeaters .............................................................................................................. 74 3.5.2.1 Limitations ........................................................................................................................................ 75 3.5.2.2 Setup Instructions.............................................................................................................................. 75 3.5.3 WDS Bridge with single span ........................................................................................................... 75 3.5.3.1 Limitations ........................................................................................................................................ 75 3.5.3.2 Setup Instructions.............................................................................................................................. 76 3.5.4 WDS Bridge with multiple span ....................................................................................................... 76 3.5.4.1 Limitations ........................................................................................................................................ 76 3.5.4.2 Setup Instructions.............................................................................................................................. 77 3.6 Dual Concurrent Operations ............................................................................................................. 77 Appendix A Country Code Definition.......................................................................................................................... 78 PRELIMINARY Introduction This manual provides information on the design and use of the Atheros AP system. This system consists of the OS kernel, utility functions, and the Atheros AP Driver. 1.1 Top Level architecture This driver is based on the Atheros Universal Driver Architecture. This architecture abstracts the WLAN driver into various common sections that can be used for a variety of operating systems. OS specific components are well isolated, and the Atheros Driver Framework (ADF) provides abstractions of OS services such that the common code does not have to have ANY OS specific coding. The data packet abstraction, called WBUF, allows the driver to handle different OS specific frame formats in a common way. This abstraction has been used with both SKB and MBUF frame architectures successfully, and also works with Windows frame architectures. The software design is moved to a further modularized architecture that allows for better isolation of data items and object oriented design. . Global variables are eliminated, and all layer functions are contained within a call structure. 1.2 Fusion Overview The main driver for the Fusion architecture was the use of a common code base to support multiple operating systems. This allows for more efficient development processes, as well as the synergy of getting bug fixes for all major platforms at the same time. The Fusion architecture consists of 4 major components. The first is the WLAN driver interface, which is the operating system unique interface adaptor that translates OS specific calls to Fusion “generic” calls. The second is the Upper MAC layer, which contains the bulk of the 802.11 protocol processing for both station and AP applications. In earlier versions of Fusion, this layer was implemented specifically for each operating system. In later versions, a common version of the Upper MAC is used to provide the protocol processing layer. The third component is the Lower MAC, which contains the ATH and HAL layers. This layer is much more hardware centric, and is designed to support the needs of the Atheros chipset architecture. The fourth component is the OS Abstraction layer. This is a set of macros that is used to redefine “generic’ OS primitives into specific system calls that perform the required function. Functions such as register read/write, translation of OS packets into WBUF abstractions, and tasking control are all included in this section. A block diagram of the components and their relationship are shown in Figure 1. ˪˴̅́˼́˺ʳ 15.21 "Changes or modifications are not expressly approved by the manufacturer could void the user's authority to operate the equipment." The following sentence has to be displayed on the outside of device in which the transmitter module is installed "Contains FCC ID: TFJAG1311 " This device uses, generates and radiated radio frequency energy. The radio frequency energy produced by this device is well below the maximum exposure allows by Federal Communications Commission(FCC). PRELIMINARY WLAN Driver Interface OS Abstraction Layer IEEE 802.11 Protocol Stack STA/AP SME Scanning/Roaming MLME Config Mgmt Frm PM Base Objects (channel, ic, node, VAP) LMAC Interface Atheros Device Object (ath dev) ATH DEV Rate Control Packet Logging DFS Hardware Abstraction Layer AR5212 AR5416 Figure 1 Fusion Top Level Block Diagram 1.3 Lower MAC The Lower MAC portion consists of two main components: The Hardware Abstraction Layer (HAL), and the Atheros Device Object (ATH). The HAL contains all chip-specific settings and procedures that are performed to initialize and operate the device. The ATH layer is responsible for managing the data flow into the input queues of the hardware, as well as managing lower layer protocols, such as Block ACK processing. 1.3.1 HAL HAL provides low-level primitives to program Atheros chipsets. HAL abstraction will allow runtime support of multiple chipset families and defines a common body of functions between chipsets with chipset differences being handled in specific components. Only low-level driver components can interface directly with HAL. 1.3.2 ATH ATH_DEV module implements the low level MAC functionalities including: Unified transmit and receive path for both legacy and 11n chipsets. Advanced 11n MAC features: aggregation, RIFS, MIMO power save, etc. 802.11 network power save and device power state (D0-D3) management. Beacon generation and TSF management. Wake-On-Wireless support. Key cache management. RfKill, Customized LED and GPIO algorithms ATH_DEV can be accessed through Atheros device object interface (section 1.2) by protocol shim layer. 1.3.3 Rate Control The rate control algorithm attempts to transmit unicast packets at the optimum data rate. If there are changes in the propagation channel, the rate control algorithm will automatically step up or down to a data rate that allows reliable transmission at the fastest possible rate. The rate control can only be accessed by ath_dev, and should not by protocol stacks. PRELIMINARY 1.3.4 Packet Logging Packet logging provides a low level mechanism to capture driver activities. It can log activities like transmit, receive, rate find and update, aggregation, ANI, and etc. Different operating system shall have its own tool to enable packet log and retrieve the log buffer. 1.3.5 DFS the DFS or Dynamic Frequency y Selection algorithm, , which enables wireless devices This module implements g in the 5GHz band to detect the presence a systems. is detected, the wireless operating of radar If a radar system device must avoid interfering with it and mustt automatically switch to another frequency. 1.4 Upper MAC The Upper MAC is the portion of the MAC that performs most of the 802.11 protocol processing, and provides the interface to the OS networking stack. In the Fusion implementation, the Upper MAC consists of the 802.11 layer, and the so-called “shim” layer. 1.4.1 802.11 Layer Most wireless LAN device driver today consists of two major components: a protocol stack and a low-level driver. Usually the protocol stack contains IEEE802.11 state machine, scanning/roaming, IE processing, and other device independent support needed by an 802.11 device. Although the functionalities of a protocol stack are largely platform independent, the actual implementation is often platform specific. Many protocol stacks are available. The protocol stacks with the most support in the Fusion driver are the net80211 derivatives. They have been ported to NetBSD, Linux, Darwin, and Windows Vista. Another popular stack is Devicescape’s 802.11 stack in Linux kernel. Microsoft also has a separate stack for SoftAP on Vista. 1.4.2 Shim Layer The Shim layer is provided in order to minimize changes to upper layers that have been implemented for nonfusion architectures. Since the HAL/ATH layers try to encapsulate internal data and only provide interfaces through the operations interface, the upper layer no longer have direct access to variables within the lower layers. The Shim layer is provided to expose various state and configuration variables to the upper layers in order to minimize changes to the upper layers. The Shim layer uses the standard interfaces to the ATH/HAL layers to obtain state information. Since everything is written in the “C” language, this is enforced more through coding convention than through language restrictions. Because of the protocol stack is largely device independent, while a low level driver is protocol independent, a protocol shim layer is required to connect different components of the wireless LAN driver. Most importantly, it has the following operations: Register with IEEE802.11 protocol stack. Register with operating system’s network stack. Manage low level driver object (ath_dev, see section 1.4). Forward packets between protocol stack and low level driver. Translate control request and event indication between protocol stack and low level driver. Figure 2 illustrates the operations of protocol shim layer. PRELIMINARY net80211 Packets net80211 Requests net80211 APIs IF_ATH Packets ath_dev APIs ath_dev Indications ATH_DEV Figure 2 UMAC Shim Layer 1.5 WLAN Driver Interface and OS Abstraction Layer Each operating system has its own networking and wireless driver interface, such as NDIS 6.0 with Revised Native WiFi in Windows Vista. The WLAN driver interface allows the driver to register with kernel, and defines data path and configuration path from/to network stack, such as OID for Windows Vista, iwconfig/iwpriv tools for Linux, and etc. OS abstraction layer is a set of kernel services used by wireless LAN driver. A separate implementation is required for each platform. By having a consistent API across all platforms, driver developers can focus on the core wireless LAN logic. Currently supported operating systems are: NetBSD, Linux and Windows Vista. 1.6 WBUF Abstraction A wbuf (wireless buffer) is a platform independent object to represent a network buffer. In WLAN world, it also represents an MSDU passed down by the protocol stack. The low level driver components treat wbuf as an opaque object defined by type wbuf_t, and access it only through a well defined interface. The wbuf APIs can be found in include/wbuf.h. Each platform should implement the same set of APIs in their OS abstraction layer. Usually the wbuf is associated with or mapped to native network buffer structures. PRELIMINARY User Interface The user interface on the Linux AP baseline provides a rich set of capabilities via command line tools, and also provides a simplified web interface that can be used for quick AP configuration. The user interface is based on shell scripts and a configuration utility that will store configuration information in flash. The web interface also uses this utility to store information through boot cycles. 2.1 Factory Default File The file /etc/ath/apcfg contains the “factory default” information for the AP. This is the data that is used to configure the device in the absence of other configuration information. If the configuration information is erased, this data will repopulate the configuration information files. The default values included in this file can be changed if the user so desires. 2.2 Configuration Tool The purpose of the cgiMain utility is to provide a small program size mechanism for managing environmental configuration information in as efficient manner as possible. Major consideration has been applied to small footprint environments, where JFFS2 filesystem space is at a premium. Further, if no configuration information needs to be changed in the JFFS2 filesystem, the cramfs can be used to further reduce the flash footprint of the overall system. 2.2.1 Design The main design intent was to provide a busybox like environment that can be used as a CGI program for getting environmental information, and further providing output formatting that will make the web pages easily configurable, but dynamic. This was done in lieu of other larger implementations, such as PHP or Python, simply for the smaller size requirement, and the customization required to use flash resources effectively. The main engine will receive an input file and “translate” it, changing specially tagged parameters into their equivalent values. For example, let’s say that we have an environmental variable called AP_SSID, whose value is AP24. Further, let’s say we have a configuration file that has a line in the file of the form ssid=. We can put a tagged reference to the environmental variable in the configuration file, and then “translate” it to a scratch file: Original file: Translated file: ssid=~~AP_SSID~ ssid=AP24 The translated file can be written to /tmp (ram disk), thus not requiring any more flash space to support the translation. A typical command line to implement this would be # cgiMain –t2 /etc/ath/PSK.ap_bss > /tmp/vap2sec.bss Where /etc/ath/PSK.ap_bss is the file containing the tags, and /tmp/vap0sec.bss is the file containing the translated version with tags replaced with values. 10 PRELIMINARY 2.2.1.1 Variable Names All tags work with the names of environmental variables. These are passed either through the CGI interface when doing HTML pages, and/or read from the stored environmental data. There are two types of variable names used by the program: Fixed Names: The standard name with no additions, like AP_SSID Indexed Names: When variables are indexed by instance, they will typically have an extension, such as AP_SSID_2. The indexed names are expressed as AP_SSID#, where the # is replaced by the index as specified in the –t (translate) option All variable names fall within these two categories. Indexed names can be used in any tag value 2.2.1.2 File Tags The used tag types are designed to support two main efforts. First, they will allow an HTML page to be created with tagged information that will be translated through the CGI interface. Secondly, in a command line format, it can be used to manage the values stored in the flash/cache areas, allowing the user to have either temporary or permanent parameter storage. Table 1 defines the available tags. Table 1 Available File Tags Tag Usage Example ~~VAR_NAME~ ~~VAR_NAME#~ Direct replacement of the environmental variable with its value. Variable must exist to produce a value. If the value does not exist, the tag is erased and no characters are substituted. ~~AP_SSID~ ~~AP_SSID#~ ~~VAR_NAME:default~ ~~VAR_NAME#:default~ Direct Replacement with Default. If the variable exists, then its value is inserted. If it does not exist, then the “default” string will be substituted. ~~AP_STARTMODE:dual~ ~~AP_CHMODE#:11NAHT20~ ~`exec str`~ Execute the program or script enclosed in ` ` markers. The output of these programs will be processed to be displayable in HTML format (non breaking spaces will be added, and tabs translated). Note that any stderr output is not caught, and should be piped to /dev/null if to be used in a web page. ~`athstats 2>/dev/null`~ ~cVAR_NAME:VAL~ ~cVAR_NAME#:VAL Used for checkboxes in HTML files ~sVAR_NAME:VAL~ ~sVAR_NAME:VAL~ ~?VAR_NAME:VAL`exec str`~ ~?VAR_NAME#:VAL`exec str`~ 11 PRELIMINARY 2.2.1.3 Flash Usage This program seeks to eliminate extra usage of flash resources by using an existing sector for storing date (the calibration sector). Note that the board and radio calibration data only take up the first 32 KB of flash storage, leaving the second 32 KB available. The permanent storage area for parameter data is put into this area without using a filesystem – the data is simply written to flash as a linear string of data. Parameters are stored in the “NAME=VALUE” format. The first 4 bytes of the data are flagged with a know value (0xfaf30020) as a synchronization value to verify the data is valid (as opposed to an “erased” flash). The data is assumed terminated if a value of 0x0 is found (note that all data is stored as ASCII, and can be read/edited in flash using u-boot). A limit of 32 characters for variable names, and 64 characters for values are imposed. Adding the “=” and the terminators, each value has a maximum of 98 characters used. This means that a total number of (32768-4)/98 = 334 parameters can be stored in this area. Since many parameter names and values are much shorter, an estimate of 450-500 parameters is not unreasonable. Note that parameters will only take up the space required, not the full 32/64 byte area. The following is an example “dump” of the parameter data in flash: ar7100> md 0xbf668000 bf668000: faf30020 49504144 bf668010: 36382e31 2e320a49 bf668020: 352e3235 352e3235 bf668030: 503d3139 322e3136 bf668040: 4e4d4153 4b3d3235 bf668050: 352e300a 41505f53 bf668060: 5f486f6c 64656e0a bf668070: 323d4150 35305f48 bf668080: 5f504153 53504852 bf668090: 65310a41 505f5041 bf6680a0: 5f323d66 726f7a65 bf6680b0: 3d686572 650a0000 2.2.1.4 44523d31 504d4153 352e300a 382e322e 352e3235 5349443d 41505f53 6f6c6465 4153453d 53535048 0a5a4849 0000fbb7 39322e31 4b3d3235 57414e49 310a5741 352e3235 41503234 5349445f 6e0a4150 6672617a 52415345 46454e47 ffc1f6f7 ... IPADDR=192.1 68.1.2.IPMASK=25 5.255.255.0.WANI P=192.168.2.1.WA NMASK=255.255.25 5.0.AP_SSID=AP24 _Holden.AP_SSID_ 2=AP50_Holden.AP _PASSPHRASE=fraz e1.AP_PASSPHRASE _2=froze.ZHIFENG =here........... Cache File For temporary changes, a cache file is located in /tmp/.apcfg. This file contains the same type of information that is in the flash, but is not permanent. This is used to perform updates to parameters during a run, but it is not desired to commit these changes to flash. Note that a specific commit operation is required to update the flash area. 2.2.2 Tool Usage The intended use for this is for both a web server interface, and for script access to permanent variables. Having a single program to perform this function will save on flash space. 2.2.2.1 Web Server Usage HTML files that define web pages usually contain static content, unless they have embedded java code. In order to get dynamic content (without using something like PHP or java) something is required to modify the pages such that they display the dynamic data as required. This is accomplished by linking the page name to the cgiMain program. A web server will execute programs/scripts as part of the Computer Gateway Interface (CGI). This allows a program to be run to generate the web page content as required. This interface is exploited for this function. The Busybox httpd daemon will execute as a CGI program any page that is located in the /usr/www/cgi-bin directory. In order to have separate pages that reference the same program, the same method that Busybox uses is used here. Page names are soft linked to /usr/www/cgi-bin/cgiMain. The cgiMain program uses the argv[0] (the name of the program) to determine which html page to process to produce the web content. This works in the exact same way as the file translation mode of the cgiMain program, changing tagged values into their value strings, or in special cases indicating which parameters have been “set” to specific values. 12 PRELIMINARY An example of a tagged HTML page:
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.6 Linearized : Yes Author : slee Create Date : 2013:10:22 10:31:08+08:00 Modify Date : 2013:10:22 10:31:08+08:00 Title : XMP Toolkit : Adobe XMP Core 5.2-c001 63.139439, 2010/09/27-13:37:26 Metadata Date : 2013:10:22 10:31:08+08:00 Creator Tool : PScript5.dll Version 5.2.2 Format : application/pdf Creator : slee Document ID : uuid:ecad52d8-1dbc-45a1-890c-891935eaedce Instance ID : uuid:cf10e945-a6f1-4fcd-b48a-7e0cbf206d68 Producer : Adobe Acrobat 10.1.7 Page Count : 83EXIF Metadata provided by EXIF.tools