Wi-Fi

Alpine Linux supports both wireless daemons i.e wpa_supplicant and iwd. This page describes how to set up a wireless network connection with WPA encryption using wpa_supplicant and provides the troubleshooting steps to configure wireless interface/drivers. 
== Prerequisites ==
Working wireless drivers. In most cases installing should get you the required drivers. Installation of this package can produce errors on diskless or data disk modes. If such errors occur, switch to system disk mode.
To list your available network interfaces: 
or 
Refer to Troubleshooting section to see if you don't see any wireless interfaces (e.g. ). You probably need to load and/or install drivers/firmware. If you are using a Broadcom chipset, see the Broadcom Wi-Fi section.
Bring up the desired interface: 
== wpa_supplicant ==
Networking setup-scripts can configure your wifi quickly using wpa_supplicant which can be used with NetworkManager, the standard Linux network configuration tool suite. If the above does not meet your requirement, please follow the steps outlined on this page for manual configuration.
To get started install package: 
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 check if wireless connection succeeds.
Optional security precaution:
By default will store your Wi-Fi password in plain text:
If you dont want your stored password in plain text just delete the line with #psk="<YourPasswordShouldBeHereInPlainText>" on it.
If all is well, run it as a daemon in the background by setting the option. 
Configure the interface with an IP address.
Sanity check: the interface should have a address. 
Add a entry for the desired interface (e.g. wlan0) in the file as follows:
Sanity check: Make sure is the correct configuration for the wireless access point you want to connect to.
Bring the interface down. 
Manually restart (or start) networking.
Perform sanity checks. For issues related to name resolution, refer Networking section.
=== Service configuration ===
Proceed to configure wpa_supplicant service to start automatically on boot, if networking works properly: 
Also ensure that networking is set to automatically start on boot: 
Manage wpa_supplicant service using the standard start, stop and restart options. For eg: to start wpa_supplicant service: 
=== 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 after booting, udhcpc needs to be notified. You can automatically notify udhcpc of network changes by using a wpa_cli action file, such as the one installed by default at .
To manually start a wpa_cli daemon with an action file, use the `-a` option: 
To do this automatically, use the `wpa_cli` service included in : 
Add the service to start at boot: 
== Troubleshooting ==
=== Check dmesg ===
Run dmesg and check for errors related to the wireless interface. Usually, dmesg gives maximum information related to network and all other hardware.
=== checking network cards ===
 lists the network interfaces that are detected. If the expected interfaces are not available, Check what network hardware chip you have using lspci or lsusb:
Refer hardware management, if the default outputs shown above lacks sufficient information.
Check what driver the card uses and modprobe it. Check that the card is in master mode.
Check what driver you need on the b43 compatibility page
=== Broadcom Wi-Fi Chipset Users ===
The Broadcom chipset is quite popular among older computers. The b43 driver is included in the linux-lts or linux-edge kernel packages. However, you might need to compile the firmware manually for this chipset as it is not included in linux-firmware for some cards. 
To check what broadcom chip you have using lspci:
====B43==== 
Download firmware cutter. 
Now we have everything to download the proprietary driver and extract the firmware from it: 
More information can be found here.
Now you need to use modprobe so the device will show up: 
Now continue with the normal instructions. 
====wl====
Automated:
You can use APKBUILD from broadcom-wl. It uses akms (Alpine Kernel Module Support) for automatic building and updating driver for new kernel versions.
Instructions can be found in the repository.
Manual:
First install the software we need to build a driver^: 
Then install the driver build repo (this is archived, however it's legacy so that doesn't matter): 
Then follow the build instructions listed in the git repo: 
Reboot and you have a working wl driver. Now continue with the normal instructions.
=== Rfkill ===
An error message ioctl 0x8914 failed: No error information, is the busybox ip's way of saying your wireless radio is rfkilled, which means the wireless card is blocked by kernel. This can be changed using rfkill. To show the current status of your Wi-Fi: 
~$ rfkill list
0: phy0: wlan
 Soft blocked: no
 Hard blocked: no
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: 
== See Also ==
* Networking in Alpine Linux
* iwd - An alternate to wpa_supplicant
* NetworkManager - Front-end to Networking
* PostmarketOS Wiki
* Archwiki
* Gentoo Wiki
Category:Networking