This document describes how to set up a wireless network connection with WPA encryption.
Install necessary drivers and software
First make sure your wireless drivers are loaded properly. (if you are using a Broadcom chipset, see the section at the bottom of this post.)
Bring the link up so we can look for wireless networks. (An error here means you probably need extra drivers/firmware.)
Find a network to connect to. Look for the ESSID. In this example we will use the ESSID "MyNet".
Configure the wlan0 interface to associate with the MyNet ESSID:
Print its configuration, to check:
Create a wpa_supplicant configuration stanza for wpa_supplicant by executing the following:
wpa_passphrase expects the password to be passed via stdin.
So, type the password and press ENTER.
The above commands creates the file wpa.conf which includes the pre-shared key.
From one terminal/console, start wpa_supplicant with the generated config:
From another terminal/console, start dhcpcd:
The wlan0 interface should be configured with an IP address at this point:
Automatic Configuration on System Boot
Add an interface stanza for wlan0 to the file /etc/network/interfaces
auto wlan0 iface wlan0 inet dhcp
Create /etc/wpa_supplicant if it doesn't already exist, set sane permissions and append the configuration wpa.conf to wpa_supplicant.conf.
mkdir -p /etc/wpa_supplicant chmod 750 /etc/wpa_supplicant cat wpa.conf >> /etc/wpa_supplicant/wpa_supplicant.conf
Test the automatic interface configuration:
Bring the interface down:
Manually start wpa_supplicant
The wlan0 interface should be associated with the MyNet SSID:
The wlan0 interface should have been assigned an IP address via DHCP:
Configure wpa_supplicant to start automatically on boot:
Log in and check that the interface is associated with the access point:
Check that the interface was assigned an IP address via DHCP:
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 an Git:
Then git clone aports from git.alpinelinux.org.
Change your directory to aports/non-free/b43-firmware, then build it.
You can't be root and must be a user of the group abuild (use groupadd)
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.