Linux driver for the nRF70 series Wi-Fi SoC family from Nordic Semiconductor. The driver is based on the nRF Connect SDK and is compatible with the Linux SPI framework.
This driver is a reference implementation and is not intended for production use. It is provided as-is and is not supported by Nordic Semiconductor ASA. It can be used in any Linux environment to evaluate the nRF70 series Wi-Fi SoC family.
The driver supports the following nRF70 series Wi-Fi SoCs:
The driver supports the following features:
- Wi-Fi STA mode
- Wi-Fi 6 (802.11ax) 1x1 operation
- Dual-band (2.4 GHz and 5 GHz) operation (Depending on the nRF70 series Wi-Fi SoC variant)
- WPA2-PSK security
- WPA3-SAE security
The driver can be used with any Linux based products, but it is tested on a Raspberry Pi4B running the Ubuntu 22.04 LTS operating system. Support for other Linux distributions is not part of the scope of this project.
The following hardware is required to run the driver:
- Raspberry Pi4B
- nRF7002 or nRF7001 Evaluation Kit (without Host MCU)
- An Interposer board to connect the nRF70 series Wi-Fi SoC to the Raspberry Pi4B header Note: The Interposer board is not included in the nRF7002 or nRF7001 Evaluation Kit and must be purchased separately.
- A microSD card (at least 32GB) with Ubuntu 22.04 LTS installed
The following software is required to run the driver:
- Ubuntu 22.04.03 LTS (64-bit) comes with
5.15.0-1037-raspi
Linux kernel
The following dependencies are required to build the driver, install them using apt
:
west
device-tree-compiler
build-essential
wpa_supplicant
- Make sure that the
wpa_supplicant
version is2.10
or newer
- Make sure that the
wpa_passphrase
iw
- Clone the repository using
west
:west init -m [email protected]:NordicPlayground/nrf70-linux-driver.git --mr main
- Update west projects
west update
- Build the driver
make clean all
nRF70 driver has feature flags to enable/disable certain features. These flags can be controlled via the command line arguments to the make
command. The following flags are available:
Flag | Description | Default |
---|---|---|
MODE |
Supported modes are STA only |
STA |
LOW_POWER |
Enable low power mode | 0 |
- Build the driver in STA mode with low power enabled
make clean all MODE=STA LOW_POWER=1
Ensure that the nrf_wifi_fmac_sta.ko
and dts/nrf70_rpi_interposer.dtbo
files are generated.
-
Load the DTS overlay
a. Permanent loading: Configure the Raspberry Pi4B to load the DTS overlay at boot time (Recommended for production)
sudo cp dts/nrf70_rpi_interposer.dtbo /boot/firmware/overlays/ # Update config.txt sudo vim /boot/firmware/config.txt # Add below line at the end of the file dtoverlay=nrf70_rpi_interposer sudo reboot
b. Runtime loading: Load the DTS overlay at runtime (Helpful for development)
sudo dtoverlay dts/nrf70_rpi_interposer.dtbo
Note 1: Using this procedure, the DTS overlay must be loaded every time the Raspberry Pi4B is rebooted.
Note 2: Using this procedure, in the
dmesg
ignore the warningsOF: overlay: WARNING: memory leak will occur if overlay removed, property: ******
, these are expected as we are dynamically loading the DTS. -
Load the driver
sudo insmod nrf_wifi_fmac_sta.ko
Note 1: Using this procedure, the driver must be loaded every time the Raspberry Pi4B is rebooted.
Note 2: Using this procedure, in the
dmesg
ignore the warningsnrf_wifi_fmac_sta: loading out-of-tree module taints kernel
, these are expected as we are loading a out-of-tree module. -
Verify that the driver is loaded
lsmod | grep nrf_wifi_fmac_sta
-
Verify network interfaces
ip link show
The driver should create a new network interface called
nrf_wifi
. -
Verify Wi-Fi interface using
iw
iw dev nrf_wifi info
-
Check the kernel log for driver output
dmesg
- Prepare a WPA supplicant configuration file
wpa_passphrase <SSID> <PASSWORD> > wpa_supplicant.conf
- Connect to the Wi-Fi network
sudo wpa_supplicant -i nrf_wifi -c wpa_supplicant.conf -B
- Verify that the Wi-Fi interface is connected
iw dev nrf_wifi link
- Run a DHCP client to get an IP address
sudo dhclient nrf_wifi
- Verify that the Wi-Fi interface has an IP address
ip addr show nrf_wifi
- Verify that the Wi-Fi interface has internet access
ping -I nrf_wifi google.com
- Kill the WPA supplicant
sudo killall wpa_supplicant
- Verify that the Wi-Fi interface is disconnected
iw dev nrf_wifi link
- Remove the driver
sudo rmmod nrf_wifi_fmac_sta
- Stop the WPA supplicant
sudo killall wpa_supplicant
- Run the WPA supplicant in debug mode
sudo wpa_supplicant -i nrf_wifi -c wpa_supplicant.conf -dd -f /tmp/wpa_supplicant.log
- Share the
/tmp/wpa_supplicant.log
file along with configuration filewpa_supplicant.conf
for debugging purposes.
- Collect the kernel log
dmesg > dmesg.log
- Collect the kernel log from all previous boots to give a complete picture of the system
cat /var/log/kern.log* > kern.log
The procedure to collect sniffer logs is outside the scope of this document as it depends heavily on the environment and the sniffer used.
-
Target Wake Time (TWT) feature is not supported yet.
-
Maximum UDP/TCP throughputs achieved presently are in the range of 2 - 3 Mbps.
-
Intermittent issues when running UDP/TCP throughputs:
- Firmware lockup (on the nRF70 series device)
- Linux kernel crash
-
Sometimes below warning is observed in the
dmesg
NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
-
Sometimes during boot couple of commands timeout and below warning is observed in the
dmesg
, once the driver is fully initialized the commands work as expected, so, these warnings can be ignored.Timed out waiting for response from RPU (Get Channel)
Timed out waiting for response from RPU (Set TX power)