path: root/wpa_supplicant/examples
Commit message (Collapse)AuthorAgeFilesLines
* Fix bashisms in wps-ap-cli scriptLed2014-12-141-3/+6
| | | | | | | Option '-p' of 'read' command may be unsupported in some POSIX-complete shells. So replace 'read -p' with 'echo -n'/'read' pair. Signed-off-by: Oleksandr Chumachenko <ledest@gmail.com>
* NFC: Workaround nfcpy message debug exceptionJouni Malinen2014-02-132-0/+34
| | | | | | | | | | | The current nfcpy version does not support new WSC connection handover message format and the handover server fails to process the request due to a debug print. As a temporary workaround, override HandoverServer::_process_request() with a version that avoids pretty() print of the handover messages. This can be removed once nfcpy has been updated to support the new format. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* NFC: Add summary and success file options for nfcpy scriptsJouni Malinen2014-02-122-50/+140
| | | | | | | These can be used to get updates on NFC operation status and success for external programs. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P NFC: Add p2p-nfc.py --handover-only optionJouni Malinen2014-02-121-0/+7
| | | | | | | | | | p2p-nfc.py allowed an NFC Tag to be read and reported to wpa_supplicant even in cases where it was explicitly asked to initiate negotiated connection handover and return after completing this operation. The new command line argument can be used to disable NFC Tag read operations when a negotiated connection handover is expected. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P NFC: Clean up p2p-nfc.py error handlingJouni Malinen2014-02-111-5/+12
| | | | | | | | If wpa_supplicant reports a failure when trying to generate a handover request, detect that before trying to decode the response as a hex string. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Disable DNS server from dnsmasqJouni Malinen2014-01-271-1/+1
| | | | | | | This avoids issues with multiple instances of dnsmasq running, e.g., with one on eth0 and the other one for the P2P group. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P NFC: Add script for connection handover with nfcpyJouni Malinen2014-01-271-0/+581
| | | | Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS NFC: Protect nfcpy pretty print calls against exceptionsJouni Malinen2014-01-271-7/+25
| | | | | | | nfcpy does not yet support all the new message formats, so some of the pretty() calls can result in exceptions. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS NFC: nfcpy script to use new connection handover designJouni Malinen2014-01-271-8/+2
| | | | | | | | Fetch a carrier record from wpa_supplicant instead of full handover request. This makes it easier for external programs to build handover request messages with multiple alternative carriers. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS NFC: Logging level configuration to wps-nfc.py and wps-ap-nfc.pyJouni Malinen2014-01-271-1/+7
| | | | Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS NFC: Clean up nfcpy script no-wait operationsJouni Malinen2014-01-271-5/+20
| | | | | | This allows the scripts to terminate at proper point with --no-wait. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS NFC: Validate ctrl_iface response before decoding itJouni Malinen2014-01-271-3/+10
| | | | | | | | If the operation fails for any reason ("FAIL" response), it is cleaner to return error clearly instead of hitting an exception in the hex decoder. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS NFC: Use argparse in the nfcpy scriptsJouni Malinen2014-01-271-31/+30
| | | | | | This cleans up command line parsing and simplifies the commands. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS NFC: Update wps-nfc.py and wps-ap-nfc.py to use new nfcpy APIJouni Malinen2014-01-271-141/+121
| | | | | | This moves many of the peer discovery operations into the core nfcpy. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Add support for IP address assignment in 4-way handshakeJouni Malinen2014-01-271-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | This new mechanism allows P2P Client to request an IPv4 address from the GO as part of the 4-way handshake to avoid use of DHCP exchange after 4-way handshake. If the new mechanism is used, the assigned IP address is shown in the P2P-GROUP-STARTED event on the client side with following new parameters: ip_addr, ip_mask, go_ip_addr. The assigned IP address is included in the AP-STA-CONNECTED event on the GO side as a new ip_addr parameter. The IP address is valid for the duration of the association. The IP address pool for this new mechanism is configured as global wpa_supplicant configuration file parameters ip_addr_go, ip_addr_mask, ip_addr_star, ip_addr_end. For example: ip_addr_go= ip_addr_mask= ip_addr_start= ip_addr_end= DHCP mechanism is expected to be enabled at the same time to support P2P Devices that do not use the new mechanism. The easiest way of managing the IP addresses is by splitting the IP address range into two parts and assign a separate range for wpa_supplicant and DHCP server. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* NFC: Add no waiting and no multiple operations options for scriptsJouni Malinen2013-04-271-16/+47
| | | | | | | | The nfcpy script used to be run in a way that left them running for multiple operations. This is not desired for some use cases, so provide options to request only a single operation to be performed. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS NFC: Allow configuration token to be built from network blockJouni Malinen2013-04-011-3/+9
| | | | | | | "WPS_NFC_CONFIG_TOKEN <WPS/NDEF> <network id>" can now be used to build an NFC configuration token from a locally configured network. Signed-hostap: Jouni Malinen <j@w1.fi>
* Convert WPS NFC python scripts from using wpactrl to wpaspyJouni Malinen2013-03-161-4/+3
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Add AP mode NFC connection handover with wpa_supplicant/nfcpyJouni Malinen2013-02-241-1/+8
| | | | Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS NFC: Add connection handover support for ERJouni Malinen2013-02-241-4/+82
| | | | | | | | | wpa_supplicant can now generate the WPS carrier record for connection handover response when acting as an ER. The AP whose configuration is provided in this way is identified with an UUID as an argument to wps-nfc.py. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Add wps-er-config command for writing config token from ERJouni Malinen2013-02-241-0/+33
| | | | | | | UUID of the AP is specified on the command line to select which configuration is used. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Add support for config token generation with wpa_supplicantJouni Malinen2013-02-151-0/+33
| | | | | | | | When wpa_supplicant is controlling an AP mode interface, it can generate the NFC configuration token similarly to the way this is done in hostapd. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Allow password token to be written with nfcpyJouni Malinen2013-02-151-0/+33
| | | | | | | This adds write-password option for the nfcpy example script for wpa_supplicant to match hostapd wps-ap-nfc.py functionality. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Report NFC connection handover completion differentlyJouni Malinen2013-02-111-4/+6
| | | | | | | | Instead of reporting only one connection handover message, report completion of NFC connection handover with carrier record from both the request and select messages. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Change listen time to match nfcpy default (250 ms)Jouni Malinen2013-02-101-1/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Report only the carrier record from NFC to wpa_supplicantJouni Malinen2013-02-101-1/+16
| | | | | | | | Since there could be multiple carrier records, it is cleaner to report only the WPS carrier record instead of full NFC connection handover select to wpa_supplicant. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Fetch only the carrier record from wpa_supplicant for NFCJouni Malinen2013-02-101-5/+17
| | | | | | | | Since there could be multiple carrier records, it is cleaner to build only the WPS carrier record instead of full NFC connection handover request within wpa_supplicant. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Clean up debug prints with nfcpyJouni Malinen2013-02-101-1/+8
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Remove 0.5 sec extra wait from NFC handover with nfcpyJouni Malinen2013-02-101-1/+0
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Use alternating poll/listen for NFC peer discovery with nfcpyJouni Malinen2013-02-101-19/+40
| | | | | | | This is needed to find the NFC peer to avoid cases where both devices could be using the same operation. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Configure logging to show nfcpy log messageJouni Malinen2013-02-101-1/+4
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Add support for NFC connection handover with nfcpyJouni Malinen2012-11-041-2/+65
| | | | | | | This helper script can now handle both reading of a NFC tag and initiation of NFC connection handover if a peer NFC device is touched. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Move NFC tag processing into a separate functionJouni Malinen2012-11-041-22/+29
| | | | | | | This makes it cleaner to add processing of other NFC operations to the python script. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Move wpactrl setup into a separate functionJouni Malinen2012-11-041-4/+12
| | | | | | This makes it easier to share this functionality for new NFC use cases. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Add an example python script for NFC operationsJouni Malinen2012-11-031-0/+84
| | | | | | | wps-nfc.py uses nfcpy and python-wpactrl to provide NFC tag information to wpa_supplicant for WPS operations. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Add D-Bus python script to perform DisconnectMichael Naumov2012-08-041-0/+169
| | | | | | | | D-Bus script using python glib is added to perform Disconnect on an interface. Signed-hostap: Michael Naumov <michael.naumov@intel.com> Signed-hostap: Nirav Shah <nirav.j2.shah@intel.com>
* P2P: Add D-Bus python script to perform p2p_inviteMichael Naumov2012-08-041-0/+201
| | | | | | | | D-Bus script using python glib is added to perform p2p_invite on a group interface to invite a peer. Signed-hostap: Michael Naumov <michael.naumov@intel.com> Signed-hostap: Nirav Shah <nirav.j2.shah@intel.com>
* P2P: Add D-Bus python scripts to perform additional commandsMichael Naumov2012-07-044-0/+746
| | | | | | | | Four D-Bus scripts using python glib are added to perform the following operations: p2p_flush, p2p_group_add, p2p_listen and p2p_stop_find. Signed-hostap: Michael Naumov <michael.naumov@intel.com> Signed-hostap: Nirav Shah <nirav.j2.shah@intel.com>
* P2P: Add dbus python scripts to perform p2p_find and p2p_connectMichael Naumov2012-06-302-0/+491
| | | | | | | | | | Two DBUS scripts using python glib are added to perform p2p_find and p2p_connect operations respectively. p2p_connect script just performs the traditional connect to create a new p2p group. Additional updates will be required to perform join, auth etc. al. Signed-hostap: Michael Naumov <michael.naumov@intel.com> Signed-hostap: Nirav Shah <nirav.j2.shah@intel.com>
* DBus: Add ability to report probe requestsJohannes Berg2012-04-011-0/+62
| | | | | | | | | | | | | | | | Some applications require knowing about probe requests to identify devices. This can be the case in AP mode to see the devices before they connect, or even in P2P mode when operating as a P2P device to identify non-P2P peers (P2P peers are identified via PeerFound signals). As there are typically a lot of probe requests, require that an interested application subscribes to this signal so the bus isn't always flooded with these notifications. The notifications in DBus are then unicast only to that application. A small test script is also included. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* Fix BSS property names in the example D-Bus scriptJouni Malinen2012-01-011-2/+2
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Add example WPS AP mode UI for wpa_supplicantJouni Malinen2011-12-011-0/+78
| | | | | | | This script shows some minimal WPS user interface requirements for mobile AP support with wpa_supplicant. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Fix typos found by codespellPavel Roskin2011-09-211-2/+2
| | | | Signed-off-by: Pavel Roskin <proski@gnu.org>
* P2P: Use alternative way of starting dnsmasq if neededJouni Malinen2010-11-261-2/+8
| | | | | | | Some other dnsmasq users (like libvirt) seem to be binding the DHCP server to all interfaces which prevents the previously used mechanism here from working (bind on the DHCP socket fails). If a failure is noticed, try to start dnsmasq with -z option to avoid that.
* P2P: Add an example p2p-action script for udhcpc/udhcpdJouni Malinen2010-09-092-0/+189
* P2P: Add support for cross connectionJouni Malinen2010-09-091-0/+21
| | | | | | | | If enabled, cross connection allows GO to forward IPv4 packets using masquerading NAT from the P2P clients in the group to an uplink WLAN connection. This is disabled by default and can be enabled with "wpa_cli p2p_set cross_connect 1" on the P2P device interface.
* P2P: wpa_cli action calls for P2P group started/removed eventsJouni Malinen2010-09-091-0/+56
* Do not inhibit suspend even if wpa_cli command failsJouni Malinen2010-02-271-0/+2
| | | | | | There is no point in inhibiting suspend in case wpa_supplicant is not running and as such, return success unconditionally from this script.
* Add suspend/resume notificationsJouni Malinen2010-02-271-0/+17
| | | | | | wpa_supplicant can now be notified of suspend/resume events, e.g., from pm-action scripts. This allows wpa_supplicant to clear information that may become invalid during a suspend operation.
* dbus: Change WPA/RSNIE byte array props to dictsWitold Sowa2010-01-161-4/+4
| | | | | | | Expose RSN and WPA properties for BSS objects containing information about key management and cipher suites. Get rid of WPA/RSN/WPSIE byte array properties and add IEs byte array property with all IE data instead.