You are not logged in.

#1 2013-01-16 16:07:19

Nekroman
Member
Registered: 2011-10-02
Posts: 51

Hostapd and WPA2

Hello,
my hostapd is not working with WPA2. Few days ago, it worked, but not now. Only WEP is working and WEP isn't supporting HT. Here is output of hostapd:

Configuration file: /etc/hostapd/hostapd2.conf
HT (IEEE 802.11n) with WEP is not allowed, disabling HT capabilities
Using interface wlan0 with hwaddr 9c:4e:36:31:71:6c and ssid 'Hotspot2'
wlan0: STA 00:22:f4:36:fe:c8 IEEE 802.11: authenticated
wlan0: STA 00:22:f4:36:fe:c8 IEEE 802.11: associated (aid 1)
wlan0: AP-STA-CONNECTED 00:22:f4:36:fe:c8
wlan0: STA 00:22:f4:36:fe:c8 RADIUS: starting accounting session 50F6CD54-00000000
wlan0: AP-STA-DISCONNECTED 00:22:f4:36:fe:c8
wlan0: STA 00:22:f4:36:fe:c8 IEEE 802.11: disassociated due to inactivity
wlan0: STA 00:22:f4:36:fe:c8 IEEE 802.11: deauthenticated due to inactivity

I can't connect with my devices (mobile phone and tablet), they say Problem with authentification. Here is my hostapd2.conf

interface=wlan0
driver=nl80211
#bridge=br0
ieee80211n=1
wmm_enabled=1
ssid=Hotspot2
country_code=CZ
ieee80211d=1
hw_mode=g
channel=7
ht_capab=[SHORT-GI-40]

wep_default_key=0
wep_key0=*********

auth_algs=3
#wpa=3
#wpa_passphrase=*********
#wpa_key_mgmt=WPA-PSK
#wpa_pairwise=TKIP
#rsn_pairwise=CCMP
macaddr_acl=0
#eap_reauth_period=9000000

I have Intel 2200 wifi.

Offline

#2 2013-01-16 22:29:22

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Hostapd and WPA2

Hostapd has recently been upgraded to 2.0, so there a problem with your config. On the top of my head, I would set "auth_algs=1" and "wpa=2" (for wpa2). Also, commet out all wep variables. Here is the config which works for me with hostap 1.1 and 2.0:
https://bbs.archlinux.org/viewtopic.php … 9#p1182129


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#3 2013-01-17 15:51:56

hoanglan87
Member
Registered: 2009-01-01
Posts: 8

Re: Hostapd and WPA2

the new hostapd does not work on my system.

this is my conf: (which worked with hostapd 1.1, downgrade did help)

interface=wlan0
driver=nl80211
logger_stdout=-1
logger_stdout_level=2
ssid=mythuy
hw_mode=g
channel=6
auth_algs=3
max_num_sta=10
wpa=2
wpa_passphrase=123456789
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP

here is error code:

sudo hostapd -d /etc/hostapd/hostapd.conf 
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
nl80211: interface wlan0 in phy phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Using driver-based off-channel TX
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: TDLS supported
nl80211: TDLS external setup
nl80211: Add own interface ifindex 3
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Setup AP - device_ap_sme=0 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x938410
nl80211: Register frame type=0xb0 nl_handle=0x938410
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0x0 nl_handle=0x938410
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0x20 nl_handle=0x938410
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0xa0 nl_handle=0x938410
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0xc0 nl_handle=0x938410
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0xd0 nl_handle=0x938410
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Failed to set interface wlan0 into AP mode
netlink: Operstate: linkmode=0, operstate=6
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211 driver initialization failed.

Offline

#4 2013-01-17 18:00:37

Nekroman
Member
Registered: 2011-10-02
Posts: 51

Re: Hostapd and WPA2

Changing my hostapd didn't help. I noticed it stopped working since last update of hostapd. Downgrade didn't help.

Offline

#5 2013-01-17 19:14:24

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: Hostapd and WPA2

