This document describes how to set up a wireless network connection with WPA encryption.
First make sure your wireless drivers are loded properly. (if you are using a Broadcom chipset, see note at the end of this post.)
Install wireless-tools and wpa_supplicant.
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"
Lets set the ESSID.
We need to create a shared key for wpa_supplicant.
It will wait for the password from stdin. Enter the password and enter. Now you will have a wpa.conf file with the preshared key.
start wpa_supplicant with the generated config
From another console, start dhcpcd
You should get an IP address.
You then want to make the connection process automatic on boot-up. Open /etc/network/interfaces and add the following stanza:
auto wlan0 iface wlan0 inet dhcp
You will also need to set wpa_supplicant to start automatically on boot.
rc-update add wpa_supplicant default
Next, create /etc/wpa_supplicant (permissions of 755 w/ root:root are fine), and move wpa.conf into that folder. Then rename wpa.conf to wpa_supplicant.conf.
Reboot and check that you are associated with the access point:
and check that you got a DHCP lease:
ifconfig wlan0 | grep addr
NOTE FOR BROADCOM WIFI CHIPSET USERS:
You will need to compile the firmware manually for your chipset. First, apk add alpine-sdk, then git clone aports from git.alpinelinux.org, switch to the aports/non-free/b43-firmware folder, then run abuild -r. Install the generated apk file. Run fwcutter, and you should be good to go.