From f5753aae233fa64b5d4784ade2cc170f7da539a4 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 22 Nov 2018 20:53:09 +0100 Subject: hostapd: add support for WPS pushbutton station similar to hostapd, also add a ubus interface for wpa_supplicant which will allow handling WPS push-button just as it works for hostapd. In order to have wpa_supplicant running without any network configuration (so you can use it to retrieve credentials via WPS), configure wifi-iface in /etc/config/wireless: config wifi-iface 'default_radio0' option device 'radio0' option network 'wwan' option mode 'sta' option encryption 'wps' This section will automatically be edited if credentials have successfully been acquired via WPS. Size difference (mips_24kc): roughly +4kb for the 'full' variants of wpa_supplicant and wpad which do support WPS. Signed-off-by: Daniel Golle --- package/network/services/hostapd/files/hostapd.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'package/network/services/hostapd/files/hostapd.sh') diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 7f3157cd27..7335e75fd5 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -762,6 +762,9 @@ wpa_supplicant_add_network() { hostapd_append_wep_key network_data append network_data "wep_tx_keyidx=$wep_keyidx" "$N$T" ;; + wps) + key_mgmt='WPS' + ;; psk|sae|psk-sae) local passphrase @@ -869,7 +872,10 @@ wpa_supplicant_add_network() { append network_data "mcast_rate=$mc_rate" "$N$T" } - cat >> "$_config" <> "$_config" + else + cat >> "$_config" <