2026-07-04 (update is underway to check compatibility with kernel 6.18)
Maintained by @morrownr
Forword: This guide has been available for several years and has evolved over that time. This curent edition reflects my ongoing use and testing. My goal is to provide a guide that supports a stable, fast AP setup and an educational experience. This guide is used with and is mostly tested on Raspberry Pi OS (RasPiOS). RasPiOS, as of this writing, uses kernel 6.18 and is based on Debian 13. This guide should work with many distros on a variety of hardware, possibly with modifications in some cases. I strongly recommend that before you use this guide that you start with a clean distro installation. While this guide primarily uses the RasPiOS, other distros such as, but not limited to, Debian 12/13, Arch, Fedora or Ubuntu should work well. Your comments, suggestions and questions are always welcome ( post in Issues).
What you will learn:
-
Linux networking with
systemd-networkd -
Establishing one or more Service Set Identifiers (SSID) with
hostapd
A bridged wireless access point (aka dumb AP) works within an existing ethernet network to add WiFi capability where it does not exist or to extend the network to WiFi capable computers and devices in areas where the WiFi signal is weak or otherwise does not meet expectations. Another common use is to add another SSID that is on a different channel so as to reduce the load on an existing SSID. One big advantage of this setup is that it can cost far less than many of the Mesh kits that are available. Another advantage this setup has is that the Raspberry Pi is a general purpose computer so that it can be used for additional tasks while performing as a bridged wireless access point.
((((( tablet
╱
INTERNET >>>>>>> modem/router >>>>>>> RasPi ))))) ((((( laptop/desktop
(cable) ╱ ╲
(fiber) CAT 5e+ ((((( phone
(dsl) Powerline AV2 ╲
(satellite) Ethernet Over Coax ((((( IoT
Note: In a situation where only another SSID is needed on a different channel or when adding WiFi capability is all that is needed, a very short CAT 5e+ cable may be all that is required as the RasPi can be plugged directly into the modem or router.
Note: In a situation where the RasPi needs to be located a long distance from the modem or router, the connection from the router to the RasPi is best served by a CAT 5e or greater ethernet cable but alternatives exist. One alternative is to use your existing electrical wiring by using Powerline AV2 adapters. These adapters are also called Homeplug AV2 adapters and come in a variety of speeds and prices. I have had success with Powerline AV2 adapters, such as the TP-Link AV2000 TL-PA9020P KIT, but success depends on the quality and setup of the electrical wiring to be used. Another option is Ethernet Over Coax (MoCa). Anyone considering Powerline AV2 or Ethernet Over Coax (MoCa) should research the products and be prepared to return the products if expectations are not met.
Note: If you are looking to set up a Routed Wireless Access Point, my recommendation is to use OpenWRT. Here is a video that may be helpful:
https://www.youtube.com/watch?v=_pBf2hGqXL8
Information that is helpful with OpenWRT if you intend to use a USB WiFi adapter: OpenWRT has driver packages for several Mediatek/Ralink chipsets to include the mt7925u, mt7925e, mt7921u, mt7921e, mt7612u and mt7610u. These drivers work well but do not support DFS channels for AP mode on the 5 GHz band. As far as I know, there are no USB WiFi adapters that support DFS channels as doing so would increase the complexity and price of the adapters to the point that makers likely feel that they would not be profitable. Realtek out-of-kernel drivers are a real challenge on OpenWRT and are best avoided. As of kernel 6.14, in-kernel drivers for the rtl8812au and rtl8821/11au chips have been added to the Linux kernel. As of kernel 6.16, an in-kernel driver for the rtl8814au chip has been added to the Linux kerenl. Additionally, many other Realtek WiFi 5in-kernel drivers have been improved to the point in rtw88 that performance is very good. Hopefully this Realtek rtw88 WiFi 5 support can be added to OpenWRT when the version of OpenWRT that uses kernel 6.18 is produced. Until that comes to pass, you should probably use adapters with Mediatek chipsets. Additionally, at this time, I recommend that you avoid Realtek WiFi 6 and 7 USB adapters as almost none of them can be found in single-state (no windows driver onboard ) configurations and that can be a problem that we do not need.
This document outlines single band and dual band WiFi setups using a Raspberry Pi 4B. There is a lot of flexibility and capability available with this type of setup.
Important: USB WiFi adapters contain only one internal radio. For a dual band setup, you need two usb wifi adapters or one usb wifi adapter and the RasPi internal wifi active. I do not recommend the internal wifi on RasPi's as the quality of the drivers is suspect. In fact, I alsways deactive the RasPi internal wifi.
Note: Tri Band should work but I have not tested it.
Raspberry Pi 4B (4gb)
Raspberry Pi OS (with Desktop) (64 bit) - Strongly recommend that you start with a fresh installation.
Ethernet cable or Powerline AV2 providing internet connectivity
USB WiFi Adapter(s)
Case
Right Angle USB Extender
Power Supply
SD Card
Note: My Pi4B is headless meaning no keyboard or mounse is in use. I use RasPiOS Connect to control the Pi4B.
Note: I use the case upside down with little stick-on rubber feet. There are several little things that work better with the case upside down and no negatives that I can find.
Note: Historically speaking, very few Powered USB 3 Hubs will work well with Raspberry Pi hardware. Raspberry Pi now offers a Raspberry Pi USB 3 Powered Hub for sale. I do not own one at this time so cannot say whether it is good or not.
Another problem with the Raspberry Pi 4B USB subsystem is that it is designed to supply a maximum of 1200 mA of power. This is WELL BELOW the specification which calls for 2800 mA in a setup such as on the RasPi4B. It is very easy to exceed this 1200 mA limit.
Note: The rtw88 chipset based USB3 WiFi adapters require from 504 mA of power up to well over 800 mA of power depending on the adapter. Beware of the power hungry Realtek USB WiFi adapters.
Let me repeat: The Raspberry Pi 3B, 3B+ and 4B USB subsystems are only able to supply a total of 1200 mA of power total to be divided between all attached devices.
Note: The Alfa AWUS036ACM adapter, a mt7612u based adapter, requests a maximum of 400 mA from the USB subsystem during initialization. Testing with a meter shows actual usage of 360 mA during heavy load and usage of 180 mA during light loads. This is much lower power usage than most AC1200 class adapters which makes this adapter a good choice for a Raspberry Pi based access points. Other mt7612u and mt7610u chipset based adapters also show low power usage. Even the newer WiFi 6 mt7921au and WiFi 7 mt7925u chipsets are low power chipsets so will work well with this setup.
USB WiFi adapter driver installation, if required, should be performed prior to continuing.
Note: New and updated Realtek WiFi 5 in-kernel (mac80211) drivers are available in the rtw88 series of drivers. If using a rtl8812au or rtl8821/11au based adapter, the driver went into kernel 6.14. If using a rtl8814au based adapter, the driver went into kernel 6.16. If using other Realtek WiFi 5 adapters, it is recommended that you use kernel 6.12 or later. If you are using an older kernel, it is possible to install the rtw88, in its modern form, from the following repo:
https://github.com/lwfinger/rtw88
The following instructions apply to Realtek out-of-kernel drivers:
Note: For USB3 adapters based on the Realtek rtl8812au, rtl8812bu and rtl8814au chipsets, the following module parameters may be needed for best performance when the adapter is set to support 5 GHz band: (if using a rtl8812bu based adapter with a Raspberry Pi 4B or 400, you may need to limit USB mode to USB2 due to a bug, probably in the Raspberry Pi OS, that causes dropped connections-- rtw_switch_usb_mode=2)
rtw_vht_enable=2 rtw_switch_usb_mode=1
Note: For USB2 adapters based on the Realtek rtl8811au and rtl8821cu chipset, the following module parameters may be needed for best performance when the adapter is set to support 5 GHz band:
rtw_vht_enable=2
Note: For USB3 adapters based on the Realtek rtl8812au, rtl8812bu and rtl8814au chipsets, the following module parameters may be needed for best performance when the adapter is set to support 2.4 GHz band:
rtw_vht_enable=1 rtw_switch_usb_mode=2
Note: For USB2 adapters based on the Realtek rtl8811au and rtl8821cu chipset, the following module parameters may be needed for best performance when the adapter is set to support 2.4 GHz band:
rtw_vht_enable=1
The following instruction apply to the Mediatek mt7612u and mt7921u in-kernel drivers:
The following module parameter may be needed for stable performance:
disable_usb_sg=1
Note: Here is a quick way to set the disable_usb_sg parameter:
sudo -i
echo "options mt76_usb disable_usb_sg=1" > /etc/modprobe.d/mt76_usb.conf
exit
Note: More information is available at the following site:
https://github.com/morrownr/7612u
Note: Upgrading the operating system is not mandatory for this installation but it is a good idea.
sudo apt update && sudo apt upgrade && sudo apt autoremove
Note: All items in this step are optional and some items are specific to the Raspberry Pi 4B. If installing to other Raspberry Pi hardware, you will need to use the appropriate settings for that hardware.
sudo nano /boot/firmware/config.txt
Note: The config.txt file may be located as shown below in older versions of the RasPiOS.
sudo nano /boot/config.txt
Change: (optional, the below change adds a comment character in order to disable audio)
# Enable audio (loads snd_bcm2835)
#dtparam=audio=on
Add: (after [all])
# Disable Power LED
dtparam=pwr_led_trigger=default-on
dtparam=pwr_led_activelow=off
# Disable Activity LED
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
# Disable Ethernet port LEDs
dtparam=eth_led0=4
dtparam=eth_led1=4
# Disable onboard Bluetooth
dtoverlay=disable-bt
# Disable onboard WiFi
dtoverlay=disable-wifi
Overclock the CPU a modest amount.
Note: This step is optional and is specific to the Raspberry Pi 4B.
sudo nano /boot/firmware/config.txt
Note: The config.txt file may be located as shown below in older versions of the RasPiOS.
sudo nano /boot/config.txt
Add:
# Overclock CPU
# (may not be required with later versions of the RasPi4B)
over_voltage=2
arm_freq=1800
The Raspberry Pi OS currently does not default to using predictable network interface names. WiFi interface names will appear as wlan0, wlan1, etc.
Note: While this step is optional, problems can arise without it on dual band setups. Some Linux distros have this capability enabled by default but not the Raspberry Pi OS. My recommendation is that you can leave the default if using a single band setup but if you use a dual band setup, you will find advanatges to activating Predictable Network Interface Names.
To enable predictable network interface names on the Raspberry Pi OS:
sudo raspi-config
Select: Advanced options > A4 Network Interface Names > Yes
Reboot system.
sudo reboot
If your Linux distro uses Network Manager (NM), as does current versions of the RasPiOS, then NM needs to be configured to NOT manage the interface that you plan to use as an AP. If this is not accomplished, you will have problems as NM will fight hostapd for control of the wireless interface.
How to keep Network Manager from causing problems.
Tell Network Manager to ignore a specific wireless interface.
sudo nano /etc/NetworkManager/NetworkManager.conf
add
[keyfile]
unmanaged-devices=interface-name:wlan0
Note: Ensure that you change wlan0 to the name of your
wireless interface.
Save the file.
Ctrl + O, Enter, Ctrl + X
To activate the new setting, restart NetworkManager:
sudo systemctl restart NetworkManager
Note: Netplan can also cause problems if you use Ubuntu server. If you are using Ubuntu server, there is a section at the end of this guide that shows you how to remove Netplan.
ip a
You may need to additionally run the following command to help to determine which adapter, in a dual band setup, has which interface name.
iw dev
Note: If the interface names are not eth0, wlan0 and wlan1, then the interface names used in your system will have to replace eth0, wlan0 and wlan1 for the remainder of this document.
sudo apt install hostapd
Enable systemd-networkd service. Website - SystemdNetworkd
Install and enable systemd-resolved.
sudo apt install systemd-resolved
sudo systemctl enable systemd-resolved
sudo systemctl start systemd-resolved
Once started, systemd-resolved will create its own resolv.conf somewhere under /run/systemd directory. However, it is a common practice to store DNS resolver information in /etc/resolv.conf, and many applications still rely on /etc/resolv.conf. Thus for compatibility reason, create a symlink to /etc/resolv.conf as follows.
sudo rm /etc/resolv.conf
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
Enable systemd-networkd.
sudo systemctl enable systemd-networkd
sudo nano /etc/systemd/network/10-create-bridge-br0.netdev
File contents
[NetDev]
Name=br0
Kind=bridge
Save the file.
Ctrl + O, Enter, Ctrl + X
sudo nano /etc/systemd/network/20-bind-ethernet-with-bridge-br0.network
File contents
[Match]
Name=eth0
[Network]
Bridge=br0
Save the file.
Ctrl + O, Enter, Ctrl + X
sudo nano /etc/systemd/network/30-config-bridge-br0.network
Note: The contents of the Network block below should reflect the needs of your network. Most wireless routers come configured with a static ip address. I prefer that setup as I run the RasPi headless. However, if you prefer to use DHCP to assign an ip address address to your access point, uncomment DHCP=yes" and comment the Address=192.168.1.24/24andGateway=192.168.1.1` lines.
Note: The creation of the br0 interface effectively replaces eth0 with br0. However the br0 interface will NOT adopt the MAC address of the Ethernet HW (it will instead have its own randomly created MAC address); if you are connecting the AP to a router that assigns it a static IP address based on its MAC address, that will need updating.
File contents
[Match]
Name=br0
[Network]
#DHCP=yes
Address=192.168.1.24/24
Gateway=192.168.1.1
Save the file.
Ctrl + O, Enter, Ctrl + X
sudo systemctl unmask hostapd
sudo systemctl enable hostapd
Note: The below steps include creating two hostapd configurations files but only one is needed if using a single band setup.
Note: Shown below are hostapd.conf examples for WiFi 4 and WiFi 5 setups. An example for WiFi 6 for mt7921 chipset based adapters is shown at hostapd-WiFi6.conf. An example for WiFi 7 for mt7925 chipset based adapters is shown at hostapd-WiFi7.conf.
Create hostapd configuration file for 5 GHz band.
sudo nano /etc/hostapd/hostapd-WiFi5.conf
File contents
# /etc/hostapd/hostapd-WiFi5.conf
# Documentation: https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf
# 2022-09-25
# SSID
ssid=myPI-WiFi5
# PASSPHRASE
wpa_passphrase=myPW1234
# Band: a = 5GHz & 6GHz (a/n/ac/ax), g = 2Ghz (b/g/n)
hw_mode=a
# Channel
channel=36
# Channel width (0 = 40 MHz. 1 = 80 Mhz)
vht_oper_chwidth=1
# VHT center channel (chan + 6)
vht_oper_centr_freq_seg0_idx=42
# Country code
country_code=US
# Advertises the country_code and the set of allowed channels and transmit power levels
ieee80211d=1
# Enables support for 5GHz DFS channels (requires ieee80211d=1)
ieee80211h=1
# Bridge interface
bridge=br0
# WiFi interface
interface=wlan0
# Set hostapd driver (nl80211 is used with all Linux mac80211 (in-kernel) and modern Realtek drivers)
driver=nl80211
#ctrl_interface=/var/run/hostapd
#ctrl_interface_group=0
# Various settings
#beacon_int=100
#dtim_period=2
#max_num_sta=32
macaddr_acl=0
#rts_threshold=2347
#fragm_threshold=2346
#send_probe_response=1
# Security
# auth_algs=3 is required for WPA3-SAE and WPA3-SAE Transition mode
auth_algs=1
ignore_broadcast_ssid=0
# wpa=2 is required for WPA2 and WPA3 (read the docs)
wpa=2
rsn_pairwise=CCMP
# only one wpa_key_mgmt= line should be active.
# wpa_key_mgmt=WPA-PSK is required for WPA2-AES
wpa_key_mgmt=WPA-PSK
# wpa_key_mgmt=SAE WPA-PSK is required for WPA3-SAE Transition mode
#wpa_key_mgmt=SAE WPA-PSK
# wpa_key_mgmt=SAE is required for WPA3-SAE
#wpa_key_mgmt=SAE
#wpa_group_rekey=1800
# ieee80211w=1 is required for WPA3-SAE Transition mode
# ieee80211w=2 is required for WPA3-SAE
#ieee80211w=1
# if parameter is not set, 19 is the default value.
#sae_groups=19 20 21 25 26
# sae_require_mfp=1 is required for WPA3-SAE Transition mode
#sae_require_mfp=1
# if parameter is not 9 set, 5 is the default value.
#sae_anti_clogging_threshold=10
# Note: Capabilities can vary even between adapters with the same chipset.
#
# Note: Only one ht_capab= line and one vht_capab= should be active. The
# content of these lines is determined by the capabilities of your adapter.
#
# IEEE 802.11n
ieee80211n=1
wmm_enabled=1
#
# generic setting
ht_capab=[HT40+][HT40-][SHORT-GI-20][SHORT-GI-40]
#
# mediatek chipsets
# mt7612u - mt7610u
#ht_capab=[HT40+][HT40-][GF][SHORT-GI-20][SHORT-GI-40]
# mt7921au
##ht_capab=[LDPC][HT40+][HT40-][GF][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935]
#
# realtek chipsets
# rtl8812au - rtl8811au - rtl8811cu
#ht_capab=[HT40+][HT40-][SHORT-GI-20][SHORT-GI-40][MAX-AMSDU-7935]
# rtl8812bu
#ht_capab=[LDPC][HT40+][HT40-][SHORT-GI-20][SHORT-GI-40][MAX-AMSDU-7935]
# rtl8814au
#ht_capab=[LDPC][HT40+][HT40-][SHORT-GI-20][SHORT-GI-40][MAX-AMSDU-7935][DSSS_CCK-40]
#
# IEEE 802.11ac
ieee80211ac=1
#
# generic setting
vht_capab=[SHORT-GI-80]
#
# mt7610u
#vht_capab=[SHORT-GI-80][MAX-A-MPDU-LEN-EXP3][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN]
# mt7612u
#vht_capab=[RXLDPC][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][MAX-A-MPDU-LEN-EXP3][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN]
# mt7921au (VHT Cap. 339071b2)
#vht_capab=[MAX-MPDU-11454][RXLDPC][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][SU-BEAMFORMEE][BF-ANTENNA-4][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN]
#
# rtl8812au - rtl8812bu
#vht_capab=[MAX-MPDU-11454][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][HTC-VHT][MAX-A-MPDU-LEN-EXP7]
# rtl8814au
#vht_capab=[MAX-MPDU-11454][RXLDPC][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][HTC-VHT][MAX-A-MPDU-LEN-EXP7]
# rtl8811au
#vht_capab=[MAX-MPDU-11454][SHORT-GI-80][RX-STBC-1][HTC-VHT][MAX-A-MPDU-LEN-EXP7]
# rtl8811cu
#vht_capab=[MAX-MPDU-11454][SHORT-GI-80][HTC-VHT][MAX-A-MPDU-LEN-EXP7]
#
# Note: [TX-STBC-2BY1] may cause problems with some Realtek drivers
# end of hostapd-WiFi5.conf
Create the WiFi4 hostapd configuration file.
sudo nano /etc/hostapd/hostapd-WiFi4.conf
File contents
# /etc/hostapd/hostapd-WiFi4.conf
# Documentation: https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf
# 2022-08-08
# SSID
ssid=myPI-WiFi4
# PASSPHRASE
wpa_passphrase=myPW1234
# Band: a = 5Ghz (a/n/ac), g = 2Ghz (b/g/n)
hw_mode=g
# Channel
channel=6
# Country code
country_code=US
# Bridge interface
bridge=br0
# WiFi interface
interface=wlan1
# nl80211 is used with all Linux mac80211 (in-kernel) and modern Realtek drivers
driver=nl80211
#ctrl_interface=/var/run/hostapd
#ctrl_interface_group=0
beacon_int=100
dtim_period=2
max_num_sta=32
rts_threshold=2347
fragm_threshold=2346
#send_probe_response=1
# security
# auth_algs=3 is required for WPA3-SAE and WPA3-SAE Transition mode
auth_algs=1
macaddr_acl=0
ignore_broadcast_ssid=0
wpa=2
wpa_pairwise=CCMP
# WPA2-AES
wpa_key_mgmt=WPA-PSK
# WPA3-SAE
#wpa_key_mgmt=SAE
#wpa_group_rekey=1800
rsn_pairwise=CCMP
# ieee80211w=2 is required for WPA3-SAE
#ieee80211w=2
# If parameter is not set, 19 is the default value.
#sae_groups=19 20 21 25 26
#sae_require_mfp=1
# If parameter is not 9 set, 5 is the default value.
#sae_anti_clogging_threshold=10
# IEEE 802.11n
ieee80211n=1
wmm_enabled=1
#
# Note: Only one ht_capab= line should be active. The content of these lines is
# determined by the capabilities of your adapter.
#
# generic 20 MHz setting
ht_capab=[SHORT-GI-20]
#
# generic 40 MHz setting
#ht_capab=[HT40+][HT40-][SHORT-GI-20][SHORT-GI-40]
#
# RasPi4B internal wifi
#ht_capab=[HT40+][HT40-][SHORT-GI-20][SHORT-GI-40][DSSS_CCK-40]
#
# rt5370 - rt3070
#ht_capab=[HT40+][HT40-][GF][SHORT-GI-20][SHORT-GI-40][RX-STBC1]
#
# ar9271
#ht_capab=[HT40+][HT40-][SHORT-GI-20][SHORT-GI-40][RX-STBC1][DSSS_CCK-40]
#
# mt7612u - mt7610u
#ht_capab=[HT40+][HT40-][GF][SHORT-GI-20][SHORT-GI-40]
#
# rtl8812au - rtl8811au - rtl8812bu - rtl8811cu
#ht_capab=[HT40+][HT40-][SHORT-GI-20][SHORT-GI-40][MAX-AMSDU-7935]
# rtl8814au
#ht_capab=[LDPC][HT40+][HT40-][SHORT-GI-20][SHORT-GI-40][MAX-AMSDU-7935][DSSS_CCK-40]
# End of hostapd-WiFi4.conf
sudo cp /usr/lib/systemd/system/hostapd.service /etc/systemd/system/hostapd.service
sudo nano /etc/systemd/system/hostapd.service
Only change the lines shown.
If ConditionFileNotEmpty=/etc/hostapd/hostapd.conf line is present, comment it as shown below
#ConditionFileNotEmpty=/etc/hostapd/hostapd.conf
Add the Environment=DAEMON_OPTS= line as shown below (remember to change <your_home>)
Environment=DAEMON_OPTS="-d -K -f /home/<your_home>/hostapd.log"
Note: The above line establishes the location of the hostapd log file. It needs to be located on writable mediq.
Change RestartSec= line as shown below
RestartSec=3
Comment the EnvironmentFile= line as shown below
#EnvironmentFile=-/etc/default/hostapd
Add the below line before the the ExecStart= line
ExecStartPre=/bin/sleep 6
Change the ExecStart= line as shown below
ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid $DAEMON_OPTS $DAEMON_CONF
Select one of the following options.
Dual band option:
Change the Environment=DAEMON_CONF= line as shown below
Environment=DAEMON_CONF="/etc/hostapd/hostapd-WiFi5.conf /etc/hostapd/hostapd-WiFi4.conf"
Single band option for WiFi5:
Change the Environment=DAEMON_CONF= line as shown below
Environment=DAEMON_CONF="/etc/hostapd/hostapd-WiFi5.conf"
Single band option for WiFi4:
Change the Environment=DAEMON_CONF= line as shown below
Environment=DAEMON_CONF="/etc/hostapd/hostapd-WiFi4.conf"
Save the file.
sudo rfkill unblock wlan
Reboot system.
sudo reboot
The following sections contain good to know information.
Restart systemd-networkd service.
sudo systemctl restart systemd-networkd
Check status of the hostapd and systemd-networkd services.
systemctl status hostapd
systemctl status systemd-networkd
Disable hostapd.service
sudo systemctl disable hostapd
Enable hostapd.service
sudo systemctl enable hostapd
Install and autostart iperf3.
sudo apt install iperf3
sudo nano /etc/systemd/system/iperf3.service
File contents
[Unit]
Description=iPerf3 Service
After=syslog.target network.target auditd.service
[Service]
Type=simple
ExecStart=/usr/bin/iperf3 -s
[Install]
WantedBy=multi-user.target
sudo systemctl enable iperf3
sudo reboot
Check iperf3 status.
sudo systemctl status iperf3
How to keep Network Manager from causing problems.
Option 1:
Tell Network Manager to ignore specific devices.
sudo nano /etc/NetworkManager/NetworkManager.conf
add
[keyfile]
unmanaged-devices=interface-name:wlan0
Note: Remember to replace wlan0 with your interface name.
Option 2:
Uninstall NetworkManager.
Note: For systems not running the Gnome desktop, purging Network Manager is the easiest solution.
sudo apt purge network-manager
Note: For systems running the Gnome desktop, use the following.
sudo systemctl stop NetworkManager.service
sudo systemctl disable NetworkManager.service
sudo systemctl stop NetworkManager-wait-online.service
sudo systemctl disable NetworkManager-wait-online.service
sudo systemctl stop NetworkManager-dispatcher.service
sudo systemctl disable NetworkManager-dispatcher.service
sudo systemctl stop network-manager.service
sudo systemctl disable network-manager.service
sudo reboot
Option 3:
Disable Network Manager service.
sudo systemctl disable NetworkManager
Disable MAC address randomization.
Note: Disabling MAC address randomization may be needed to get a stable link.
sudo nano /etc/NetworkManager/NetworkManager.conf
add
[device]
wifi.scan-rand-mac-address=no
save the file with ctrl + o, enter and then exit nano with ctrl + x.
sudo reboot
Disable Netplan.
Note: Netplan is the default network manager on Ubuntu server.
Disable and mask networkd-dispatcher.
Note: we are activating /etc/network/interfaces
sudo apt-get install ifupdown
sudo systemctl stop networkd-dispatcher
sudo systemctl disable networkd-dispatcher
sudo systemctl mask networkd-dispatcher
Purge netplan.
sudo apt-get purge nplan netplan.io
sudo reboot
How do I disable Wayland so that I can use VNC?
Note: Raspberry Pi OS 2023-10-10 uses Wayland by default but the included VNC server does not support Wayland so it is necessary to return to X11 if you want VNC to work.
Open Terminal on the Pi, or connect to it using SSH
Run the command: sudo raspi-config
Select Advanced Options, then select Wayland
Select X11 and confirm
Reboot the Pi when prompted
How can I correct a problem with regdb?
Note: You are esponsible for making sure that your changes adhere to the laws of your country. It can be necessary at times to make your own changes as changes allowed by law can take time to work their way through the system.
Direct edit of regdb works well:
Example:
$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/wens/wireless-regdb.git
$ cd wireless-regdb
$ python3 db2fw.py regulatory.db db.txt
$ sudo mv /lib/firmware/regulatory.db /lib/firmware/regulatory.db.bak
$ sudo cp regulatory.db /lib/firmware
$ scp -O regulatory.db root@192.168.x.x:/lib/firmware/
$ sudo reboot