1 (edited by auanta 2022-08-30 17:09:23)

Topic: [solved]wpa_cli Could not connect to wpa_supplicant: (nil) - re-trying

I can use wpa_supplicant and dhcpcd just fine, but if I use wpa_cli it only works affter I have connected to a wifi with wpa_supplicant. Or, if I run the command like so:
doas wpa_supplicant -i wlp0s21f0u6 -C /run/wpa_supplicant &

Otherwise, I get this error:

Could not connect to wpa_supplicant: (nil) - re-trying

2

Re: [solved]wpa_cli Could not connect to wpa_supplicant: (nil) - re-trying

Yes, because that command is not within the access of the user. There are different options possible: Nevertheless you should take into perspective that especially this command is only for using in combination with the daemon itself. If you want to change that you need to modify your doas-configuration also and allow your concurrent user the access. But this is not any kind of recommendation!

Only root has access into that part of command you are using.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

3

Re: [solved]wpa_cli Could not connect to wpa_supplicant: (nil) - re-trying

throgh wrote:

Yes, because that command is not within the access of the user. There are different options possible: Nevertheless you should take into perspective that especially this command is only for using in combination with the daemon itself. If you want to change that you need to modify your doas-configuration also and allow your concurrent user the access. But this is not any kind of recommendation!

Only root has access into that part of command you are using.


Thank  you for the quick response! I get this when using doas and root but let me double check because Ill have to reboot and got a lot of tabs open...

4 (edited by auanta 2022-08-30 17:07:52)

Re: [solved]wpa_cli Could not connect to wpa_supplicant: (nil) - re-trying

OK so, yeah I had doas configured already and this is my config -

ctrl_interface=/run/wpa_supplicant/
ctrl_interface_group=wheel
update_config=1

network={
(snip)...
}

As it turns out, after I did
$ doas rc-update add dhcpcd default
now my wifi automatically connects on boot, if the network is available. I was running wpa_cli list_networks and realized it was connected already.

Maybe I was just issuing commands unncessarily..

The console wireless wpa tools always elude my expectations, lol. Weird things like only working once I launch the wpa GUI app, etc. I don't understand dhcpcd-gtk, dhcpcd-curses at all. I will need even more time with them (despite sitting and reading and configuring them way too long), as for now they're opaque to me but it's good not to have to rely on network-manager. The important thing is I'm online tongue