OpenWrt Forum Archive

Topic: WPS issue with ar9331 in station mode

The content of this topic has been archived on 27 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi, i have ar9331 SoC module I am using with openwrt, i can do wps in ap and station mode. This works almost always well when i am connecting a phone to it when the device is in ap mode, but most of the times, it does not work when it is in station mode and I try to connect it to another ap which has wps. for both modes, i have wps_pbc in wireless configs, and i initiate wps by using hostapd_cli or wpa_supplicant_cli using wps_pbc method.  How can this issue be debugged?

Also, i need to have both ap and sta mode enabled at the same time, but when I do, the ap SSID seems to go on and off, any way to fix this? the sta mode is needed only for scanning other aAPs.

tavish1 wrote:

Hi, i have ar9331 SoC module I am using with openwrt, i can do wps in ap and station mode. This works almost always well when i am connecting a phone to it when the device is in ap mode, but most of the times, it does not work when it is in station mode and I try to connect it to another ap which has wps. for both modes, i have wps_pbc in wireless configs, and i initiate wps by using hostapd_cli or wpa_supplicant_cli using wps_pbc method.  How can this issue be debugged?

Also, i need to have both ap and sta mode enabled at the same time, but when I do, the ap SSID seems to go on and off, any way to fix this? the sta mode is needed only for scanning other aAPs.

What does your station mode wireless configuration look like?

Hi

Stattion mode uci config is:

config wifi-device 'radio0'
        option type 'mac80211'
        option phy 'phy0'
        option hwmode '11ng'
        option htmode 'HT20'
        list ht_capab 'SHORT-GI-20'
        list ht_capab 'SHORT-GI-40'
        list ht_capab 'RX-STBC1'
        list ht_capab 'DSSS_CCK-40'
        option disabled '0'
        option country 'US'
        option txpower '21'
        option channel '11'

config wifi-iface
        option device 'radio0'
        option mode 'sta'
        option network 'wwan'
        option channel 'auto'
        option encryption 'psk2'
        option ssid 'someAP
        option key 'password123

generated wpa_supplicant config is :

update_config=1
network={
        scan_ssid=1
        ssid="someAP"
        key_mgmt=WPA-PSK
        psk="password123"
        proto=RSN
}

AP mode config is:

config wifi-iface
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option encryption 'psk2'
        option key '12345678'
        option wps_pushbutton '1'
        option ssid 'Blueshark'
        option disabled '0'


Generated hostapd config is:

driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
country_code=US
ieee80211d=1
hw_mode=g
channel=11

ieee80211n=1
ht_capab=[SHORT-GI-20][SHORT-GI-40][RX-STBC1][DSSS_CCK-40]

interface=wlan0
ctrl_interface=/var/run/hostapd
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
wpa_passphrase=12345678
auth_algs=1
wpa=2
wpa_pairwise=CCMP
eap_server=1
ap_pin=12345670
wps_state=2
ap_setup_locked=0
device_type=6-0050F204-1
device_name=OpenWrt AP
manufacturer=openwrt.org
config_methods=push_button
ssid=Blueshark
bridge=br-lan
okc=0
disable_pmksa_caching=1
bssid=c4:93:00:00:73:ca

As for doing SSID scan while in station mode, I found I can use iw dev wlan0 scan.

The discussion might have continued from here.