You are not logged in.

#1 2019-02-24 18:54:24

promitheas
Member
Registered: 2019-02-24
Posts: 38

[SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

Hey all, following is my first question, and im only linking it here so that i dont have to rewrite the whole backstory given that im on a phone.
https://bbs.archlinux.org/viewtopic.php … 7#p1833517
Essentially, i started reading the last links posted in the question above, and gained a better (i hope) understanding of how to manually connect to an AP from a cli.

Everything was as expected while reading this guide:
https://wiki.archlinux.org/index.php/Wi … uration#iw
Until the "Connect to an access point" section.

Ive tried two separate commands. Here they are with their output:
"iw dev wlp2s0 connect "CYTA97ECCB" key 0:'my key' "(my key is plaintext, if it matters. Also without the single quotes)
key must be [d:]index:data where
...
...

wpa_supplicant -B -D wext (aswell as nl80211) -i wlp2s0 -c /etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument

If -D option is nl80211 then output is only Successfully initialized wpa_supplicant

Regardless of what i use for the -D option, running "iw wlp2s0 link" outputs:
Not connected

Please ask me for any other commands you may need and ill do my best to give you output. Thanks!

Edit: What worked for me:
1. Had to reinstall arch and not install networkmanager
2. Did wpa_passphrase CYTA97ECCB mykey > /etc/wpa_supplicant/myfile.conf
3. wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant/myfile.conf
4. dhcpcd wlp2s0

At this point i have a working connection.

Last edited by promitheas (2019-02-28 12:54:25)

Offline

#2 2019-02-24 19:04:52

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

The output of `iw dev interface scan` showed the AP is using Privacy not RSN or WPA?

Offline

#3 2019-02-24 21:04:54

promitheas
Member
Registered: 2019-02-24
Posts: 38

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

loqs wrote:

The output of `iw dev interface scan` showed the AP is using Privacy not RSN or WPA?

There is a line
capability: ESS Privacy ShortSlotTime APSD (0xc11)

But a little further down there is a 'block' WPA: which has some info,
then another 'block' below that RSN:
Also there is a WPS: block. Its the last one for this SSID which is my network. From what i read and understood, it has wpa? If you need any other info please do ask.

Offline

#4 2019-02-24 21:25:56

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

I suggest following WPA_supplicant#Connecting_with_wpa_passphrase or as I mentioned in the previous thread WPA_supplicant#Advanced_usage

Offline

#5 2019-02-25 19:06:51

promitheas
Member
Registered: 2019-02-24
Posts: 38

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

loqs wrote:

I suggest following WPA_supplicant#Connecting_with_wpa_passphrase or as I mentioned in the previous thread WPA_supplicant#Advanced_usage

Following the first link you provided, i tried to use wpa_supplicant to manually connect and got the following results:

wpa_supplicant -B -D nl80211 -i wlp2s0 -c /path/to/my/config
Successfully initialized wpa_supplicant
nl80211: deinit ifname=wlp2s0 disabled_11b_rates=0
wlp2s0: Failed to initialize driver interface

After that dhcpcd times out.

Also its worth noting that "systemctl list-units"
has a line
netctl@CYTA97ECCB.service loaded failed failed which i cant stop and only found out about just now when i logged in.
Idk enough to gauge whether that could be the problem.

Also, i used the procedure in the second link (advanced) to create the config file

Thanks.

Last edited by promitheas (2019-02-25 19:08:16)

Offline

#6 2019-02-25 19:53:34

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

How did you try to stop netctl@CYTA97ECCB.service and what output was produced?

Offline

#7 2019-02-25 20:36:27

promitheas
Member
Registered: 2019-02-24
Posts: 38

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

loqs wrote:

How did you try to stop netctl@CYTA97ECCB.service and what output was produced?

sudo systemctl stop netctl@CYTA97ECCB.service

No output produced, as if it stopped, but running systemctl list-units shows it still there

Offline

#8 2019-02-25 20:41:54

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

Stopping the service does not disable it which would remove the instantiated unit.

Offline

#9 2019-02-25 21:01:28

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

Also drop the "-D nl80211", that is not advised in the wiki.  Adding the -D flag almost never helps anything, and frequently causes problems.  This is only used to specifically restrict to one driver or another if you think you know better than wpa_supplicant.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#10 2019-02-25 21:01:38

promitheas
Member
Registered: 2019-02-24
Posts: 38

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

loqs wrote:

Stopping the service does not disable it which would remove the instantiated unit.

I also ran the same command, but with the disable option rather than stop. Still there. I tried disabling then stopping, stopping then disabling... Still there

Offline

#11 2019-02-25 21:03:01

promitheas
Member
Registered: 2019-02-24
Posts: 38

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

Trilby wrote:

Also drop the "-D nl80211", that is not advised in the wiki.  Adding the -D flag almost never helps anything, and frequently causes problems.  This is only used to specifically restrict to one driver or another if you think you know better than wpa_supplicant.

Dropped the -D option, still same output as with it.

Offline

#12 2019-02-25 21:05:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

It sounds like some other service is pulling in netctl.  Stop *all* other networking services.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#13 2019-02-25 21:08:43

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

systemctl list-unit-files --state=enabled

Offline

#14 2019-02-25 21:09:05

promitheas
Member
Registered: 2019-02-24
Posts: 38

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

Trilby wrote:

It sounds like some other service is pulling in netctl.  Stop *all* other networking services.

How would i do that specifically for networking services?
Edit: loqs answer only just showed up

Last edited by promitheas (2019-02-25 21:11:50)

Offline

#15 2019-02-25 21:14:03

promitheas
Member
Registered: 2019-02-24
Posts: 38

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

loqs wrote:
systemctl list-unit-files --state=enabled

Running that gives me 3 unit files.
autovt@.service
getty@.service
remote-fs.target
All 3 are enabled

Offline

#16 2019-02-25 21:20:37

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

Also the output of  `systemctl list-units` as it had netctl@CYTA97ECCB.service

Offline

#17 2019-02-25 21:25:21

promitheas
Member
Registered: 2019-02-24
Posts: 38

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

loqs wrote:

Also the output of  `systemctl list-units` as it had netctl@CYTA97ECCB.service

Its 110 lines and im on a phone... Do i really have to write it here or is there another way?
Should i just stop those 3 services?

Offline

#18 2019-02-25 21:31:04

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

Dump the output to a file.  If the installed system has no net access use the live media and see List_of_applications#Pastebin_clients to post the file contents to a pastebin.

Offline

#19 2019-02-25 21:47:18

promitheas
Member
Registered: 2019-02-24
Posts: 38

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

loqs wrote:

Dump the output to a file.  If the installed system has no net access use the live media and see List_of_applications#Pastebin_clients to post the file contents to a pastebin.

Booted into the live usb, wifi-menu done, mounted and chrooted into my linux install, and strangely, no files other than the yay directory i cloned a few days ago in the /home/myuser/ directory...
Not even the dump of list-units.
Heres what im gonna do. Tomorrow (getting a bit late here) im going to reinstall arch from 0, and go through the steps to manually connect wifi without network managers. If that still doesnt work, then shall i open a new thread or simply return to this one? Thanks!

Offline

#20 2019-02-27 21:26:17

promitheas
Member
Registered: 2019-02-24
Posts: 38

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

To anyone who still has the patience to deal with me, i reinstalled arch again today. When i pacstrapped base and base devel, apart from vim i also did wpa_supplicant, iw, and git. I installed yay from its git, and  used it to install community/broadcom-wl driver. Then proceeded with the necessary install and locale/boot steps etc. I setup my user in the wheel group, did all that good stuff, and exited, unmounted, and rebooted into my arch install. Once in, i did the following:
sudo ip link set wlp2s0 up (it wasnt showing up in the <..>)
Then did:
iw dev wlp2s0 connect "CYTA97ECCB" key d:0:mykey in ascii characters
Pinging e.g. google.com just gives me Temporary failure in name resolution
iw dev wlp2s0 link just sais Not connected

lspci -v network section:
...
Kernel driver in use: wl
Kernel modules: wl

Im at a loss for what to do. Im sure that its a solvable problem, because its not the first time im installing linux on this particular laptop with this wireless card, but as with all cases where im in the dark as to what to do, the problem seems massive.

Thank you again!

P.s. if i have to actually create a new thread, ill be glad to close this and do so.
P.s.2 running systemctl list-units shows that all active services are ok. No red failures like last install, maybe because i havent installed networkmanager

Last edited by promitheas (2019-02-27 21:29:04)

Offline

#21 2019-02-27 21:59:46

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

You do not need yay to install packages in the repositories.  I suggest repeating the steps from post #5 without -B or -D
Start dhcpcd wlp2s0 in a separate terminal as wpa_supplicant will remain in the foreground of the first terminal
If you do not get a DHCP lease post the output from both commands.

Offline

#22 2019-02-28 07:34:26

unixman
Member
Registered: 2015-03-12
Posts: 64

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

I am assumed wpa_cli is more compatible with wpa_supplicant as it is its cli tool  and coming together. So I suggest to use it for things.

Disable all systemd related network services to stop interferencing.

Below is my one liner just to show available networks and demonstrates how to use this two together.

#!/usr/bin/sh

wpa_supplicant -C/run/wpa_supplicant -iwlan0 -B;
wpa_cli scan;
sleep 3;
wpa_cli scan_results;

See

wpa_cli help

for available commands and its decriptions.

Last edited by unixman (2019-02-28 07:37:49)

Offline

#23 2019-02-28 12:40:22

promitheas
Member
Registered: 2019-02-24
Posts: 38

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

loqs wrote:

You do not need yay to install packages in the repositories.  I suggest repeating the steps from post #5 without -B or -D
Start dhcpcd wlp2s0 in a separate terminal as wpa_supplicant will remain in the foreground of the first terminal
If you do not get a DHCP lease post the output from both commands.

I did the steps you mentioned however could not drop the -B option because im on the minimal arch install (havent done anything other than the bare minimum), and it would just not give me a prompt otherwise. With the -B option, it just said:
Successfully initialized wpa_supplicant
Then i ran dhcpcd wlp2s0 and it output several lines. It appeared to complete successfully, so i tried pinging google.com and that was successful as well!
Also, iw dev wlp2s0 link shows that i am connected to my AP, but the last line is command failed: Operation not permitted (-1)

However, as this issue is essentially solved, im going to edit my question with the answer that worked for me, and mark as solved.

Thanks to everyone who helped!

Offline

#24 2019-02-28 13:52:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] wpa_supplicant ioctl[SIOCSIWENCODEEXT]

promitheas wrote:

I did the steps you mentioned however could not drop the -B option because im on the minimal arch install (havent done anything other than the bare minimum), and it would just not give me a prompt otherwise.

That's why he suggested switching to another terminal - e.g. Alt-F2, Alt-F3, etc.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB