Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[SOLVED] wpa_supplicant: Failed to initiate AP scan

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
yufw
n00b
n00b
User avatar
Posts: 57
Joined: Mon Nov 11, 2013 4:12 am

[SOLVED] wpa_supplicant: Failed to initiate AP scan

  • Quote

Post by yufw » Fri Jun 13, 2014 3:49 am

I tried to set up wireless connection with wpa_supplicant. I have this minimal configuration in /etc/wpa_supplicant/wpa_supplicant.conf,

Code: Select all

ctrl_interface=/var/run/wpa_supplicant
update_config=1
Following the Arch Wiki, I run

Code: Select all

# wpa_supplicant -B -i wlo1 -c /etc/wpa_supplicant/wpa_supplicant.conf
The output,

Code: Select all

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: Select all

# wpa_cli
> scan
It won't stop outputting the "Failed to initiate AP scan message"

Code: Select all

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.
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Fri Jun 13, 2014 5:56 am

Can you see some access points when you do

Code: Select all

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: Select all

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
Top
yufw
n00b
n00b
User avatar
Posts: 57
Joined: Mon Nov 11, 2013 4:12 am

  • Quote

Post by yufw » Fri Jun 13, 2014 6:29 am

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

Thanks, Logicien. Could you please tell me the difference between wext and nl80211?
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Fri Jun 13, 2014 11:41 am

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
Top
yufw
n00b
n00b
User avatar
Posts: 57
Joined: Mon Nov 11, 2013 4:12 am

  • Quote

Post by yufw » Fri Jun 13, 2014 1:13 pm

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?
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Fri Jun 13, 2014 1:27 pm

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
Top
yufw
n00b
n00b
User avatar
Posts: 57
Joined: Mon Nov 11, 2013 4:12 am

  • Quote

Post by yufw » Fri Jun 13, 2014 3:15 pm

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

Code: Select all

$ grep CFG80211_WEXT /usr/src/linux/.config
# CONFIG_CFG80211_WEXT is not set
Indeed, thank you.
Top
doublehp
Guru
Guru
User avatar
Posts: 473
Joined: Mon Apr 11, 2005 2:48 pm
Location: FRANCE
Contact:
Contact doublehp
Website

  • Quote

Post by doublehp » Tue Feb 13, 2018 8:55 pm

"-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
Top
Post Reply

8 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic