⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme-wps

📁 最新的Host AP 新添加了许多pcmcia 的驱动
💻
字号:
hostapd and Wi-Fi Protected Setup (WPS)=======================================This document describes how the WPS implementation in hostapd can beconfigured and how an external component on an AP (e.g., web UI) isused to enable enrollment of client devices.Introduction to WPS-------------------Wi-Fi Protected Setup (WPS) is a mechanism for easy configuration of awireless network. It allows automated generation of random keys (WPApassphrase/PSK) and configuration of an access point and clientdevices. WPS includes number of methods for setting up connectionswith PIN method and push-button configuration (PBC) being the mostcommonly deployed options.While WPS can enable more home networks to use encryption in thewireless network, it should be noted that the use of the PIN andespecially PBC mechanisms for authenticating the initial key setup isnot very secure. As such, use of WPS may not be suitable forenvironments that require secure network access without chance forallowing outsiders to gain access during the setup phase.WPS uses following terms to describe the entities participating in thenetwork setup:- access point: the WLAN access point- Registrar: a device that control a network and can authorize  addition of new devices); this may be either in the AP ("internal  Registrar") or in an external device, e.g., a laptop, ("external  Registrar")- Enrollee: a device that is being authorized to use the networkIt should also be noted that the AP and a client device may changeroles (i.e., AP acts as an Enrollee and client device as a Registrar)when WPS is used to configure the access point.More information about WPS is available from Wi-Fi Alliance:http://www.wi-fi.org/wifi-protected-setuphostapd implementation----------------------hostapd includes an optional WPS component that can be used as aninternal WPS Registrar to manage addition of new WPS enabled clientsto the network. In addition, WPS Enrollee functionality in hostapd canbe used to allow external WPS Registrars to configure the accesspoint, e.g., for initial network setup. In addition, hostapd can proxy aWPS registration between a wireless Enrollee and an external Registrar(e.g., Microsoft Vista or Atheros JumpStart) with UPnP.hostapd configuration---------------------WPS is an optional component that needs to be enabled in hostapd buildconfiguration (.config). Here is an example configuration thatincludes WPS support and uses madwifi driver interface:CONFIG_DRIVER_MADWIFI=yCFLAGS += -I/usr/src/madwifi-0.9.3CONFIG_EAP=yCONFIG_WPS=yCONFIG_WPS_UPNP=yFollowing section shows an example runtime configuration(hostapd.conf) that enables WPS:# Configure the driver and network interfacedriver=madwifiinterface=ath0# WPA2-Personal configuration for the APssid=wps-testwpa=2wpa_key_mgmt=WPA-PSKwpa_pairwise=CCMP# Default WPA passphrase for legacy (non-WPS) clientswpa_passphrase=12345678# Enable random per-device PSK generation for WPS clients# Please note that the file has to exists for hostapd to start (i.e., create an# empty file as a starting point).wpa_psk_file=/etc/hostapd.psk# Enable control interface for PBC/PIN entryctrl_interface=/var/run/hostapd# Enable internal EAP server for EAP-WSC (part of Wi-Fi Protected Setup)eap_server=1# WPS configuration (AP configured, do not allow external WPS Registrars)wps_state=2ap_setup_locked=1# If UUID is not configured, it will be generated based on local MAC address.uuid=87654321-9abc-def0-1234-56789abc0000wps_pin_requests=/var/run/hostapd.pin-reqdevice_name=Wireless APmanufacturer=Companymodel_name=WAPmodel_number=123serial_number=12345device_type=6-0050F204-1os_version=01020300config_methods=label display push_button keypad# if external Registrars are allowed, UPnP support could be added:#upnp_iface=br0#friendly_name=WPS Access PointExternal operations-------------------WPS requires either a device PIN code (usually, 8-digit number) or apushbutton event (for PBC) to allow a new WPS Enrollee to join thenetwork. hostapd uses the control interface as an input channel forthese events.When a client device (WPS Enrollee) connects to hostapd (WPSRegistrar) in order to start PIN mode negotiation for WPS, anidentifier (Enrollee UUID) is sent. hostapd will need to be configuredwith a device password (PIN) for this Enrollee. This is an operationthat requires user interaction (assuming there are no pre-configuredPINs on the AP for a set of Enrollee).The PIN request with information about the device is appended to thewps_pin_requests file (/var/run/hostapd.pin-req in this example). Inaddition, hostapd control interface event is sent as a notification ofa new device. The AP could use, e.g., a web UI for showing activeEnrollees to the user and request a PIN for an Enrollee.The PIN request file has one line for every Enrollee that connected tothe AP, but for which there was no PIN. Following information isprovided for each Enrollee (separated with tabulators):- timestamp (seconds from 1970-01-01)- Enrollee UUID- MAC address- Device name- Manufacturer- Model Name- Model Number- Serial Number- Device categoryExample line in the /var/run/hostapd.pin-req file:1200188391	53b63a98-d29e-4457-a2ed-094d7e6a669c	Intel(R) Centrino(R)	Intel Corporation	Intel(R) Centrino(R)	-	-	1-0050F204-1Control interface data:WPS-PIN-NEEDED [UUID-E|MAC Address|Device Name|Manufacturer|Model Name|Model Number|Serial Number|Device Category]For example:<2>WPS-PIN-NEEDED [53b63a98-d29e-4457-a2ed-094d7e6a669c|02:12:34:56:78:9a|Device|Manuf|Model|Model Number|Serial Number|1-0050F204-1]When the user enters a PIN for a pending Enrollee, e.g., on the webUI), hostapd needs to be notified of the new PIN over the controlinterface. This can be done either by using the UNIX domain socket-based control interface directly (src/common/wpa_ctrl.c provideshelper functions for using the interface) or by calling hostapd_cli.Example command to add a PIN (12345670) for an Enrollee:hostapd_cli wps_pin 53b63a98-d29e-4457-a2ed-094d7e6a669c 12345670If the UUID-E is not available (e.g., Enrollee waits for the Registrarto be selected before connecting), wildcard UUID may be used to allow the PIN to be used once with any UUID:hostapd_cli wps_pin any 12345670After this, the Enrollee can connect to the AP again and complete WPSnegotiation. At that point, a new, random WPA PSK is generated for theclient device and the client can then use that key to connect to theAP to access the network.If the AP includes a pushbutton, WPS PBC mode can be used. It isenabled by pushing a button on both the AP and the client at about thesame time (2 minute window). hostapd needs to be notified about the APbutton pushed event over the control interface, e.g., by callinghostapd_cli:hostapd_cli wps_pbcAt this point, the client has two minutes to complete WPS negotiationwhich will generate a new WPA PSK in the same way as the PIN methoddescribed above.Credential generation and configuration changes-----------------------------------------------By default, hostapd generates credentials for Enrollees and processingAP configuration updates internally. However, it is possible tocontrol these operations from external programs, if desired.The internal credential generation can be disabled withskip_cred_build=1 option in the configuration. extra_cred option willthen need to be used to provide pre-configured Credential attribute(s)for hostapd to use. The exact data from this binary file will be sent,i.e., it will have to include valid WPS attributes. extra_cred canalso be used to add additional networks if the Registrar is used toconfigure credentials for multiple networks.Processing of received configuration updates can be disabled withwps_cred_processing=1 option. When this is used, an external programis responsible for creating hostapd configuration files and processingconfiguration updates based on messages received from hostapd overcontrol interface. This will also include the initial configuration onfirst successful registration if the AP is initially set inunconfigured state.Following control interface messages are sent out for external programs:WPS-REG-SUCCESS <Enrollee MAC address <UUID-E>For example:<2>WPS-REG-SUCCESS 02:66:a0:ee:17:27 2b7093f1-d6fb-5108-adbb-bea66bb87333This can be used to tricker change from unconfigured to configuredstate (random configuration based on the first successful WPSregistration). In addition, this can be used to update AP UI about thestatus of WPS registration progress.WPS-NEW-AP-SETTINGS <hexdump of AP Setup attributes>For example:<2>WPS-NEW-AP-SETTINGS 10260001011045000c6a6b6d2d7770732d74657374100300020020100f00020008102700403065346230343536633236366665306433396164313535346131663462663731323433376163666462376633393965353466316631623032306164343438623510200006024231cede15101e000844This can be used to update the externally stored AP configuration andthen update hostapd configuration (followed by restarting of hostapd).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -