wifi-entries-setup
is the shell-script program which adds the new Wi-Fi entry
to assigned configuration file (ex. wpa_supplicant.conf
)
using wpa_passphrase
.
It requires the following Wi-Fi confuguration program.
Download and modify the path of the configuration file
(default: /etc/wpa_supplicant/wpa_supplicant.conf
) in wifi-entries-setup
.
$ git clone https://github.com/kkatsuyuki/wifi-entries-setup.git
$ cd wifi-entries-setup
Edit wifi-entries-setup
to adjust CONFIG_FILE
to your environment.
CONFIG_FILE=/to/yourpath/wpa_supplicant.conf
Edit wifi-entries-setup
to select an INTERFACE
for your system
INTERFACE="wlp2s0"
Then move this executable wifi-entries-setup
file to the directory included in $PATH
(usually /usr/bin/
).
$ cp wifi-entries-setup /usr/bin/
Usage: wifi-entries-setup [-h]
Get the root privilege and execute wifi-entries-setup
.
Input SSID and Passphrase (optional) interactively following the prompt.
- Passphrase is not given, then the entry is registered as the open network.
- If the command executed with
-h
option, the help message is appeared.
Example
Add the wireless network whose SSID and passphrase are “foo” and “foobarbaz”, respectively.
# wifi-entries-setup Starting to scan WiFi ... 0: foo 1: bar 2: baz Which SSID is registered? (input by No.) > 0 Input passphrase (default NONE) > foobarbaz Protected Wifi network SSID foo was registered and you can connect.
The followings are refered to Wireless network configuration on ArchWiki.
If necessary, make the Wi-Fi interface enabled at first.
# ip link set <interface> up
Then get the authentification and IP address from the wireless network.
# wpa_supplicant -B -i <interface> -c /to/yourpath/wpa_supplicant.conf # dhcpcd -b <interface>
I refered to the following to make this source code.