You refer to your conf file as "/etc/hostapd/hostapd2.conf" but the last restart was with "/etc/hostapd/hostapd.conf", or am I misreading your post?

And the log says that AP mode failed, so are your driver working? Has wlan0 changed name?

Offline

#6 2013-01-17 19:15:36

Nekroman
Member
Registered: 2011-10-02
Posts: 51

Re: Hostapd and WPA2

It wasn't me smile Look on name of that user wink

Offline

#7 2013-01-20 02:52:59

b4t3m4n
Member
From: -> Here <-
Registered: 2006-04-10
Posts: 27

Re: Hostapd and WPA2

Not sure if this is related, but I have followed several guides, tried many different configs and I am not getting any errors, but I cannot authenticate WPA2.  I just installed hostapd so its not an old config issue.  It works if I disable auth.

Offline

#8 2013-01-20 11:26:18

Nekroman
Member
Registered: 2011-10-02
Posts: 51

Re: Hostapd and WPA2

Me too.

Offline

#9 2013-01-22 05:18:34

aatoma
Member
Registered: 2013-01-22
Posts: 29

Re: Hostapd and WPA2

Hi all,

I am facing a very similar issue.
After upgrading to 2.0, hostapd fails to start with the sequence

nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Failed to set interface wlan0 into AP mode
netlink: Operstate: linkmode=0, operstate=6
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211 driver initialization failed.

My config file is

interface=wlan0
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=hostap
hw_mode=g
channel=1
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=1
accept_mac_file=/etc/hostapd/hostapd.accept
auth_algs=3
ignore_broadcast_ssid=0
wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
ieee80211n=1
ht_capab=[HT40][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]
eapol_key_index_workaround=0
eap_server=0
own_ip_addr=127.0.0.1
wpa=2
wpa_psk_file=/etc/hostapd/hostapd.wpa_psk
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP

and still works if I downgrade to 1.1
Different values for auth_algs didn't help.
Any idea?

Thank you and regards.
Antonio.

Offline

#10 2013-01-22 17:37:54

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Hostapd and WPA2

You guys are having major issues with the drivers not hostapd.conf. Simply put, hostap CAN NOT put the card in Access Point mode.

I _suspect_ this is related to the recent rework of nl80211 code in hostap (http://w1.fi/gitweb/gitweb.cgi?p=hostap … /ChangeLog). So, what is your hardware? Do you eevn have wlan0 (/usr/sbin/iw dev wlan0 link or /usr/sbin/ip link show)?

I am currently running hostap 2.0 with a DLink DWA-552 card. I build hostap myself, but my build config is similar to community/hostap:

$ gr -v -e ^$ -e ^# ~/archlinux-local-builds/hostapd/config
CONFIG_DRIVER_NL80211=y
CONFIG_RSN_PREAUTH=y
CONFIG_EAP=y
CONFIG_EAP_MD5=y
CONFIG_EAP_TLS=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_PEAP=y
CONFIG_PKCS12=y
CONFIG_IEEE80211N=y
CONFIG_DEBUG_FILE=y
CONFIG_NO_ACCOUNTING=y
CONFIG_NO_RADIUS=y
CONFIG_NO_VLAN=y
CONFIG_NO_RANDOM_POOL=y
CONFIG_LIBNL32=y

NOTE: DO NOT use CONFIG_NO_RANDOM_POOL=y if you don't have an entropy harvesting tool like haveged.

Last edited by Leonid.I (2013-01-22 17:38:24)


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#11 2013-01-23 09:01:40

aatoma
Member
Registered: 2013-01-22
Posts: 29

Re: Hostapd and WPA2

Hi Leonid.I,

I'm using Arch x86_64, if this matters, my hardware is Atheros AR9285 using ath9k driver.
wlan0 shows up and works in master mode if I use hostapd 1.1 or in managed mode if I configure it via dhcpcd.
I also have haveged installed (entropy well above 1000).

Thanks.
Antonio.

Last edited by aatoma (2013-01-24 13:16:16)

Offline

#12 2013-01-24 00:10:38

tschuliaen
Member
Registered: 2013-01-24
Posts: 4

Re: Hostapd and WPA2

I have exactly the same issue, downgrading hostapd worked.

I'm using this (lsusb)

Bus 001 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

on a Raspberry Pi.

Offline

#13 2013-01-24 13:26:05

aatoma
Member
Registered: 2013-01-22
Posts: 29

Re: Hostapd and WPA2

Wrote an email to the hostapd mailing list.
Let's wait and see the outcome.

Antonio.

Offline

#14 2013-01-29 07:46:25

progandy
Member
Registered: 2012-05-17
Posts: 5,229

Re: Hostapd and WPA2

I had problems with setting my adapter in AP-mode with hostapd 2, too. (the old hostapd worked) I have:
- Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
- no bridges, simple NAT
- NetworkManager

I fixed it this way:
- disable wifi in networkmanager (nmcli nm wlan off)
- rfkill unblock wlan (since nm also set the rfkill switch)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#15 2013-01-30 08:15:55

aatoma
Member
Registered: 2013-01-22
Posts: 29

Re: Hostapd and WPA2

Nothing from hostapd mailing list so far.
@progandy: thanks for the hint, but I'm working on a server setup with no nm installed and manual configuration via files.

Antonio.

Offline

#16 2013-01-30 14:12:42

progandy
Member
Registered: 2012-05-17
Posts: 5,229

Re: Hostapd and WPA2

aatoma wrote:

Nothing from hostapd mailing list so far.
@progandy: thanks for the hint, but I'm working on a server setup with no nm installed and manual configuration via files.

Antonio.

Maybe you can compare our config files:

interface=wlan0
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
dump_file=/tmp/hostapd.dump
ctrl_interface=/run/hostapd
ctrl_interface_group=0
ssid=My_SSID
country_code=EN
hw_mode=g
channel=7
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
eapol_key_index_workaround=0
eap_server=0
wpa=2
wpa_passphrase=~~PASSPHRASE~~

And I run it this way, since I use it only as a temporary AP for my nexus7:

ip link set up dev wlan0
ip addr add "$_gateway/$_netmask" dev wlan0
sysctl net.ipv4.ip_forward=1
sysctl net.ipv4.conf.default.rp_filter=1
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i wlan0 -s $_subnet -j ACCEPT 
iptables -A FORWARD -i eth0 -d $_subnet -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
trap finalize INT
echo "Running hostapd ... (use Ctrl-C to stop)"
hostapd "$_hostapdconf"
finalize # clean up iptables etc...

Last edited by progandy (2013-01-30 14:16:19)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#17 2013-01-30 20:14:08

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Hostapd and WPA2

aatoma wrote:

Nothing from hostapd mailing list so far.
@progandy: thanks for the hint, but I'm working on a server setup with no nm installed and manual configuration via files.

Antonio.

Link please? I can't find your message in their archive http://lists.shmoo.com/pipermail/hostap … /date.html...

@progandy:
The problem we are discussing here is in the driver(s), not configuration. Also, what are trying to achieve with tour setup?

Last edited by Leonid.I (2013-01-30 20:19:21)


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#18 2013-01-31 05:21:51

aatoma
Member
Registered: 2013-01-22
Posts: 29

Re: Hostapd and WPA2

Leonid.I wrote:

Link please? I can't find your message in their archive

that's exactly part of the problem.
I wrote to the ML twice, before and after subscribing, but all I get back is that my message is waiting for moderator approval.
What am I doing wrong (also here sad )?

Antonio.

Offline

#19 2013-01-31 05:54:49

progandy
Member
Registered: 2012-05-17
Posts: 5,229

Re: Hostapd and WPA2

Leonid.I wrote:

@progandy:
The problem we are discussing here is in the driver(s), not configuration. Also, what are trying to achieve with tour setup?

I know. I just thought that my setup may avoid some bugs or something. I designed it as an internet access point for my nexus7 without any interest in a local network. My laptop uses a wired connection.

Here is my log while NetworkManager is enabled for wlan0, it looks like the one from hoanglan87, that's why I answered

random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/paconnect2.conf
ctrl_interface_group=0
nl80211: interface wlan0 in phy phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=2 op=0 soft=1 hard=0
rfkill: initial event: idx=2 type=1 op=0 soft=0 hard=0
nl80211: Using driver-based off-channel TX
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: TDLS supported
nl80211: TDLS external setup
nl80211: Add own interface ifindex 3
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Setup AP - device_ap_sme=0 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0xcc5300
nl80211: Register frame type=0xb0 nl_handle=0xcc5300
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0x0 nl_handle=0xcc5300
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0x20 nl_handle=0xcc5300
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0xa0 nl_handle=0xcc5300
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0xc0 nl_handle=0xcc5300
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0xd0 nl_handle=0xcc5300
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Failed to set interface wlan0 into AP mode
netlink: Operstate: linkmode=0, operstate=6
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211 driver initialization failed.

And this is the log with NetworkManager disabled:

random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/paconnect2.conf
ctrl_interface_group=0
nl80211: interface wlan0 in phy phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=2 op=0 soft=1 hard=0
rfkill: initial event: idx=2 type=1 op=0 soft=0 hard=0
nl80211: Using driver-based off-channel TX
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: TDLS supported
nl80211: TDLS external setup
nl80211: Add own interface ifindex 3
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Setup AP - device_ap_sme=0 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x1576300
nl80211: Register frame type=0xb0 nl_handle=0x1576300
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0x0 nl_handle=0x1576300
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0x20 nl_handle=0x1576300
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0xa0 nl_handle=0x1576300
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0xc0 nl_handle=0x1576300
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0xd0 nl_handle=0x1576300
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0x40 nl_handle=0x1576300
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=00
nl80211: 2402-2472 @ 40 MHz
nl80211: 2457-2482 @ 40 MHz
nl80211: 2474-2494 @ 20 MHz
nl80211: 5170-5250 @ 40 MHz
nl80211: 5735-5835 @ 40 MHz
nl80211: 57240-63720 @ 2160 MHz
nl80211: Added 802.11b mode based on 802.11g information
Completing interface initialization
Mode: IEEE 802.11g  Channel: 7  Frequency: 2442 MHz
nl80211: Set freq 2442 (ht_enabled=0 sec_channel_offset=0)
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
wlan0: Flushing old station entries
wlan0: Deauthenticate all stations
nl80211: CMD_FRAME freq=2442 wait=0 no_cck=0 no_ack=0 offchanok=0
nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2442 wait=0)
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 78:dd:08:db:97:cb and ssid "PAConnect"
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=9):
     50 41 43 6f 6e 6e 65 63 74                        PAConnect       
PSK (ASCII passphrase) - hexdump_ascii(len=13): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
random: Got 20/20 bytes from /dev/random
GMK - hexdump(len=32): [REMOVED]
Key Counter - hexdump(len=32): [REMOVED]
WPA: Delay group state machine start until Beacon frames have been configured
nl80211: Set beacon (beacon_set=0)
WPA: Start group state machine to set initial keys
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
GTK - hexdump(len=32): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=3 alg=2 addr=0x46b28a key_idx=1 set_tx=1 seq_len=0 key_len=32
   broadcast key
wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)
netlink: Operstate: linkmode=-1, operstate=6
wlan0: Setup of interface done.
ctrl_iface not configured!
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
nl80211: Ignore interface down event since interface wlan0 is up
RTM_NEWLINK: operstate=1 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: if_removed already cleared - ignore event
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: if_removed already cleared - ignore event


^CSignal 2 received - terminating
### Shutdwon ###

wlan0: Flushing old station entries
wlan0: Deauthenticate all stations
nl80211: CMD_FRAME freq=2442 wait=0 no_cck=0 no_ack=0 offchanok=0
nl80211: Frame TX command accepted; cookie 0xffff8800996c1600
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
netlink: Operstate: linkmode=0, operstate=6
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Unsubscribe mgmt frames handle 0x1576300 (AP teardown)

