Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] wpa_supplicant: Failed to initiate AP scan
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
yufw
n00b
n00b


Joined: 11 Nov 2013
Posts: 57

PostPosted: Fri Jun 13, 2014 3:49 am    Post subject: [SOLVED] wpa_supplicant: Failed to initiate AP scan Reply with quote

I tried to set up wireless connection with wpa_supplicant. I have this minimal configuration in /etc/wpa_supplicant/wpa_supplicant.conf,
Code:
ctrl_interface=/var/run/wpa_supplicant
update_config=1
Following the Arch Wiki, I run
Code:
# wpa_supplicant -B -i wlo1 -c /etc/wpa_supplicant/wpa_supplicant.conf
The output,
Code:
Successfully initialized wpa_supplicant
ioctl[SIOCSIWPMKSA]: Invalid argument
ioctl[SIOCSIWMODE]: Invalid argument
ioctl[SIOCGIWRANGE]: Invalid argument
ioctl[SIOCGIWMODE]: Invalid argument
ioctl[SIOCSIWAP]: Invalid argument
ioctl[SIOCSIWESSID]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWPMKSA]: Invalid argument
Then
Code:
# wpa_cli
> scan
It won't stop outputting the "Failed to initiate AP scan message"
Code:
OK
<4>Failed to initiate AP scan
<4>Failed to initiate AP scan
<4>Failed to initiate AP scan
I have an Atheros wireless card, the driver is ath9k. I really have no idea where I did wrong. Any help is appreciated.

Last edited by yufw on Fri Jun 13, 2014 3:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Fri Jun 13, 2014 5:56 am    Post subject: Reply with quote

Can you see some access points when you do
Code:
ip link set wlo1 up
iwlist wlo1 scan | less


You can try a more complex command. You can try alternatively -D wext if -D nl80211 fail. You can have a look at wpa_supplicant log in the file /var/log/wpa.log.
Code:
wpa_supplicant -B -c /etc/wpa_supplicant/wpa_supplicant.conf -D nl80211 -dd -f /var/log/wpa.log -i wlo1 -t


If nothing work, the problem can come from the wireless interface itself. Atheros wireless network cards are, from my experience, reliable when drive by the ath9k Linux module.
_________________
Paul
Back to top
View user's profile Send private message
yufw
n00b
n00b


Joined: 11 Nov 2013
Posts: 57

PostPosted: Fri Jun 13, 2014 6:29 am    Post subject: Reply with quote

The "-D nl80211" driver option solves my problem.

Thanks, Logicien. Could you please tell me the difference between wext and nl80211?
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri Jun 13, 2014 11:41 am    Post subject: Reply with quote

yufw wrote:
Could you please tell me the difference between wext and nl80211?

yufw ... WEXT (wireless extensions) has been replaced by NL80211/CFG80211/MAC80211 (netlink). The former is slated for removal but as there are tools which don't use the new layer (and use WEXT exclusively ... ie, wireless-tools, wicd, and others) there is a compatibility layer which allows these to work. In your case this compatibility layer, CFG80211_WEXT, is not enabled, so anything expecting WEXT will fail. The wpa_supplicant package on gentoo is built with support for both WEXT and NL80211, you just need to provide '-D <driver>' ... but obviously if your current setup doesn't have CFG80211_WEXT then you can only use NL80211 (which of course would be native netlink, rather than the compatibility layer).

best ... khay
Back to top
View user's profile Send private message
yufw
n00b
n00b


Joined: 11 Nov 2013
Posts: 57

PostPosted: Fri Jun 13, 2014 1:13 pm    Post subject: Reply with quote

khayyam wrote:
yufw ... WEXT (wireless extensions) has been replaced by NL80211/CFG80211/MAC80211 (netlink). The former is slated for removal but as there are tools which don't use the new layer (and use WEXT exclusively ... ie, wireless-tools, wicd, and others) there is a compatibility layer which allows these to work. In your case this compatibility layer, CFG80211_WEXT, is not enabled, so anything expecting WEXT will fail. The wpa_supplicant package on gentoo is built with support for both WEXT and NL80211, you just need to provide '-D <driver>' ... but obviously if your current setup doesn't have CFG80211_WEXT then you can only use NL80211 (which of course would be native netlink, rather than the compatibility layer).

khay, thanks for the explanation.

But I don't think there is a USE flag related to this compatibility layer, is it controlled by something else other than the USE flag?
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri Jun 13, 2014 1:27 pm    Post subject: Reply with quote

yufw wrote:
khay, thanks for the explanation. But I don't think there is a USE flag related to this compatibility layer, is it controlled by something else other than the USE flag?

yufw ... you're welcome. The wext compatibility layer (CFG80211_WEXT) is in the kernel.

best ... khay
Back to top
View user's profile Send private message
yufw
n00b
n00b


Joined: 11 Nov 2013
Posts: 57

PostPosted: Fri Jun 13, 2014 3:15 pm    Post subject: Reply with quote

khayyam wrote:

yufw ... you're welcome. The wext compatibility layer (CFG80211_WEXT) is in the kernel.

Code:
$ grep CFG80211_WEXT /usr/src/linux/.config
# CONFIG_CFG80211_WEXT is not set

Indeed, thank you.
Back to top
View user's profile Send private message
doublehp
Guru
Guru


Joined: 11 Apr 2005
Posts: 473
Location: FRANCE

PostPosted: Tue Feb 13, 2018 8:55 pm    Post subject: Reply with quote

"-D nl80211" did it for me too (Orange Pi Zero, H2+, ARMBIAN 5.38 stable Ubuntu 16.04.3 LTS 4.14.18-sunxi )
_________________
DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum