all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Oleander via <help-guix@gnu.org>
To: koszko@koszko.org, help-guix@gnu.org
Subject: Re: "Could not connect to wpa_supplicant: (nil) - re-trying" error when trying to start wpa-cli.
Date: Thu, 28 Dec 2023 11:16:27 +0000	[thread overview]
Message-ID: <GQa6Aqs5FnFfRGDssY5hVlvcGjwnbXhYesiYhMx-Qw3QkHeh5PG_ie1fBedIilN5HaM827-dDed2mp3S8MkYcn3pisvWknaori8iZ6GYsEg=@protonmail.com> (raw)
In-Reply-To: <20231222233404.76e5c64c.koszko@koszko.org>

Hi Wojtek,
`wpa_cli -p/run/wpa_supplicant` works both with the wrong config and the modification that 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

      parent reply	other threads:[~2023-12-28 18:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-22 21:23 "Could not connect to wpa_supplicant: (nil) - re-trying" error when trying to start wpa-cli Oleander via
2023-12-22 22:34 ` Wojtek Kosior via
2023-12-25  8:53   ` Oleander via
2023-12-28 11:16   ` Oleander via [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='GQa6Aqs5FnFfRGDssY5hVlvcGjwnbXhYesiYhMx-Qw3QkHeh5PG_ie1fBedIilN5HaM827-dDed2mp3S8MkYcn3pisvWknaori8iZ6GYsEg=@protonmail.com' \
    --to=help-guix@gnu.org \
    --cc=7059548@protonmail.com \
    --cc=koszko@koszko.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.