Edit:
hostapd 1.1 with Networkmanager  (= wpa_supplicant in discovery mode I suppose)  worked.
hostapd 2 with Networkmanager (= wpa_supplicant in discovery mode I suppose) does NOT work. I have to stop wpa_supplicant.

Last edited by progandy (2013-01-31 06:03:05)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#20 2013-01-31 13:15:24

aatoma
Member
Registered: 2013-01-22
Posts: 29

Re: Hostapd and WPA2

Forget what I said (I was probably sleeping when I last checked the list).
My message is at http://lists.shmoo.com/pipermail/hostap … 27204.html and somebody is looking at it.

Antonio.

Offline

#21 2013-01-31 17:36:31

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Hostapd and WPA2

@progandy:
Ah... OK. So, if I understand correctly, you have a laptop with a wifi and ethernet card, connected to the router via eth. And you want to use wlan as an AP for your other devices.

If I'm right, you don't need wpa_supplicant or NM because that's all client software. I *think* in a nutshell the reason why hostapd 1.1 could coesist with wpa_supplicant is because they had relatively different codebase. However, with v2.0 they are significantly merged (I guess in the future they'll become ine package). At least that's how I understand your "Operation in progress" error.

In summary, you can happily remove NM and all its deps (including wpa_supplicant) from your system, and use a simple  dhcpcd@eth0.service to manage wired connection... Then you simply bridge wlan0 and eth0 and your wifi devices will receive IP from the router.

However, before that, can you try running hostapd 2.0+wpa_supplicant 2.0 from testing? My bet would be that it's not going to work and will fail with the same error as above...

@aatoma:
Are you sure no wpa_supplican tprocess is running on your system?


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#22 2013-01-31 18:44:45

progandy
Member
Registered: 2012-05-17
Posts: 5,229

Re: Hostapd and WPA2

@Leonid.I:
Yes. I use my laptop as AP for my other device to share the ehternet connection for internet access.
I don't need NM for this particular case and can remove it. Since I use my laptop in other locations, too I still need NM. I hope that WiFiz will be in a usable state soon to replace it (at least a tray icon to display the connection state)

In summary, you can happily remove NM and all its deps (including wpa_supplicant) from your system, and use a simple  dhcpcd@eth0.service to manage wired connection... Then you simply bridge wlan0 and eth0 and your wifi devices will receive IP from the router.

I have no DHCP available, it is all static but that could be done.

However, before that, can you try running hostapd 2.0+wpa_supplicant 2.0 from testing? My bet would be that it's not going to work and will fail with the same error as above...

I already do.
hostapd 2.0+wpa_supplicant 2.0  == FAILURE
hostapd 1.1+wpa_supplicant 2.0  == WORKS
log for hostapd 1.1 while wpa_supplicant 2.0 is running:

random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/paconnect2.conf
ctrl_interface_group=0
nl80211: interface wlan0 in phy phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=2 op=0 soft=1 hard=0
rfkill: initial event: idx=2 type=1 op=0 soft=0 hard=0
nl80211: Using driver-based off-channel TX
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: TDLS supported
nl80211: TDLS external setup
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Failed to register Action frame processing - ignore for now
nl80211: Add own interface ifindex 3
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Create interface iftype 6 (MONITOR)
nl80211: New interface mon.wlan0 created: ifindex=7
nl80211: Add own interface ifindex 7
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz
nl80211: 2457-2482 @ 40 MHz
nl80211: 2474-2494 @ 20 MHz
nl80211: 5170-5250 @ 40 MHz
nl80211: 5735-5835 @ 40 MHz
nl80211: 57240-63720 @ 2160 MHz
nl80211: Added 802.11b mode based on 802.11g information
Completing interface initialization
Mode: IEEE 802.11g  Channel: 7  Frequency: 2442 MHz
nl80211: Set freq 2442 (ht_enabled=0 sec_channel_offset=0)
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 78:dd:08:db:97:cb and ssid 'PAConnect'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=9):
     50 41 43 6f 6e 6e 65 63 74                        PAConnect       
