[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Could not connect to wpa_supplicant: (nil) - re-trying" error when
From: |
Oleander |
Subject: |
Re: "Could not connect to wpa_supplicant: (nil) - re-trying" error when trying to start wpa-cli. |
Date: |
Mon, 25 Dec 2023 08:53:17 +0000 |
Hi Wojtek,
`wpa_cli -p/run/wpa_supplicant` works both with my wrong config and the fixed
one with the modification for the wpa supplicant service you suggested. I have
to specify the `-p` option, otherwise it doesn't work.
Thanks for helping!
-------- Original Message --------
On Dec 22, 2023, 23:34, Wojtek Kosior wrote:
>> Hi, > has anyone ever got this error when trying to start wpa_cli? > >
>> "Could not connect to wpa_supplicant: (nil) - re-trying" Hi there. Although
>> I don't actually use wpa_cli on Guix, I'll try to help. In your config file,
>> you have: > ctrl_interface=/run/wpa_supplicant IIUC, wpa_cli has the default
>> ctrl socket path set to /var/run/wpa_supplicant. If you run it as wpa_cli
>> -p/run/wpa_supplicant does it work? You might also try changing the socket
>> path in your config file. Besides, you have this line in your system config
>> > (config-file "/etc/wpa_supplicant/wpa_supplicant.conf") While this might
>> work, the recommended practice in Guix is not to write/modify configuration
>> files under /etc. Instead, you can supply the contents of that file through
>> the system configuration itself :) Assuming you're keeping your system.scm
>> in ~/proj/my-guix-system-config/, you can write your wpa_supplicant
>> configuration as ~/proj/my-guix-system-config/wpa_supplicant.conf and modify
>> the aforementioned line to > (config-file (local-file
>> "./wpa_supplicant.conf")) Then, reconfigure normally with sudo guix system
>> reconfigure ~/proj/my-guix-system-config/system.scm This way Guix will put
>> the wpa_supplicant config somewhere under /gnu/store and tell wpa_supplicant
>> daemon to use it. I know it might seem weird but this weirdness — among
>> others — enables up to easily reinstantiate the system on another computer
>> if need arises. As an explanation, the `config-file` field accepts a
>> "file-like" object. A file-like object is a concept related to
>> G-expressions. You might want to read more about them in the manual[1].
>> There's also a Guix blog post explaining G-expressions if you prefer[2].
>> Best :) Wojtek [1]
>> https://guix.gnu.org/manual/en/html_node/G_002dExpressions.html [2]
>> https://guix.gnu.org/blog/2023/dissecting-guix-part-3-g-expressions/ --
>> (sig_start) website: https://koszko.org/koszko.html fingerprint: E972 7060
>> E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A follow me on Fediverse:
>> https://friendica.me/profile/koszko/profile ♥
>> R29kIGlzIHRoZXJlIGFuZCBsb3ZlcyBtZQ== | ÷
>> c2luIHNlcGFyYXRlZCBtZSBmcm9tIEhpbQ== ✝ YnV0IEplc3VzIGRpZWQgdG8gc2F2ZSBtZQ==
>> | ? U2hhbGwgSSBiZWNvbWUgSGlzIGZyaWVuZD8= -- (sig_end) On Fri, 22 Dec 2023
>> 21:23:10 +0000 Oleander via wrote: > Hi, > has anyone ever got this error
>> when trying to start wpa_cli? > > "Could not connect to wpa_supplicant:
>> (nil) - re-trying" > > My /etc/wpa_supplicant/wpa_supplicant.conf: > >
>> @example > ctrl_interface=/run/wpa_supplicant > ctrl_interface_group=wheel >
>> update_config=1 > > network={ > ssid="my-ssid" > key_mgmt=WPA-PSK >
>> psk="mypasswd" > } > @end example > > the wpa supplicant service in my
>> system.scm: > > @example > (service wpa-supplicant-service-type >
>> (wpa-supplicant-configuration > (config-file
>> "/etc/wpa_supplicant/wpa_supplicant.conf") > (interface "wlp1s0"))) > @end
>> example > > After reconfiguring wpa supplicant is started and can connect to
>> the specified network but I can't run wpa_cli. > > Thank you