So, you have a Raspberry Pi 4 running Slackware ARM, and until recently [could be any time from kernel 4.19.69 - onwards] the wireless NIC worked fine but now it's gone AWOL or refuses to function as expected. Welcome to the [ ! so_wonderful ] perpetual world of "Oh no! The wireless NIC has stopped working again!" as it's a recurring phenomenon usually attributed to out-dated RPi firmware. If this describes your RPi4 wifi situation then there's a solution - FOR NOW! Until it stops working the next time.
With the RPi4 device connected to the network via Ethernet, as 'root' user remove the existing wireless brcmfmac driver module :
Code:
root@torq:~# rmmod brcmfmac
Download and install the latest [SARPi] kernel, kernel-modules and boot-firmware packages from:
http://sarpi.fatdog.eu/index.php?p=rpi4getcurrent
Re-install the driver:
Code:
root@torq:~# modprobe -vvv brcmfmac
modprobe: INFO: custom logging function 0x19c94 registered
insmod /lib/modules/4.19.89-v7l-arm/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko
modprobe: INFO: context 0xbf4328 released
Check out the WNIC inurface :
Code:
root@torq:~# ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 abc1::1234:abc2:1234:ab12 prefixlen 64 scopeid 0x20<link>
ether ab:cd:ef:12:34:56 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 10 bytes 1036 (1.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@torq:~# ip a
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether ab:cd:ef:12:34:56 brd ff:ff:ff:ff:ff:ff
inet6 abc1::1234:abc2:1234:ab12/64 scope link
valid_lft forever preferred_lft forever
Edit wpa_supplicant.conf :
Code:
root@torq:~# nano -w /etc/wpa_supplicant.conf
Ensure your wpa_supplicant.conf looks similar to this. If not, modify it accordingly and save-quit. NB: your country-code should be NL US GB IE FR DE (etc.):
Code:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=0
country=<your_country-code_goes_here>
Start wpa_supplicant :
Code:
root@torq:~# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
Use wpa_cli to setup and configure the wlan0 interface :
Code:
root@torq:~# wpa_cli
wpa_cli v2.9
Copyright (c) 2004-2019, Jouni Malinen <j@w1.fi> and contributors
This software may be distributed under the terms of the BSD license.
See README for more details.
Selected interface 'wlan0'
Interactive mode
> scan
OK
<3>CTRL-EVENT-SCAN-STARTED
> scan_results
bssid / frequency / signal level / flags / ssid
ef:7c:5b:3d:1a:11 2412 -33 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] EXAGA2G
ef:7c:5b:3d:1a:12 5180 -41 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] EXAGA5G
4c:38:d8:03:6e:21 2437 -58 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] VM2077355
2a:35:d1:60:92:19 2447 -59 [WPA2-EAP-CCMP][ESS] Virgin Media
> add_network
0
> set_network 0 ssid "<your_network_SSID_goes_here>"
OK
> set_network 0 psk "<your_wifi_password_goes_here>"
OK
> enable_network 0
0K
> quit
Enable the wlan0 interface and assign it an IP address and netmask.
NB: This is only an example - you
must fill in your own IP address and netmask here :
Code:
root@torq:~# ifconfig wlan0 192.168.1.123 netmask 255.255.255.0 up
Now check to see if what you've done has brought your RPi4 wireless NIC back to life :
Code:
root@torq:~# ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.123 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 abc1::1234:abc2:1234:ab12 prefixlen 64 scopeid 0x20<link>
ether ab:cd:ef:12:34:56 txqueuelen 1000 (Ethernet)
RX packets 225 bytes 17398 (16.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 426 bytes 56265 (54.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
So, the wlan0 interface shows that it's up and configured correctly [or should do!]. Now you can disconnect the Ethernet cable and check that the new wireless connection is working as expected :
Code:
root@torq:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=22.5 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=24.0 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=19.5 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=55 time=20.8 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 19.541/21.687/23.967/1.674 ms
If your wireless still isn't working after all that, go back and try again. Prudent advice would be to open a packet of Jaffa cakes when facing any Slackware issues, for greater success and more satisfying result purposes.
*** No Slackware ARM packages were harmed during the creation of this LQ forum post.