On 3/1/21 1:17 PM, Per Jessen wrote:
Background first - I am writing an interface for configuring wifi over a small 160x80 display and a numeric keypad only.
I am only just getting my feet wet with wpa_supplicant - for working with wpa_cli, I seem to need /var/run/wpa_supplicant as specified in /etc/wpa_supplicant/wpa_supplicant.conf.
/var/run/wpa_supplicant seems to be missing ? (on at least three systems I've looked at).
I don't think that is so. Those are old documents from when /var/run was used as the "state" directory. Now that will be plain old /run or as user /run/user/$UID in the new world.
Judging by the man page for wpa_supplicant.conf, what we (openSUSE) provide as a default is wrong?
We have
ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel
whereas the man page suggests:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
'ctrl_interface_group' is not even mentioned in the man page.
From an overview standpoint, wpa_supplicant is just the tool that associates ESSID and a password with an interface and then facilitates the authentication to that interface when used. I have old notes to check wpa_suppliment.conf and ensure you have: key_mgmt=WPA-PSK # proto=WPA proto=RSN (I don't recall the immediate difference between the proto of WPA or RSN at the moment) To use wpa_supplicant in the past, all I did was to run wpa_passphrase to setup the config for the inteface, e.g. wpa_passphrase "your_ESSID" "PassPhrase_up-to-64-Characters" \ >> /etc/wpa_supplicant.conf That will save the ESSID/passphrase in wpa_suppliment.conf Then to activate the interface, you use something similar to the following (but you will need to find out what state directory wpa_supplicant was compiled to use instead of the old /var/run) and do: wpa_supplicant -iwlan0 \ -c/var/run/wpa_supplicant-ath0.conf \ -Dwext \ -P/var/run/wpa_supplicant/ath0.pid \ -B Now you can run dhclient or dhcpcd to get an IP. -- David C. Rankin, J.D.,P.E.