PSK (ASCII passphrase) - hexdump_ascii(len=13): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
random: Got 16/20 bytes from /dev/random
random: Only 16/20 bytes of strong random data available from /dev/random
random: Not enough entropy pool available for secure operations
WPA: Not enough entropy in random pool for secure operations - update keys later when the first station connects
GMK - hexdump(len=32): [REMOVED]
Key Counter - hexdump(len=32): [REMOVED]
WPA: Delay group state machine start until Beacon frames have been configured
nl80211: Set beacon (beacon_set=0)
WPA: Start group state machine to set initial keys
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
GTK - hexdump(len=32): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=3 alg=2 addr=0x462fca key_idx=1 set_tx=1 seq_len=0 key_len=32
   broadcast key
wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)
netlink: Operstate: linkmode=-1, operstate=6
wlan0: Setup of interface done.
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
nl80211: Ignore interface down event since interface mon.wlan0 is up
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=1 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: if_removed already cleared - ignore event
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: if_removed already cleared - ignore event
mgmt::deauth cb

Edit: It seems that the old hostapd ignores some errors and continues, while 2.0 exits with an error:
nl80211: Failed to register Action frame processing - ignore for now ( = 1.1)
vs. nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress) ( = 2.0)

Last edited by progandy (2013-01-31 18:50:34)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#23 2013-02-01 11:06:22

skink
Member
Registered: 2013-01-28
Posts: 3

Re: Hostapd and WPA2

Hi,

Could someone please link me hostapd-1.1-1-armv6h.pkg.tar.xz cause I'm on armv6 architecture and I can't find it anywhere? Tried to compile hostapd 1.1-1 from source but I've got error: make: *** [../src/drivers/driver_nl80211.o] Error 1.

Offline

#24 2013-02-01 13:14:47

aatoma
Member
Registered: 2013-01-22
Posts: 29

Re: Hostapd and WPA2

Hi All,

As progandy pointed out, the error

nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Failed to register Action frame processing - ignore for now

already present in 1.1, becomes

nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Failed to set interface wlan0 into AP mode

in 2.0 also in my case.
Does this indicate that the issue is related to a change in error handling in the daemon's code itself?

Regards.
Antonio.

Offline

#25 2013-02-01 18:24:20

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Hostapd and WPA2

aatoma wrote:

Hi All,

As progandy pointed out, the error

nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Failed to register Action frame processing - ignore for now

already present in 1.1, becomes

nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Failed to set interface wlan0 into AP mode

in 2.0 also in my case.
Does this indicate that the issue is related to a change in error handling in the daemon's code itself?

Regards.
Antonio.

So, Antonio, do you have wpa_supplicant running or not when hostap fails? I think the important difference is that for 1.1 the monitor interface is created

nl80211: Create interface iftype 6 (MONITOR)
nl80211: New interface mon.wlan0 created: ifindex=7
nl80211: Add own interface ifindex 7

This does not happen for 2.0 because of (changelog, http://hostap.epitest.fi/gitweb/gitweb. … ChangeLog)

* nl80211: number of updates to use new cfg80211/nl80211 functionality           
  - replace monitor interface with nl80211 commands           
  - additional information for driver-based AP SME

So, at least without additional configuration, the new hostap can't run together with wpa_supplicant, probably because it can't send management frames when intrface is in "managed" mode set by wpa_supplicant...

EDIT
@skink:
We don't have ARM packages -- talk to Archlinux ARM folks http://archlinuxarm.org/

Last edited by Leonid.I (2013-02-01 18:36:30)


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

Board footer

Powered by FluxBB