A few users have mentioned that the wireless NIC on SARPi64 packages running kernel 5.4.x on a Raspberry Pi 4 isn't working (or detected) as expected. Well now it is.
First remove any existing brcmfmac module thats loaded:
Code:
root@torq:~# rmmod brcmfmac
Download the latest
*.txz package files from:
http://sarpi64.fatdog.eu/index.php?p=rpi4getcurk5
Upgrade these packages using 'upgradepkg' OR use 'installpkg' if no previous versions are already installed.
NB: the important file here is 'sarpi64-hacks-4.0-armv8-1_slackcurrent_11Feb20_sp64.txz' which contains the firmware required for the wireless NIC. Any existing firmware in '/lib/firmware/brcm/' on your system will be replaced by this package!
Reload the brcmfmac module:
Code:
root@torq:~# modprobe -vvv brcmfmac
modprobe: INFO: custom logging function 0x19c94 registered
insmod /lib/modules/5.4.18-v8-aarch64/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko
modprobe: INFO: context 0x444320 released
Run the 'iwconfig' command and you should see your wireless interface:
Code:
root@torq:~# iwconfig
eth0 no wireless extensions.
lo no wireless extensions.
wlan1 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
NB: Mine shows 'wlan1' but yours might be 'wlan0' (etc.) so just replace 'wlan1' with the correct ID of your interface for this purpose.
So, now run 'ifconfig wlan1' to check out the wireless interface:
Code:
root@torq:~# ifconfig wlan1
wlan1: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether dc:a6:32:67:c4:2c txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
So, I'm guessing your existing '/etc/wpa_supplicant.conf' looks a little like this:
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=root
Next , you need to edit and modify this file so the content looks like this:
(NB: your country-code should be NL US GB IT DK IE SE etc.)
Code:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=0
country=<your_country-code_goes_here>
Exit and SAVE the '/etc/wpa_supplicant.conf' file. Then initialise 'wpa_supplicant' using the following command:
(Remember to replace 'wlan1' with the ID of your wireless interface.)
Code:
root@torq:~# wpa_supplicant -B -i wlan1 -c /etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
Now use 'wpa_cli' to setup the wireless 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 'wlan1'
Interactive mode
Type 'scan' to search for available wireless connections:
Code:
> scan
OK
<3>CTRL-EVENT-SCAN-STARTED
<3>WPS-AP-AVAILABLE
<3>CTRL-EVENT-NETWORK-NOT-FOUND
Then type 'scan_results' to view any available connections:
Code:
> scan_results
bssid / frequency / signal level / flags / ssid
12:34:56:ab:cd:ef 5180 -36 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] EXAGA5G
12:34:56:ab:cd:ef 2412 -30 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] EXAGA2G
Now look in the code below carefully and copy it to add your network, ssid, and psk [password] then enable it:
(NB: you might be offered a different number network instead of '0' - if so use that value instead)
Code:
> 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
<3>CTRL-EVENT-SCAN-STARTED
<3>WPS-AP-AVAILABLE
<3>Trying to associate with SSID 'EXAGA2G'
<3>Associated with 12:34:56:ab:cd:ef
<3>CTRL-EVENT-CONNECTED - Connection to 12:34:56:ab:cd:ef completed [id=0 id_str=]
<3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
> quit
Quit the 'wpa_cli' and exit to command prompt. Next, enable the 'wlan1' interface and assign it an IP address and netmask.
NB: This is only MY example - you must fill in your own IP address and netmask here!:
Code:
root@torq:~# ifconfig wlan1 192.168.1.157 netmask 255.255.255.0 up
Finally, check out the wireless connection using 'ifconfig wlan1' again:
Code:
root@torq:~# ifconfig wlan1
wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.157 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::dea6:32ff:fe67:c42c prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:67:c4:2c txqueuelen 1000 (Ethernet)
RX packets 31 bytes 2416 (2.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 40 bytes 5428 (5.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
You should see that the wireless interface 'wlan1' has an IP address assigned (with netmask) and is up and running.
For clarity and confirmation:
Code:
root@torq:~# uname -a
Linux torq 5.4.18-v8-aarch64 #18 SMP PREEMPT Tue Feb 11 16:31:16 GMT 2020 aarch64 BCM2835 GNU/Linux
If you have any further problems or questions with your wireless NIC using the updated SARPi64 packages just post in this thread.