First make sure your wireless drivers are loaded properly.
Install wpa_supplicant & dhcpcd.
apk add wpa_supplicant dhcpcd
Use the interface to scan for wireless access points. Make sure the ESSID you want to connect to appears here.
iwlist wlan0 scanning | grep ESSID
Create a wpa_supplicant configuration stanza for the wireless access point.
wpa_passphrase 'YourRouterESSID' 'YourRouterPassword' > /etc/wpa_supplicant/wpa_supplicant.conf
Start wpa_supplicant in the foreground to make sure the connection succeeds.
wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
If all is well, run it as a daemon in the background by setting the -B option.
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Add a stanza for the desired interface (e.g. wlan0) to /etc/network/interfaces
:
# /etc/network/interfaces
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Add configure /etc/wpa_supplicant/wpa_supplicant.conf
# /etc/wpa_supplicant/wpa_supplicant.conf
country=JP
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
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.
ifconfig wlan0 down
Manually start wpa_supplicant.
/etc/init.d/wpa_supplicant start
If all is well (confirm with the sanity checks in Manual Configuration), configure wpa_supplicant to start automatically on boot.
rc-update add wpa_supplicant boot
Note: If this errors with
ioctl 0x8914 failed: No error information
, that'sbusybox ip
's way of saying your wireless radio is rfkill'd. See here for information on how to unblock your wireless radio; the base installation should havebusybox rfkill
available.
the first step needs to be