One way to get 802.11ac network speeds AGX Orin with rtl8822ce

Following is one way to set up everything for 802.11ac network speeds on AGX Orin with the Realtek rtl8822ce 802.11ac Network Adapter.

First let’s upgrade the kernel modules of the rtl8822ec Wifi Network controller,


sudo apt update && sudo apt upgrade
sudo apt install linux-headers-generic build-essential git dkms iwd dnsmasq

git clone https://github.com/lwfinger/rtw88
cd rtw88

sudo dkms install $PWD
sudo make install_fw

The next line is only needed IF Secure Boot is enabled on your Orin. Modify path to mok.pub for your environment.
#sudo mokutil --import /var/lib/dkms/mok.pub

sudo tee /etc/modprobe.d/blacklist-rtw88-old.conf <<'EOF'
blacklist rtw88_8822ce
blacklist rtw88_pci
blacklist rtw88_core
EOF


Second lets install iwd

" iNet Wireless Daemon (iwd) project aims to provide a comprehensive Wi-Fi connectivity solution for Linux based devices. The core goal of the project is to optimize resource utilization: storage, runtime memory and link-time costs. This is accomplished by not depending on any external libraries and utilizes features provided by the Linux Kernel to the maximum extent possible. The result is a self-contained environment that only depends on the Linux Kernel and the runtime C library. "

sudo apt install libtool libreadline-dev libdbus-1-dev libdbus-glib-1-dev python-docutils

wget https://mirrors.edge.kernel.org/pub/linux/network/wireless/iwd-3.9.tar.xz
tar xf iwd-3.9.tar.xz
cd iwd-3.9

export PKG_CONFIG_PATH="/usr/share/pkgconfig:/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/lib/pkgconfig"
       
./configure --prefix=/usr

Then compile and install
        make -j8
        sudo make install

sudo mkdir -p /var/lib/iwd/ap/
sudo nano /var/lib/iwd/ap/whateveryouwant_PickanSSIDname.ap

[Security]
Passphrase=whateveryouwant_password123

[IPv4]
Address=192.168.250.1
Gateway=192.168.250.1
Netmask=255.255.255.0
DNSList=1.1.1.1 8.8.8.8

Next command sets up the iw daemon

sudo /usr/libexec/iwd

==================================

Finally let’s upgrade NetworkManager from version 1.36.6 to 1.52.0

Here we let iwd be the backend for NetworkManager since it is newer and reportedly better than wpa_supplicant.

Create

/etc/NetworkManager/conf.d/iwd.conf

[device]
wifi.backend=iwd

sudo systemctl stop NetworkManager
sudo systemctl disable --now wpa_supplicant
sudo systemctl restart NetworkManager


sudo apt update
sudo apt install -y \
  git build-essential pkg-config gettext \
  libglib2.0-dev libdbus-1-dev libndp-dev libjansson-dev \
  libcurl4-gnutls-dev libreadline-dev libnl-3-dev libnl-route-3-dev \
  libgirepository1.0-dev libselinux1-dev xsltproc python3-docutils 

pip install -U meson ninja cmake

export PKG_CONFIG_PATH="/usr/share/pkgconfig:/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/lib/pkgconfig"

NOTE: If meson setup errors then apt search [for whatever it wants. Then apt install it.]
It took me about 5 invocations of the following meson setup command to get everything.

mkdir build && cd build

meson setup .. \
  --prefix=/usr                              \
  --buildtype=release                        \
  -Dnmtui=true                               \
  -Dovs=false -Dppp=false -Dmodem_manager=false \
  -Dlibaudit=no -Dselinux=false              \
  -Dsystemd_journal=true                     \
  -Dsystemdsystemunitdir=/usr/lib/systemd/system \
  -Dconfig_wifi_backend_default=iwd          \
  -Dnm_cloud_setup=false \
  -Diwd=true


cd ..
ninja -C build -j8
sudo ninja -C build install
sudo systemctl daemon-reload
sudo systemctl restart NetworkManager


Now a few more things.

sudo tee /etc/dnsmasq.conf <<‘EOF’
interface=wlan0
dhcp-range=192.168.255.2,192.168.255.20,255.255.255.0,24h
EOF

Setup ipforwarding if wanted.

sudo sysctl -w net.ipv4.ip_forward=1

Setup NAT to route traffic from the Wi-Fi interface to your Ethernet connection.

sudo iptables -t nat -A POSTROUTING -o eno1 -j MASQUERADE

Add a group and membership that is supposed to allow non sudo user to run iwctl.

sudo groupadd -f netdev
sudo usermod -aG netdev $USER
newgrp netdev
groups

Two Documents for enabling the aforementioned.

AP Mode

NetworkManager/iwd

Note: iwctl help will provide help.

Setup a station:

iwctl device list
iwctl station wlan0 scan
iwctl station wlan0 get-networks
iwctl --passphrase "mysecret" station wlan0 connect "$SSID"
iwctl station wlan0 show

Then run iwctl to create an Access Point, but read the 2 docs first.

sudo iwctl
device wlan0 set-property Mode ap
ap wlan0 start-profile PickanSSIDname
quit

1 Like

Hi,
Thanks for the sharing. One query, it looks like we don’t enable 802.11ac to the default WIFI module on Jetpack 6.2.1. Is this correct?

Yes. As far as I could tell 802.11ac is not enabled.

I and at least one other person could only get about 50Mbps wifi speeds on the r36.4.4 / 5.15.148-tegra.

1 Like