Modify

Opened 7 years ago

Closed 7 years ago

#7935 closed defect (fixed)

sta cannot connect to hidden ap unless ap_scan=2 is set

Reported by: ari@… Owned by: jow
Priority: normal Milestone: Backfire 10.03.1
Component: base system Version: Backfire 10.03.1 RC2
Keywords: Cc:

Description

I have one openwrt backfire box running AP with multiple ssids (d-link 825, ar71xx).
It is configured like this:

config wifi-iface                                                               
        option device   radio0                                                  
        option network lan                                                      
        option mode     ap                                                      
        option ssid     xxx-wbb                                             
        option encryption psk2                                                  
        option key      'xxxxxxxxxxxx'                                        
        option wds      1                                                       
        option hidden 1                                                         
                                                                                
config wifi-iface                                                               
        option device   radio0                                                  
        option network lan                                                      
        option mode     ap                                                      
        option ssid     yyyy                                                 
        option encryption psk2                                                  
        option key      'yyyyyyyyyyyy'                                        

Then, I have several boxes running in sta mode against this AP, configured like this:

config wifi-iface
        option device   radio0
        option network  lan
        option mode     sta
        option ssid     xxx-wbb
        option encryption psk2
        option wds 1
        option key 'xxxxxxxxx'

These are d-link 825 (ar71xx) and buffalo (brcm47xx).
All boxes are running recent backfire branch versions.

Everything works ok if AP ssids are not hidden. But once I add
'hidden 1' to AP configuration following happens:

When STA box is rebooted it associates and things work ok. But when AP is rebooted after this, connection is not re-established until the STA is rebooted also.

After some trial/error I found out that adding ap_scan=2 to wpa_supplicant-wlan0.conf fixes the error. This is just fine, except there is no way to add
this parameter via /etc/config/wireless (I ended up with editing /lib/wifi/wpa_supplicant.sh).

Please add a way to specify this with config file. Also, if there is some other solution to problem I can easily test that.

Attachments (0)

Change History (8)

comment:1 Changed 7 years ago by jow

Did you notice any negative effects with ap_scan=2 permanently set?

comment:2 Changed 7 years ago by ari@…

Buffalo box has been using that and I haven't noticed anything unusual, it seems to work ok.

I was thinking about changing wpa_supplicant.sh script so that if type is "sta" and "hidden" is "1" then set ap_scan=2. But I don't know if that would be a good solution.

comment:3 Changed 7 years ago by ari@…

Here is a patch for wpa_supplicant.sh:

--- wpa_supplicant.sh.orig      Wed Jan  7 19:32:07 1970
+++ wpa_supplicant.sh   Wed Jan  7 20:02:52 1970
@@ -104,10 +104,22 @@
        config_get bridge "$vif" bridge
        config_get ssid "$vif" ssid
        config_get bssid "$vif" bssid
+       config_get hidden "$vif" hidden
        bssid=${bssid:+"bssid=$bssid"}
+
+       case "$hidden" in
+               1)
+                       ap_scan=2
+               ;;
+               *)
+                       ap_scan=1
+               ;;
+       esac
+
        rm -rf /var/run/wpa_supplicant-$ifname
        cat > /var/run/wpa_supplicant-$ifname.conf <<EOF
 ctrl_interface=/var/run/wpa_supplicant-$ifname
+ap_scan=$ap_scan
 network={
        scan_ssid=1
        ssid="$ssid"

comment:4 Changed 7 years ago by jow

  • Owner changed from developers to jow
  • Status changed from new to accepted

comment:5 Changed 7 years ago by ari@…

I have been using ap_scan=2 for one buffalo (brcm47xx) and three d-link 825 (ar71xx) boxes for several weeks now. There have been no problems at all (these are links which are monitored constantly, so I would know).

comment:6 Changed 7 years ago by ari@…

I updated my brcm47xx (ie. buffalo) to r24009. Seems that ap_scan=2 is no longer needed, connection works OK without it.
I'll have to try with ar71xx (ie. d-link 825) boxes also.

comment:7 Changed 7 years ago by ari@…

I updated three d-link 825 boxes to newest version from backfire branch. Seems that connecting to hidden AP works ok *without* ap_scan setting. The actual problem must have been somewhere else and fixed by recent updates.

I think this ticket can be closed.

comment:8 Changed 7 years ago by jow

  • Resolution set to fixed
  • Status changed from accepted to closed

Thank you for the feedback.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.