Wi-Fi: Difference between revisions

From Alpine Linux
m (fixed words)
(added section Realtek wireless devices)
 
(16 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This page describes how to set up a wireless network connection with WPA encryption using [[#wpa_supplicant|wpa_supplicant]].  
Alpine Linux has two wireless daemons i.e [[#wpa_supplicant|wpa_supplicant]] and [[iwd]] and both are fully supported. This page describes how to set up a wireless network connection using the default daemon i.e [[#wpa_supplicant|wpa_supplicant]]. {{Note|Do not use both wireless daemons i.e [[#wpa_supplicant|wpa_supplicant]] and [[iwd]] simultaneously, as it leads to conflicts.}}
 
<br>
{{Tip|The networking front end [[NetworkManager]] supports both wireless daemons i.e [[iwd]] and [[#wpa_supplicant|wpa_supplicant]]. Using both may lead to conflicts.}}


== Prerequisites ==
== Prerequisites ==


Working wireless drivers. In most cases installing {{Pkg|linux-firmware}} 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.
Working wireless [[#Device driver|device driver]]. Use the commands {{ic|ip link}} or {{ic|ip a}} to list your available network interfaces {{Path|wlan0}}, if you don't see any, refer to [[#Troubleshooting|Troubleshooting]] section.
To list your available network interfaces:
 
{{Cmd|ip link}}
 
or
 
{{Cmd|ip a}}
 
Refer to [[#Troubleshooting|Troubleshooting]] section to see if you don't see any wireless interfaces (e.g. {{Path|wlan0}}). You probably need to load and/or install drivers/firmware. If you are using a '''Broadcom chipset''', see the [[#Broadcom_Wi-Fi_Chipset_Users|Broadcom Wi-Fi section]].
 
Bring up the desired interface:
{{Cmd|# ip link set wlan0 up}}
 
If this errors with <code>ioctl 0x8914 failed: No error information</code>, that's <code>busybox ip</code>'s way of saying your wireless radio is rfkill'd. See the [[#Rfkill|Rfkill section]] for information on how to unblock your wireless radio.


== wpa_supplicant  ==
== Setup-interfaces ==


[[Configure_Networking#Network_setup-scripts|Network setup-scripts]] can configure your wifi quickly using <code>wpa_supplicant</code>. If it does not work or does not meet your requirement, please follow the steps outlined on this page.  
The [[Configure_Networking#setup-interfaces|setup-interfaces]] script automates the installation and configuration of
<code>wpa_supplicant</code> daemon to use Wi-Fi. [[NetworkManager]] can then be used to manage your Wi-Fi  using various gui/tui tools.


To get started install {{Pkg|wpa_supplicant}}
== Manual configuration ==


{{Cmd|# apk add wpa_supplicant}}
To get started install {{Pkg|wpa_supplicant}} package: {{Cmd|# apk add wpa_supplicant}}


Use this command to add your Wi-Fi network to wpa_supplicant:
Use this command to add your Wi-Fi network to wpa_supplicant: {{Cmd|# wpa_passphrase 'ExampleWifiSSID' 'ExampleWifiPassword' > /etc/wpa_supplicant/wpa_supplicant.conf}}
{{Cmd|# wpa_passphrase 'ExampleWifiSSID' 'ExampleWifiPassword' > /etc/wpa_supplicant/wpa_supplicant.conf}}
''(Access point not broadcasting its SSID requires additional line <code>scan_ssid=1</code> in the file {{Path|/etc/wpa_supplicant/wpa_supplicant.conf}})''
''(Access point not broadcasting its SSID requires additional line <code>scan_ssid=1</code> in the file <code>wpa_supplicant.conf</code>)''


{{Note|the Wi-Fi SSID and password are case sensitive and the single quote before and after the SSID and password need to be there}}
{{Note|the Wi-Fi SSID and password are case sensitive and the single quote before and after the SSID and password need to be there}}


Start wpa_supplicant in the foreground to make sure the connection succeeds.
Start wpa_supplicant in the foreground to check if wireless connection succeeds.{{Cmd|# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}
{{Cmd|# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}


<br>
'''Optional security precaution:'''
If all is well, run it as a daemon in the background by setting the {{Path|-B}} option.
{{Cmd|# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}


<br>
By default {{Pkg|wpa_supplicant}} will store your Wi-Fi password in plain text:{{Cat|/etc/wpa_supplicant/wpa_supplicant.conf|<nowiki>network={
Configure the interface with an IP address.
    ssid="<YourSSIDShouldBeHere>"
{{Cmd|# udhcpc -i wlan0}}
        #psk="<YourPasswordShouldBeHereInPlainText>"
    psk=<RandomLettersAndNumbersShouldBeHere>
}</nowiki>}}
If you dont want your stored password in plain text just delete the line with <code>#psk="<YourPasswordShouldBeHereInPlainText>"</code> on it.


Sanity check: the interface should have a {{Path|inet}} address.
If all is well, run it as a daemon in the background by setting the {{Path|-B}} option. {{Cmd|# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}
{{Cmd|$ ip addr show wlan0}}


<br>
Configure the interface with an IP address.{{Cmd|# udhcpc -i wlan0}}


=== Automatic Configuration on System Boot  ===
Sanity check: the interface should have a {{Path|inet}} address. {{Cmd|$ ip addr show wlan0}}


Add a entry for the desired interface (e.g. {{Path|wlan0}}):
Add a entry for the desired interface (e.g. <code>wlan0</code>) in the file as follows:{{Cat|/etc/network/interfaces|auto lo
{{Cat|/etc/network/interfaces|auto lo
auto wlan0
auto wlan0
iface wlan0 inet dhcp}}
iface wlan0 inet dhcp}}
Line 63: Line 44:
Sanity check: Make sure {{Path|/etc/wpa_supplicant/wpa_supplicant.conf}} is the correct configuration for the wireless access point you want to connect to.
Sanity check: Make sure {{Path|/etc/wpa_supplicant/wpa_supplicant.conf}} is the correct configuration for the wireless access point you want to connect to.


Bring the interface down.
Bring the interface down. {{Cmd|# ip link set wlan0 down}}
 
{{Cmd|# ip link set wlan0 down}}
 
<br>
Manually restart (or '''start''') '''networking'''.
 
{{Cmd|# rc-service networking --quiet restart &}}


<br>
Manually restart (or '''start''') '''networking'''.{{Cmd|# rc-service networking --quiet restart &}}
Perform sanity checks like ping and browsing. For issues related to name resolution, refer [[Configure_Networking#Configuring_DNS|Networking]] page.


If all is well, Configure wpa_supplicant to start automatically on boot:
Perform [[Configure_Networking#Connectivity_testing|sanity checks]]. For issues related to name resolution, refer [[Configure_Networking#Configuring_DNS|Networking]] section.


{{Cmd|# rc-update add wpa_supplicant boot}}
=== Service configuration ===
{{Seealso|NetworkManager}}


Also make sure '''networking''' is set to automatically start on boot:
Proceed to configure wpa_supplicant service to start automatically on boot, if networking works properly: {{Cmd|# rc-update add wpa_supplicant boot}}
Also ensure that '''networking''' is set to automatically start on boot: {{Cmd|# rc-update add networking boot}}


{{Cmd|# rc-update add networking boot}}
Manage wpa_supplicant service using the standard '''start''', '''stop''' and '''restart''' options. For eg: to start wpa_supplicant service: {{Cmd|# rc-service wpa_supplicant start}}
 
'''Optional security precaution:'''
 
By default {{Pkg|wpa_supplicant}} will store your Wi-Fi password in plain text:
 
{{Cat|(Example) /etc/wpa_supplicant/wpa_supplicant.conf|<nowiki>network={
    ssid="<YourSSIDShouldBeHere>"
        #psk="<YourPasswordShouldBeHereInPlainText>"
    psk=<RandomLettersAndNumbersShouldBeHere>
}</nowiki>}}
 
this is not necessary and {{Pkg|wpa_supplicant}} should funtion just fine without it, if you dont want your stored password in plain text just delete the line with <code>#psk="<YourPasswordShouldBeHereInPlainText>"</code> on it.


=== Launching udhcpc through wpa_cli actions ===
=== Launching udhcpc through wpa_cli actions ===


With the above configuration, udhcpc will only run once at boot.
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 {{Path|/etc/wpa_supplicant/wpa_cli.sh}}.
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 `/etc/wpa_supplicant/wpa_cli.sh`.


To manually start a wpa_cli daemon with an action file, use the `-a` option:
To manually start a wpa_cli daemon with an action file, use the `-a` option: {{Cmd|# wpa_cli -a /etc/wpa_supplicant/wpa_cli.sh}}


{{Cmd|# wpa_cli -a /etc/wpa_supplicant/wpa_cli.sh}}
To do this automatically, use the `wpa_cli` service included in {{Pkg|wpa_supplicant-openrc}}: {{Cat|/etc/conf.d/wpa_cli|<nowiki>WPACLI_OPTS="-a /etc/wpa_supplicant/wpa_cli.sh"</nowiki>}}
Add the service to start at boot: {{Cmd|# rc-update add wpa_cli boot}}


<br>
== Device driver ==
To do this automatically, use the `wpa_cli` service included in {{Pkg|wpa_supplicant-openrc}}:


{{Cat|/etc/conf.d/wpa_cli|<nowiki>WPACLI_OPTS="-a /etc/wpa_supplicant/wpa_cli.sh"</nowiki>}}
Wireless networking devices require device drivers and some chipsets also require firmware, in addition to a corresponding driver. In most cases the packaged [[Kernels#Firmware|firmware]] should get you the required drivers. The following section provides more information for various chipsets like [[#Broadcom_Wi-Fi_Chipset_Users|'''Broadcom''']] and some of these out-of-tree kernel drivers use [[Alpine kernel module support]].


{{Cmd|# rc-update add wpa_cli boot}}
=== Intel wireless devices ===


== iwd ==
Intel wireless users seeking a minimal set of firmware packages need to ensure that the following firmware packages are installed:  the {{Pkg|linux-firmware-none}} meta package and {{Pkg|linux-firmware-other}}.  Additionally, the {{ic|iwlwifi}} command is provided by a further package beginning from Alpine Linux v3.23 and Edge: such installations will [https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/65712 also require] {{Pkg|linux-firmware-intel}}, which now supplies {{Path|iwlwifi*.ucode.zst}}. Earlier supported versions of Alpine Linux had the {{ic|iwlwifi}} command bundled in {{Pkg|linux-firmware-other}}.{{Pill||text=v3.23.x}}
{{main|iwd }}


== Troubleshooting ==
=== Broadcom Wi-Fi Chipset ===


=== Check dmesg ===
The Broadcom chipset is quite popular among older computers. The b43 driver is included in the default kernel packages. However, you might need to compile the firmware manually for this chipset as it is not included in {{pkg|linux-firmware}} for some cards. To check what broadcom chip you have using lspci: {{Cmd|$ lspci -nn -d 14e4:}}


Run dmesg and check for errors related to the wireless interface. Usually, dmesg gives maximum information related to network and all other hardware.
Check what driver you need on the [https://wireless.docs.kernel.org/en/latest/en/users/drivers/b43.html#list-of-hardware b43 compatibility page].
{{Cmd|# dmesg |grep wlan}}
or
{{Cmd|# dmesg}}


=== checking network cards ===
====B43====  


{{Cmd|$ cat /proc/net/dev }} 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:
Download firmware cutter. {{Cmd|$ apk add b43-fwcutter}}


{{Cmd|$ lspci -nn }}
Now we have everything to download the proprietary driver and extract the firmware from it: {{Cmd|<nowiki># export FIRMWARE_INSTALL_DIR="/lib/firmware"
{{Cmd|$ lsusb }}
$ wget https://mirror2.openwrt.org/sources/broadcom-wl-5.100.138.tar.bz2
$ tar xjf broadcom-wl-5.100.138.tar.bz2
$ b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" broadcom-wl-5.100.138/linux/wl_apsta.o</nowiki>}}


Refer [[How to get regular stuff working#Hardware_Management|hardware management]], if the default outputs shown above lacks sufficient information.
More information can be found [https://linuxwireless.sipsolutions.net/en/users/Drivers/b43/#Other_distributions_not_mentioned_above here].


Check what driver the card uses and modprobe it. Check that the card is in master mode.
Now you need to use modprobe so the device will show up: {{Cmd|# modprobe b43}}
Check what driver you need on the [https://wireless.wiki.kernel.org/en/users/Drivers/b43#list_of_hardware b43 compatibility page]


=== Broadcom Wi-Fi Chipset Users  ===
Reboot and you have a working b43 driver. Now continue with the normal instructions.


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.
==== wl ====


To check what broadcom chip you have using lspci:
For '''wl''' chipset, you can download the APKBUILD from [https://codeberg.org/NeYurii/broadcom-wl here]. The site has necessary instructions and the it  uses [[Alpine kernel module support]] for automatic building and updating driver for new kernel versions.


{{Cmd|$ lspci -nn -d 14e4:}}
Alternately, install the software to build a driver: {{Cmd|apk add git alpine-sdk linux-headers linux-lts-dev}}


====B43====
Then install the driver build repo (this is archived, however it's legacy so that doesn't matter): {{Cmd|git clone https://github.com/antoineco/broadcom-wl
cd broadcom-wl
}}


Download firmware cutter.
Then follow the build instructions listed in the git repo: {{Cmd|make
doas make install
doas depmod -A
doas modprobe wl
}}


{{Cmd|$ apk add b43-fwcutter}}
Reboot and you have a working wl driver. Now continue with the normal instructions.


Now we have everything to download the proprietary driver and extract the firmware from it:
=== Realtek wireless devices ===


{{Cmd|<nowiki># export FIRMWARE_INSTALL_DIR="/lib/firmware"
A number of out-of-tree kernel drivers for '''Realtek chipset''' are packaged and found here '''{{pkg|rtl*src*}}'''. These drivers can be installed using [[Alpine kernel module support]].
$ wget http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2
$ tar xjf broadcom-wl-5.100.138.tar.bz2
$ b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" broadcom-wl-5.100.138/linux/wl_apsta.o</nowiki>}}


More information can be found [http://linuxwireless.sipsolutions.net/en/users/Drivers/b43/#Other_distributions_not_mentioned_above here].
== Troubleshooting ==


Now you need to use modprobe so the device will show up:
In most cases the packaged [[Kernels#Firmware|firmware]] should get you the required drivers.  To list your available network interfaces use the commands: {{Cmd|$ ip link}} or {{Cmd|$ ip a}}


{{Cmd|# modprobe b43}}
If the above command shows {{Path|wlan0}} interface, proceed to bring it up using the command: {{Codeline|# ip link set wlan0 up}}.  '''If no network interface is displayed, you probably need to load and/or install a [[#Device driver|device driver]]'''.


Now continue with the normal instructions.
=== checking network cards ===


====wl====
{{Cmd|$ cat /proc/net/dev }} lists the network interfaces that are detected. If the expected interfaces are not available, check what network hardware chip you have using builtin {{ic|lsusb}} command. If the output lacks sufficient information, install additional packages referred in [[How to get regular stuff working#Hardware_Management| hardware management]] to use below commands:
{{Cmd|$ lspci -nn }}
{{Cmd|$ lsusb}}


First install the software we need to build a driver[https://unix.stackexchange.com/questions/606073/how-to-build-kernel-modules-in-alpine-3-12 ^]:
Check what [[#Device driver|device driver]] the card uses and modprobe it. Check that the card is in master mode.


{{Cmd|apk add git alpine-sdk linux-headers}}
=== Check dmesg ===


Then install the driver build repo (this is archived, however it's legacy so that doesn't matter):
Run dmesg and check for errors related to the wireless interface. Usually, dmesg gives maximum information related to network and all other hardware.
 
{{Cmd|# dmesg}}
{{Cmd|git clone https://github.com/antoineco/broadcom-wl
cd broadcom-wl
}}
 
Then follow the build instructions listed in the git repo:
 
{{Cmd|make
doas make install
doas depmod -A
doas modprobe wl
}}
 
reboot and you have a working wl driver!
 
Now continue with the normal instructions.


=== Rfkill ===
=== Rfkill ===


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:  
An error message <code>ioctl 0x8914 failed: No error information</code>, is the <code>busybox ip</code>'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:  
 
<p style="background-color:#f9f9f9; border:1px dashed #2f6fab; line-height:1.1em; padding:1em; font-family:monospace; font-size:10pt; white-space:pre; overflow:auto;"><span style="color:green;">~</span>'''$''' rfkill list
<p style="background-color:#f9f9f9; border:1px dashed #2f6fab; line-height:1.1em; padding:1em; font-family:monospace; font-size:10pt; white-space:pre; overflow:auto;"><span style="color:green;">~</span>'''$''' rfkill list
0: phy0: wlan
0: phy0: wlan
Line 199: Line 146:
</p>
</p>


<br>
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: {{Cmd|# rfkill unblock wifi}}
 
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:  
 
{{Cmd|# rfkill unblock wifi}}
 
<br>


== See Also ==
== See also ==


* [[Configure_Networking| Networking in Alpine Linux]]
* [[Configure_Networking| Networking in Alpine Linux]]
Line 215: Line 156:
* [https://wiki.archlinux.org/title/Network_configuration/Wireless Archwiki]
* [https://wiki.archlinux.org/title/Network_configuration/Wireless Archwiki]
* [https://wiki.gentoo.org/wiki/Wi-Fi Gentoo Wiki]
* [https://wiki.gentoo.org/wiki/Wi-Fi Gentoo Wiki]
* [[Alpine kernel module support]] - A fully automated solution for building kernel modules
* [https://unix.stackexchange.com/questions/606073/how-to-build-kernel-modules-in-alpine-3-12 Build kernel modules manually]


[[Category:Networking]]
[[Category:Networking]]

Latest revision as of 18:17, 10 January 2026

Alpine Linux has two wireless daemons i.e wpa_supplicant and iwd and both are fully supported. This page describes how to set up a wireless network connection using the default daemon i.e wpa_supplicant.

Note: Do not use both wireless daemons i.e wpa_supplicant and iwd simultaneously, as it leads to conflicts.

Prerequisites

Working wireless device driver. Use the commands ip link or ip a to list your available network interfaces wlan0, if you don't see any, refer to Troubleshooting section.

Setup-interfaces

The setup-interfaces script automates the installation and configuration of wpa_supplicant daemon to use Wi-Fi. NetworkManager can then be used to manage your Wi-Fi using various gui/tui tools.

Manual configuration

To get started install wpa_supplicant package:

# apk add wpa_supplicant

Use this command to add your Wi-Fi network to wpa_supplicant:

# wpa_passphrase 'ExampleWifiSSID' 'ExampleWifiPassword' > /etc/wpa_supplicant/wpa_supplicant.conf

(Access point not broadcasting its SSID requires additional line scan_ssid=1 in the file /etc/wpa_supplicant/wpa_supplicant.conf)

Note: the Wi-Fi SSID and password are case sensitive and the single quote before and after the SSID and password need to be there

Start wpa_supplicant in the foreground to check if wireless connection succeeds.

# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

Optional security precaution:

By default wpa_supplicant will store your Wi-Fi password in plain text:

Contents of /etc/wpa_supplicant/wpa_supplicant.conf

network={ ssid="<YourSSIDShouldBeHere>" #psk="<YourPasswordShouldBeHereInPlainText>" psk=<RandomLettersAndNumbersShouldBeHere> }

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 -B option.

# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

Configure the interface with an IP address.

# udhcpc -i wlan0

Sanity check: the interface should have a inet address.

$ ip addr show wlan0

Add a entry for the desired interface (e.g. wlan0) in the file as follows:

Contents of /etc/network/interfaces

auto lo auto wlan0 iface wlan0 inet dhcp
Warning: Don't remove or comment out the auto lo entry


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.

# ip link set wlan0 down

Manually restart (or start) networking.

# rc-service networking --quiet restart &

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:

# rc-update add wpa_supplicant boot

Also ensure that networking is set to automatically start on boot:

# rc-update add networking boot

Manage wpa_supplicant service using the standard start, stop and restart options. For eg: to start wpa_supplicant service:

# rc-service wpa_supplicant start

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 /etc/wpa_supplicant/wpa_cli.sh.

To manually start a wpa_cli daemon with an action file, use the `-a` option:

# wpa_cli -a /etc/wpa_supplicant/wpa_cli.sh

To do this automatically, use the `wpa_cli` service included in wpa_supplicant-openrc:

Contents of /etc/conf.d/wpa_cli

WPACLI_OPTS="-a /etc/wpa_supplicant/wpa_cli.sh"

Add the service to start at boot:

# rc-update add wpa_cli boot

Device driver

Wireless networking devices require device drivers and some chipsets also require firmware, in addition to a corresponding driver. In most cases the packaged firmware should get you the required drivers. The following section provides more information for various chipsets like Broadcom and some of these out-of-tree kernel drivers use Alpine kernel module support.

Intel wireless devices

Intel wireless users seeking a minimal set of firmware packages need to ensure that the following firmware packages are installed: the linux-firmware-none meta package and linux-firmware-other. Additionally, the iwlwifi command is provided by a further package beginning from Alpine Linux v3.23 and Edge: such installations will also require linux-firmware-intel, which now supplies iwlwifi*.ucode.zst. Earlier supported versions of Alpine Linux had the iwlwifi command bundled in linux-firmware-other. v3.23.x

Broadcom Wi-Fi Chipset

The Broadcom chipset is quite popular among older computers. The b43 driver is included in the default 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:

$ lspci -nn -d 14e4:

Check what driver you need on the b43 compatibility page.

B43

Download firmware cutter.

$ apk add b43-fwcutter

Now we have everything to download the proprietary driver and extract the firmware from it:

# export FIRMWARE_INSTALL_DIR="/lib/firmware" $ wget https://mirror2.openwrt.org/sources/broadcom-wl-5.100.138.tar.bz2 $ tar xjf broadcom-wl-5.100.138.tar.bz2 $ b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" broadcom-wl-5.100.138/linux/wl_apsta.o

More information can be found here.

Now you need to use modprobe so the device will show up:

# modprobe b43

Reboot and you have a working b43 driver. Now continue with the normal instructions.

wl

For wl chipset, you can download the APKBUILD from here. The site has necessary instructions and the it uses Alpine kernel module support for automatic building and updating driver for new kernel versions.

Alternately, install the software to build a driver:

apk add git alpine-sdk linux-headers linux-lts-dev

Then install the driver build repo (this is archived, however it's legacy so that doesn't matter):

git clone https://github.com/antoineco/broadcom-wl cd broadcom-wl

Then follow the build instructions listed in the git repo:

make doas make install doas depmod -A doas modprobe wl

Reboot and you have a working wl driver. Now continue with the normal instructions.

Realtek wireless devices

A number of out-of-tree kernel drivers for Realtek chipset are packaged and found here rtl*src*. These drivers can be installed using Alpine kernel module support.

Troubleshooting

In most cases the packaged firmware should get you the required drivers. To list your available network interfaces use the commands:

$ ip link

or

$ ip a

If the above command shows wlan0 interface, proceed to bring it up using the command: # ip link set wlan0 up. If no network interface is displayed, you probably need to load and/or install a device driver.

checking network cards

$ cat /proc/net/dev

lists the network interfaces that are detected. If the expected interfaces are not available, check what network hardware chip you have using builtin lsusb command. If the output lacks sufficient information, install additional packages referred in hardware management to use below commands:

$ lspci -nn

$ lsusb

Check what device driver the card uses and modprobe it. Check that the card is in master mode.

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.

# dmesg

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:

# rfkill unblock wifi

See also