Hi, This is a patch against AA which fixes it for us:

wpa_supplicant: fix beacon_int configuration option

wpa_supplicant expects beacon_int instead of beacon_interval in its config file.

diff --git a/package/hostapd/files/wpa_supplicant.sh b/package/hostapd/files/wpa_supplicant.sh
index 0b5e1d3..bd86801 100644
--- a/package/hostapd/files/wpa_supplicant.sh
+++ b/package/hostapd/files/wpa_supplicant.sh
@@ -119,13 +119,13 @@ wpa_supplicant_setup_vif() {
                ;;
        esac

-       local fixed_freq bssid1 beacon_interval brates mrate
+       local fixed_freq bssid1 beacon_int brates mrate
        config_get ifname "$vif" ifname
        config_get bridge "$vif" bridge
        config_get ssid "$vif" ssid
        config_get bssid "$vif" bssid
        bssid1=${bssid:+"bssid=$bssid"}
-       beacon_interval=${beacon_int:+"beacon_interval=$beacon_int"}
+       beacon_int=${beacon_int:+"beacon_int=$beacon_int"}

        local br brval brsub brstr
        [ -n "$basic_rate_list" ] && {
@@ -163,7 +163,7 @@ network={
        $proto
        $freq
        ${fixed:+"fixed_freq=1"}
-       $beacon_interval
+       $beacon_int
        $brates
        $mrate
        $ht_str

On 10/10/2013 12:17 AM, Ben West wrote:
I believe this problem appeared on or about r36682, which coincides with
a hostapd update to AA.  This suggests a regression in hostapd w/r/t/ to
beacon interval code.

I can confirm the same problem happens when attempting to specify
beacon_int on a single psk2-encrypted adhoc interface, not just with
multi-VAPs as with the original poster.  My test was on an Engenius
EOC-1650, atheros platform, running Attitude Adjustment r38347 that I
compiled.

The error quoted below goes away when I comment out the "beacon_int"
line in /etc/config/wireless.  Likewise, this wireless config, with the
beacon_int line, works just fine under Attitude Adjustment r36669,
before the hostapd update.

root@OpenWRT:~# wifi restart
command failed: Device or resource busy (-16)
Successfully initialized wpa_supplicant
Line 12: unknown network field 'beacon_interval'.
Line 33: failed to parse network block.
Failed to read or parse configuration '/var/run/wpa_supplicant-wlan0.conf'.
enable_mac80211(radio0): Failed to set up wpa_supplicant for interface wlan0

root@OpenWRT:~# cat /etc/config/wireless
config wifi-device  radio0
     option type     mac80211
     option channel  4
     option hwmode   11g
     option macaddr  00:02:6F:XX:XX:XX
     option beacon_int       337
     option diversity 0
     option disabled 0

config wifi-iface
     option network 'mesh'
     option mode 'adhoc'
     option device 'radio0'
     option ssid 'MyMesh'
     option bssid '02:CA:FF:EE:BA:BF'
     option hidden '0'
     option encryption 'psk2'
     option key 'blahblahblahblahblah'

root@OpenWRT:~# cat /var/run/wpa_supplicant-wlan0.conf
ctrl_interface=/var/run/wpa_supplicant-wlan0
ap_scan=2
network={
     mode=1
     scan_ssid=0
     ssid="MyMesh"
     bssid=02:CA:FF:EE:BA:BF
     key_mgmt=WPA-PSK
     proto=RSN
     frequency=2427
     fixed_freq=1
     beacon_interval=337

     psk="blahblahblahblahblah"

}

root@OpenWRT:~# cat /etc/openwrt_release
DISTRIB_ID="MyCustomWRT"
DISTRIB_RELEASE="CustomV2.1"
DISTRIB_REVISION="r38347"
DISTRIB_CODENAME="pre-release"
DISTRIB_TARGET="atheros/generic"
DISTRIB_DESCRIPTION="My Custom Release"

On Fri, Jun 28, 2013 at 9:07 PM, cmsv <c...@wirelesspt.net
<mailto:c...@wirelesspt.net>> wrote:

    Info:
    http://wiki.openwrt.org/doc/uci/wireless#wpa.enterprise.access.point


    configuration:

    /etc/config# cat wireless

    config wifi-device 'radio0'
             option type 'mac80211'
             option phy 'phy0'
             option hwmode '11ng'
             option noscan '1'
             option disabled '0'
             option diversity '0'
             option rxantenna '2'
             option txantenna '2'
             option txpower '20'
             option beacon_int '1000'
             option distance '2000'
             list ht_capab 'RX-HT40-SGI'
             list ht_capab 'TX-STBC'
             list ht_capab 'RX-STBC1'
             list ht_capab 'DSSS_CCK-40'
             option channel '1'
             option country 'PT'
             option htmode 'HT20'
             option beacon_int '1000'

    config wifi-iface
             option device 'radio0'
             option ifname 'wlan0'
             option network 'lan'
             option mode 'ap'
             option ssid 'test.net <http://test.net>'
             option hidden '0'
             option encryption 'none'


    config wifi-iface
             option device 'radio0'
             option ifname 'adhoc0'
             option network 'mesh'
             option mode 'adhoc'
             option bssid '02:16:e8:6a:0b:1e'
             option ssid 'mesh.test'
             option hidden '0'
             option macfilter 'allow'
             option encryption 'psk2'
             option key '1234567890'

    Problem:

    wifi down
    wifi up
    command failed: Device or resource busy (-16)
    Configuration file: /var/run/hostapd-phy0.conf
    Using interface wlan0 with hwaddr 5f:e9:98:5c:3e:36 and ssid
    "test.net <http://test.net>"

    Successfully initialized wpa_supplicant
    Line 12: unknown network field 'beacon_interval'.
    Line 33: failed to parse network block.

    Failed to read or parse configuration
    '/var/run/wpa_supplicant-adhoc0.conf'.
    enable_mac80211(radio0): Failed to set up wpa_supplicant for interface
    adhoc0


    Details:

    # cat /var/run/wpa_supplicant-adhoc0.conf
    ctrl_interface=/var/run/wpa_supplicant-adhoc0
    ap_scan=2
    network={
             mode=1
             scan_ssid=0
             ssid="mesh.test"
             bssid=02:16:c8:6e:0f:1e
             key_mgmt=WPA-PSK
             proto=RSN
             frequency=2472
             fixed_freq=1
             beacon_interval=1000

             htmode=HT20

             psk="1234567890"


    Linux version 3.3.8 (cmsv@net) (gcc version 4.6.3 20120201 (prerelease)
    (Linaro GCC 4.6-2012.02) ) #1 Thu Jun 27 22:23:26 EDT 2013
    DISTRIB_ID="OpenWrt"
    DISTRIB_RELEASE="Attitude Adjustment"
    DISTRIB_REVISION="r37034"
    DISTRIB_CODENAME="attitude_adjustment"
    DISTRIB_TARGET="ar71xx/generic"
    DISTRIB_DESCRIPTION="OpenWrt Attitude Adjustment 12.09"



    Conclusion:
    It does seem that wpa_supplicant is not compatible with option
    beacon_int . However if i remove this option from the configuration or
    specify it as option beacon_interval; then wpa_supplicant works for the
    specified interface.

    Is this a bug, incompatibility or something was not updated to work with
    with wpa_supplicant ?

    Also; will this option work if specified as beacon_interval in
    /et/config/wireless ? The wiki describes it as
    beacon_int






    --





    Site: http://wirelesspt.net
    Mesh: http://tinyurl.com/wirelesspt
    Admin: http://wirelesspt.net/wiki/Cmsv
    Twitter: http://twitter.com/wirelesspt
    Suporte técnico via sms: 91 19 11 798
    Donativos/Paypal: http://tinyurl.com/doar-verba
    Chave publica PGP/SSH: http://wirelesspt.net/arquivos/pk
    Email assinado digitalmente pelo emissor assegurando autenticidade


    _______________________________________________
    openwrt-users mailing list
    openwrt-us...@lists.openwrt.org <mailto:openwrt-us...@lists.openwrt.org>
    https://lists.openwrt.org/mailman/listinfo/openwrt-users




--
Ben West
http://gowasabi.net
b...@gowasabi.net <mailto:b...@gowasabi.net>
314-246-9434 <tel:314-246-9434>


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to