ath6kl and ieee80211n

Drasko DRASKOVIC drasko.draskovic
Wed Nov 13 03:41:50 PST 2013


Hi Kalle,
I am referring again to the problem below as I do not find the
adequate solution.

Can you please tell me if ath6kl can work in AP in 802.11n?

This can be obtained by putting explicitly ieee80211n=1 in hostapd.conf.

Please find below simple hostapd.conf I use:



#sets the wifi interface to use, is wlan0 in most cases
interface=wlan0

#driver to use, nl80211 works in most cases
driver=nl80211

#sets the ssid of the virtual wifi access point
ssid=TEST

#sets the mode of wifi, depends upon the devices you will be using. It
can be a,b,g,n. Setting to g ensures backward compatiblity.
hw_mode=g
ieee80211n=1

#sets the channel for your wifi
channel=6

#Sets authentication algorithm
#1 - only open system authentication
#2 - both open system authentication and shared key authentication
auth_algs=3

#####Sets WPA and WPA2 authentication#####
#wpa option sets which wpa implementation to use
#1 - wpa only
#2 - wpa2 only
#3 - both
wpa=1

#sets wpa passphrase required by the clients to authenticate
themselves on the network
wpa_passphrase=ilovedevialet

#sets wpa key management
wpa_key_mgmt=WPA-PSK

#sets encryption used by WPA
wpa_pairwise=TKIP

#sets encryption used by WPA2
rsn_pairwise=CCMP





Also, small ap.sh script that can help you for testing, to start/stop
quickly hostapd and dns server and

root at box:~# cat ap.sh
#!/bin/bash

cmd="${1:-start}"

nicer_ps() {
    find /proc -path '*/exe' -maxdepth 2 -exec readlink '{}' ';'
}

if [ $cmd = "start" ]; then
    # In case there is a wpa_supplicat running - kill it
    # Otherwise it will move iface to Managed mode during ifupdown
needed for scan
    if [ -n "$(nicer_ps | grep wpa_supplicant)" ]
    then
        echo "Kill wpa_supplicant"
        killall wpa_supplicant
    fi

    #Initial wifi interface configuration
    ip link set down dev wlan0
    ip addr flush wlan0
    ip link set up dev wlan0
    #ip addr add ${GATEWAY}/24 dev ${WIFI_IFACE}
    ifconfig wlan0 up 10.0.0.1 netmask 255.255.255.0

    ###########Start dnsmasq, modify if required##########
    #Doesn't try to run dnsmasq when already running
    if [ -z "$(nicer_ps | grep dnsmasq)" ]
    then
        echo "Staring dnsmasq..."
        dnsmasq
    fi
    ###########

    ### Start hostapd
    #hostapd -B /etc/hostapd.conf
    hostapd -B ./hostapd.conf

    # Give some time
    #sleep 1

elif [ $cmd = "stop" ]; then
    killall dnsmasq
    killall hostapd

    ifconfig wlan0 down
fi


Best regards,
Drasko



On Thu, Oct 31, 2013 at 4:29 PM, Drasko DRASKOVIC
<drasko.draskovic at gmail.com> wrote:
> HI all,
> I have AR6004 USB dongle connected to Linux kernel 3.10, and am
> testing latest hostapd.
>
> I noticed that I was able to put the dongle in the AP mode only for
> not-n mode (a or g).
>
> Enabling both of these options:
> hw_mode=g
> ieee80211n=1
>
> gives an error like this on starting:
>
> random: Trying to read entropy from /dev/random
> Configuration file: /home/drasko/hostapd.conf
> HT (IEEE 802.11n) with WPA/WPA2 requires CCMP/GCMP to be enabled,
> disabling HT capabilities
> rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
> rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
> rfkill: initial event: idx=2 type=2 op=0 soft=0 hard=0
> rfkill: initial event: idx=5 type=1 op=0 soft=0 hard=0
> nl80211: Using driver-based roaming
> nl80211: Supports Probe Response offload in AP mode
> nl80211: Disable use_monitor with device_ap_sme since no monitor mode
> support detected
> nl80211: interface wlan3 in phy phy3
> nl80211: Add own interface ifindex 6
> nl80211: Set mode ifindex 6 iftype 3 (AP)
> nl80211: Setup AP - device_ap_sme=1 use_monitor=0
> nl80211: Subscribe to mgmt frames with AP handle 0x1441480 (device SME)
> nl80211: Register frame type=0xd0 nl_handle=0x1441480
> nl80211: Register frame match - hexdump(len=0): [NULL]
> nl80211: Enable Probe Request reporting nl_preq=0x14414c0
> nl80211: Register frame type=0x40 nl_handle=0x14414c0
> nl80211: Register frame match - hexdump(len=0): [NULL]
> BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
> nl80211: Regulatory information - country=FR
> nl80211: 2402-2482 @ 40 MHz
> nl80211: 2402-2482 @ 20 mBm
> nl80211: 5170-5250 @ 40 MHz
> nl80211: 5170-5250 @ 20 mBm
> nl80211: 5250-5330 @ 40 MHz
> nl80211: 5250-5330 @ 20 mBm
> nl80211: 5490-5710 @ 40 MHz
> nl80211: 5490-5710 @ 27 mBm
> nl80211: 57240-65880 @ 2160 MHz
> nl80211: 57240-65880 @ 40 mBm
> nl80211: Added 802.11b mode based on 802.11g information
> Completing interface initialization
> Mode: IEEE 802.11g  Channel: 7  Frequency: 2442 MHz
> DFS 0 channels required radar detection
> nl80211: Set freq 2442 (ht_enabled=1, vht_enabled=0, bandwidth=20 MHz,
> cf1=2442 MHz, cf2=0 MHz)
> nl80211: Failed to set channel (freq=2442): -22 (Invalid argument)
> Could not set channel for kernel driver
> wlan3: Unable to setup interface.
> wlan3: Flushing old station entries
> nl80211: flush -> DEL_STATION wlan3 (all)
> wlan3: Deauthenticate all stations
> nl80211: sta_remove -> DEL_STATION wlan3 ff:ff:ff:ff:ff:ff --> 0 (Success)
> wpa_driver_nl80211_set_key: ifindex=6 (wlan3) alg=0 addr=(nil)
> key_idx=0 set_tx=0 seq_len=0 key_len=0
> wpa_driver_nl80211_set_key: ifindex=6 (wlan3) alg=0 addr=(nil)
> key_idx=1 set_tx=0 seq_len=0 key_len=0
> wpa_driver_nl80211_set_key: ifindex=6 (wlan3) alg=0 addr=(nil)
> key_idx=2 set_tx=0 seq_len=0 key_len=0
> wpa_driver_nl80211_set_key: ifindex=6 (wlan3) alg=0 addr=(nil)
> key_idx=3 set_tx=0 seq_len=0 key_len=0
> nl80211: Skip disabling of Probe Request reporting
> nl_preq=0x8888888889cc9c49 while in AP mode
> netlink: Operstate: linkmode=0, operstate=6
> nl80211: Set mode ifindex 6 iftype 2 (STATION)
> nl80211: Disable Probe Request reporting nl_preq=0x8888888889cc9c49
> nl80211: Unsubscribe mgmt frames handle 0x8888888889cc9c09 (AP
> teardown (dev SME))
> Failed to initialize interface
>
> I have tried several channels - all were rejected with the same message.
>
> Any idea where these error messages come from?
>
> How can I obtain more debugging messages in hostapd to examine this issue?
>
>
> Best regards,
> Drasko



More information about the Hostap mailing list