This page describes how to set up a wireless network connection with WPA encryption.
Working wireless drivers
If you are using a Broadcom chipset, see the Broadcom Wi-Fi section.)
To get started install
To list your available network interfaces:
Bring up the desired interface:
Use this command to add your Wi-Fi network to wpa_supplicant:
(Access point not broadcasting its SSID requires additional line
scan_ssid=1 in the file
Start wpa_supplicant in the foreground to make sure the connection succeeds.
If all is well, run it as a daemon in the background by setting the -B option.
Configure the interface with an IP address.
Sanity check: the interface should have a inet address.
Automatic Configuration on System Boot
Add a entry for the desired interface (e.g. wlan0) to /etc/network/interfaces:
auto wlan0 iface wlan0 inet dhcp
Sanity check: Make sure /etc/wpa_supplicant/wpa_supplicant.conf is the correct configuration for the wireless access point you want to connect to.
Bring the interface down.
Manually restart (or start) networking.
If all is well (feel free to confirm with the sanity checks),
Configure wpa_supplicant to start automatically on boot:
Also make sure networking is set to automatically start on boot:
Optional security precaution:
By defaultwill store your Wi-Fi password in plain text:
this is not necessary and
#psk="<YourPasswordShouldBeHereInPlainText>" on it.
Launching udhcpc through wpa_cli actions
With the above configuration, udhcpc will only run once at boot. If the Wifi isn't available then, or the network changes in between, it needs to be notified. This is done through the wpa_cli action script in /etc/wpa_supplicant/wpa_cli.sh
Automatic Reconnection when WIFI signal is lost
To enable automatic reconnection when wifi signal is lost add these to config:
Broadcom Wi-Fi Chipset Users
The Broadcom chipset is quite popular among older computers. You will need to compile the firmware manually for this chipset as it is not included.
You can check if you have a Broadcom chipset by using dmesg:
First install the SDK and Git:
Then git clone aports from git.alpinelinux.org.
Change your directory to aports/non-free/b43-firmware, then build it.
Install the generated packge file (it will be in ~/packages/) - make sure to pass --allow-untrusted
Now we need fwcutter, which is executed from the firmware package:
Now you need to use modprobe so the device will show up:
To automate this on startup add it to /etc/modules:
Now continue with the normal instructions.
Many laptops have a hardware button (or switch) to turn off wireless card, however, the card can also be blocked by kernel. This can be changed using rfkill. To show the current of your Wi-Fi:
If the card is hard-blocked, use the hardware button or switch to unblock it. If the card is not hard-blocked but soft-blocked, use the following command: