Configuring WiFi on ELF2 Development Board Running Ubuntu System with Intel AX200
Before proceeding with WiFi configuration, you need to flash the Ubuntu system onto the development board. There are two approaches available:
Method 1: Copy kernel modules from an existing buildroot system's /usr/lib/modules directory to the corresponding location in Ubuntu.
Method 2: Compile a rootfs filesystem and flash it onto the development board.
The recommended approach is Method 1, which is simpler if your primary goal is establishing network connectivity.
Required Setup Files
Download the required package containing 5.10.209.tar.bz2 and cmddemo_wifi.sh.
Connect to the development board via SSH (root password: root, elf user: elf). Transfer the downloaded files to the board using SCP or copy via USB drive.
If you encounter issues with bz2 format on the development boardd, extract the archive on your host machine and re-package it as a zip file:
root@elf2-desktop:/home/elf/Desktop# unzip 5.10.209.zip
root@elf2-desktop:/home/elf/Desktop# ls 5.10.209
Kernel Module Installation
Copy the contents of the 5.10.209 directory (including all subdirectories) to /usr/lib/modules:
cp -r 5.10.209/* /usr/lib/modules/
After copying, reboot the system:
reboot
Once the system restarts, verify that the WiFi drivers are loaded:
root@elf2-desktop:~# lsmod
Module Size Used by
iwlmvm 331776 0
iwlwifi 286720 1 iwlmvm
btusb 57344 0
btrtl 24576 1 btusb
btbcm 24576 1 btusb
btintel 28672 1 btusb
WiFi Connection Script
The WiFi configuration script uses NetworkManager's CLI tool internally:
#!/bin/bash
NETWORK_SSID=""
NETWORK_PASS=""
while getopts "s:p:" opt; do
case $opt in
s)
NETWORK_SSID="$OPTARG"
;;
p)
NETWORK_PASS="$OPTARG"
;;
\?)
echo "Usage: $0 -s SSID -p PASSWORD"
exit 1
;;
esac
done
if [ -z "$NETWORK_SSID" ] || [ -z "$NETWORK_PASS" ]; then
echo "Both SSID and password are required."
exit 1
fi
nmcli dev wifi connect "$NETWORK_SSID" password "$NETWORK_PASS"
Connecting to WiFi
You can connect using the graphical interface or command line:
Option A - Interactive Mode:
nmtui
Select "Activate a connection", choose your network, enter the password, and confirm.
Option B - Command Line:
./cmddemo_wifi.sh -s YOUR_SSID -p YOUR_PASSWORD
Verifying Network Connectivity
After establishing the connection, check the network interface status:
root@elf2-desktop:/home/elf/Desktop/sh_my# ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.137.30 netmask 255.255.255.0 broadcast 192.168.137.255
ether 46:4e:05:43:98:4b 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
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 7759 bytes 553673 (553.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7759 bytes 553673 (553.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.43.101 netmask 255.255.255.0 broadcast 192.168.43.255
inet6 240e:45f:c50:2473:7d4e:3af0:b151:81f1 prefixlen 64 scopeid 0x0<global>
inet6 fe80::ae9d:f317:1a5d:e246 prefixlen 64 scopeid 0x20<link>
inet6 240e:45f:c50:2473:f93f:831a:aae9:f34c prefixlen 64 scopeid 0x0<global>
ether ec:8e:77:08:04:3f txqueuelen 1000 (Ethernet)
RX packets 34 bytes 6128 (6.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 84 bytes 13187 (13.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@elf2-desktop:/home/elf/Desktop/sh_my#
Test internet connectivity:
root@elf2-desktop:/home/elf/Desktop/sh_my# ping www.baidu.com
PING www.baidu.com(240e:ff:e020:99b:0:ff:b099:cff1 (240e:ff:e020:99b:0:ff:b099:cff1)) 56 data bytes
64 bytes from 240e:ff:e020:99b:0:ff:b099:cff1 (240e:ff:e020:99b:0:ff:b099:cff1): icmp_seq=1 ttl=53 time=52.0 ms
64 bytes from 240e:ff:e020:99b:0:ff:b099:cff1 (240e:ff:e020:99b:0:ff:b099:cff1): icmp_seq=2 ttl=53 time=60.1 ms
64 bytes from 240e:ff:e020:99b:0:ff:b099:cff1 (240e:ff:e020:99b:0:ff:b099:cff1): icmp_seq=3 ttl=53 time=55.0 ms
64 bytes from 240e:ff:e020:99b:0:ff:b099:cff1 (240e:ff:e020:99b:0:ff:b099:cff1): icmp_seq=4 ttl=53 time=53.9 ms
64 bytes from 240e:ff:e020:99b:0:ff:b099:cff1 (240e:ff:e020:99b:0:ff:b099:cff1): icmp_seq=5 ttl=53 time=52.4 ms
^C
--- www.baidu.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4007ms
rtt min/avg/max/mdev = 51.953/54.702/60.134/2.927 ms
root@elf2-desktop:/home/elf/Desktop/sh_my#
The WiFi connecsion is now active with 0% packet loss and approximately 55ms average latency to external hosts.