BeagleY-AI, wifi hotspot [works with updates]

I cannot get the beagleY-AI up and running as a hotspot. I tried the procedure outlined in https://forums.raspberrypi.com/viewtopic.php?t=357998, which boils down to:

apt install dnsmasq
systemctl disable dnsmasq
systemctl stop dnsmasq

add
dns=dnsmasq
to [main] in /etc/NetworkManager/NetworkManager.conf,
resulting in:

[main]
plugins=ifupdown,keyfile
dns=dnsmasq

[ifupdown]
managed=false

then start NetworkManager with:
sudo systemctl enable NetworkManager
sudo systemctl start NetworkManager

and create a script with the following:

====

#!/bin/bash
nmcli con delete TEST-WAP
nmcli con add type wifi ifname wlan0 mode ap con-name TEST-WAP ssid TEST-WAP autoconnect false
nmcli con modify TEST-WAP wifi.band bg
nmcli con modify TEST-WAP wifi.channel 3
nmcli con modify TEST-WAP wifi.cloned-mac-address 00:12:34:56:78:9a
nmcli con modify TEST-WAP wifi-sec.key-mgmt wpa-psk
nmcli con modify TEST-WAP wifi-sec.proto rsn
nmcli con modify TEST-WAP wifi-sec.group ccmp
nmcli con modify TEST-WAP wifi-sec.pairwise ccmp
nmcli con modify TEST-WAP wifi-sec.psk "testbeagley"
nmcli con modify TEST-WAP ipv4.method shared ipv4.address 192.168.8.1/24
nmcli con modify TEST-WAP ipv6.method disabled
nmcli con modify TEST-WAP 802-11-wireless-security.proto rsn
nmcli con modify TEST-WAP 802-11-wireless-security.group ccmp
nmcli con modify TEST-WAP 802-11-wireless-security.pairwise ccmp
nmcli con up TEST-WAP

====

When I did all this, the result was that I could see the Wifi AccessPoint TEST-WAP,
but the password did not register. I noticed that there were some kernel dumps, related to wireless connections:

[  +0.259844] IBI_WA: Read core status
[  +0.000218] IBI_WA: Core status processed
[  +0.219349] IBI_WA: Read core status
[  +0.000266] IBI_WA: Core status processed
[  +1.171745] IBI_WA: Read core status
[  +0.000210] IBI_WA: Core status processed
[  +0.305659] wlcore: Wireless driver version 1.7.0.114
[  +0.000484] wlcore: Wireless firmware version 1.7.0.120
[  +0.000020] wlcore: Wireless PHY version 1.2.36.5.22.66
[  +0.003272] wlcore: loaded
[  +0.130628] ------------[ cut here ]------------
[  +0.000024] memcpy: detected field-spanning write (size 3) of single field "passive" at drivers/net/wireless/ti/cc33xx/scan.c:48 (size 2)
[  +0.000118] WARNING: CPU: 0 PID: 669 at drivers/net/wireless/ti/cc33xx/scan.c:48 cc33xx_adjust_channels+0x1a4/0x1e0 [cc33xx]
[  +0.000061] Modules linked in: snd_seq_dummy snd_hrtimer snd_seq snd_seq_device xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_con>
[  +0.000232] CPU: 0 PID: 669 Comm: iwd Tainted: G           O       6.1.80-ti-arm64-r57 #1bookworm
[  +0.000011] Hardware name: BeagleBoard.org BeagleY-AI (DT)
[  +0.000005] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  +0.000009] pc : cc33xx_adjust_channels+0x1a4/0x1e0 [cc33xx]
[  +0.000033] lr : cc33xx_adjust_channels+0x1a4/0x1e0 [cc33xx]
[  +0.000028] sp : ffff80000ac83690
[  +0.000004] x29: ffff80000ac83690 x28: 0000000000000000 x27: ffff800001858078
[  +0.000014] x26: ffff0008069609d8 x25: ffff00080483f80e x24: ffff00080483f812
[  +0.000013] x23: ffff00080483f810 x22: ffff800001858000 x21: ffff00080483f89d
[  +0.000013] x20: ffff0008035d6800 x19: ffff00080483f813 x18: ffffffffffffffff
[  +0.000013] x17: 2220646c65696620 x16: 656c676e69732066 x15: 6f20293320657a69
[  +0.000013] x14: 7328206574697277 x13: 293220657a697328 x12: 2038343a632e6e61
[  +0.000013] x11: 00000000ffffefff x10: ffff800009d73ec8 x9 : ffff80000811bdf8
[  +0.000013] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : 0000000000057fa8
[  +0.000012] x5 : ffff00084771ea90 x4 : 0000000000000000 x3 : 0000000000000027
[  +0.000013] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000804ffd000
[  +0.000013] Call trace:
[  +0.000005]  cc33xx_adjust_channels+0x1a4/0x1e0 [cc33xx]
[  +0.000030]  cc33xx_scan_send+0xfc/0x2cc [cc33xx]
[  +0.000027]  wlcore_scan+0x98/0x124 [cc33xx]
[  +0.000027]  cc33xx_op_hw_scan+0xe0/0x114 [cc33xx]
[  +0.000027]  drv_hw_scan+0x4c/0x1bc [mac80211]
[  +0.000114]  __ieee80211_start_scan+0x22c/0x704 [mac80211]
[  +0.000069]  ieee80211_request_scan+0x40/0x6c [mac80211]
[  +0.000065]  ieee80211_scan+0x70/0x100 [mac80211]
[  +0.000066]  rdev_scan+0x38/0x150 [cfg80211]
[  +0.000108]  cfg80211_scan+0x138/0x170 [cfg80211]
[  +0.000061]  nl80211_trigger_scan+0x384/0x684 [cfg80211]
[  +0.000058]  genl_family_rcv_msg_doit+0xe4/0x154
[  +0.000018]  genl_rcv_msg+0x130/0x264
[  +0.000008]  netlink_rcv_skb+0x64/0x130
[  +0.000010]  genl_rcv+0x40/0x5c
[  +0.000007]  netlink_unicast+0x300/0x36c
[  +0.000008]  netlink_sendmsg+0x1d8/0x450
[  +0.000008]  __sock_sendmsg+0x5c/0x6c
[  +0.000011]  __sys_sendto+0x110/0x16c
[  +0.000011]  __arm64_sys_sendto+0x30/0x40
[  +0.000010]  invoke_syscall+0x78/0x100
[  +0.000012]  el0_svc_common.constprop.0+0xd4/0xf4
[  +0.000009]  do_el0_svc+0x24/0x30
[  +0.000009]  el0_svc+0x30/0x120
[  +0.000010]  el0t_64_sync_handler+0xf4/0x120
[  +0.000010]  el0t_64_sync+0x18c/0x190
[  +0.000010] ---[ end trace 0000000000000000 ]---
[  +0.000055] ------------[ cut here ]------------

But that seemed to be related to trying to connect to a wifi network as configured in the bb-imager.
(I rebooted the machine without the hotspot installed, and had the same error).
So I made sure that wlan0 was not used (ifconfig down wlan0) and tried setting up the hotspot again. Same result, although
dmesg -H
displayed this:

[  +0.140138] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  +1.704455] Deferred event dump:00000000: 00000100 00100016 00070001 00780000
[  +0.000024] Deferred event dump:00000010: 24051642 00000102 00000000 00000000
[  +0.000008] Deferred event dump:00000020: 00000000 00000000 00000000 00000000
[  +0.000006] Deferred event dump:00000030: 00000000 00000000 00000000 00000000

Kind Regards
Johan Henselmans

I knew this was coming!

The cc33xx is so new, we have out of tree drivers on their 3rd revision, so i didn’t want to enable this out of the box…

Okay, so here is what my plan was for easy out of box hotspot: (mirrors what we did on the BeaglePlay, and older am335x devcies)…

In the fat partition, hostapd_file is the magic variable…

voodoo@beagley-ai:~$ cat /boot/firmware/sysconf.txt | grep hostapd
# hostapd_file - Set a configuration for hostapd https://wiki.gentoo.org/wiki/Hostapd
#hostapd_file=SoftAp0.conf

I have an BeaglePlay example under /boot/firmware/services/SoftAp0.conf

voodoo@beagley-ai:~$ cat /boot/firmware/services/SoftAp0.conf 
interface=SoftAp0

ssid=BeagleBone-WiFi

# 1=wpa, 2=wep, 3=both
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
wpa_passphrase=BeagleBone

# a simply means 5GHz
# g simply means 2.4GHz band
hw_mode=g

# the channel to use
channel=1

# limit the frequencies used to those allowed in the country
#ieee80211d=1
# the country code
#country_code=US

# 802.11n support
ieee80211n=1
# QoS support, also required for full speed on 802.11n/ac/ax
wmm_enabled=1

macaddr_acl=0
ignore_broadcast_ssid=0

logger_syslog=-1
logger_syslog_level=2

So let’s test it out…

First let’s patch: /etc/udev/rules.d/81-add-SoftAp0-interface.rules this will bring up SoftAp0 (ifconfig -a) node…

SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan[0-9]", DRIVERS=="iwlwifi" \
	RUN+="/sbin/iw dev %k interface add SoftAp0 type managed"
SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan[0-9]", DRIVERS=="wl18xx_driver" \
	RUN+="/sbin/iw dev %k interface add SoftAp0 type managed"
SUBSYSTEM=="net", ACTION=="add", KERNEL=="mlan[0-9]", DRIVERS=="mwifiex_pcie" \
	RUN+="/sbin/iw dev %k interface add SoftAp0 type __ap"
voodoo@beagley-ai:~$ udevadm info /sys/class/net/wlan0 
P: /devices/platform/bus@f0000/fa20000.mmc/mmc_host/mmc2/mmc2:0001/mmc2:0001:2/>
M: wlan0
R: 0
U: net
T: wlan
I: 5
E: DEVPATH=/devices/platform/bus@f0000/fa20000.mmc/mmc_host/mmc2/mmc2:0001/mmc2>
E: SUBSYSTEM=net
E: DEVTYPE=wlan
E: INTERFACE=wlan0
E: IFINDEX=5
E: USEC_INITIALIZED=18298133
E: ID_NET_NAMING_SCHEME=v253
E: ID_NET_NAME_MAC=wlx3468b58e284f
E: ID_OUI_FROM_DATABASE=Texas Instruments
E: ID_MM_CANDIDATE=1
E: ID_PATH=platform-fa20000.mmc-platform-cc33xx.7.auto
E: ID_PATH_TAG=platform-fa20000_mmc-platform-cc33xx_7_auto
E: ID_NET_DRIVER=cc33xx_driver
E: ID_NET_LINK_FILE=/usr/lib/systemd/network/80-iwd.link
E: ID_NET_NAME=wlan0
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/wlan0
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:
SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan[0-9]", DRIVERS=="iwlwifi" \
	RUN+="/sbin/iw dev %k interface add SoftAp0 type managed"
SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan[0-9]", DRIVERS=="wl18xx_driver" \
	RUN+="/sbin/iw dev %k interface add SoftAp0 type managed"
SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan[0-9]", DRIVERS=="cc33xx_driver" \
	RUN+="/sbin/iw dev %k interface add SoftAp0 type managed"
SUBSYSTEM=="net", ACTION=="add", KERNEL=="mlan[0-9]", DRIVERS=="mwifiex_pcie" \
	RUN+="/sbin/iw dev %k interface add SoftAp0 type __ap"

Uhoh…

voodoo@beagley-ai:~$ journalctl | grep SoftAp0
Jun 22 12:59:17 beagley-ai sudo[1754]:   voodoo : TTY=ttyS2 ; PWD=/home/voodoo ; USER=root ; COMMAND=/usr/bin/nano /etc/udev/rules.d/81-add-SoftAp0-interface.rules
Jun 22 13:00:07 beagley-ai iwd[737]: udev interface=SoftAp0 ifindex=6
Jun 22 13:00:07 beagley-ai systemd-networkd[540]: SoftAp0: Configuring with /etc/systemd/network/SoftAp0.network.
Jun 22 13:00:07 beagley-ai systemd-networkd[540]: SoftAp0: Link UP
Jun 22 13:00:07 beagley-ai (udev-worker)[460]: wlan0: Process '/sbin/iw dev wlan0 interface add SoftAp0 type managed' failed with exit code 233.
	Supported interface modes:
		 * managed
		 * AP
		 * AP/VLAN
		 * monitor
		 * mesh point
		 * P2P-client
		 * P2P-GO
		 * P2P-device

let’s try __ap mode

Jun 22 13:03:04 beagley-ai systemd-networkd[540]: SoftAp0: Configuring with /etc/systemd/network/SoftAp0.network.
Jun 22 13:03:04 beagley-ai systemd-networkd[540]: SoftAp0: Link UP
Jun 22 13:03:04 beagley-ai (udev-worker)[495]: wlan0: Process '/sbin/iw dev wlan0 interface add SoftAp0 type __ap' failed with exit code 233.

no dice… well ti has new firmware 1.0.0.4 vs 1.0.02 let’s see what that fixes…

Building with 1.0.0.4 firwmare: bb-wl18xx-firmware (1.20240622.0) (5af2a8c2) · Commits · BeagleBoard.org / repos-arm64 · GitLab

Okay, let’s update:

sudo apt update
sudo apt-get upgrade -yq
voodoo@beagley-ai:~$ sudo apt-get upgrade -yq
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages will be upgraded:
  bb-wl18xx-firmware firefox-nightly
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 64.4 MB of archives.
After this operation, 20.5 kB disk space will be freed.
Get:2 https://packages.mozilla.org/apt mozilla/main arm64 firefox-nightly arm64 129.0a1~20240621215457 [63.5 MB]
Get:1 https://debian.beagle.cc/arm64 bookworm/main arm64 bb-wl18xx-firmware all 1.20240622.0-0~bookworm+20240622 [866 kB]
Fetched 64.4 MB in 4s (15.2 MB/s)
(Reading database ... 128764 files and directories currently installed.)
Preparing to unpack .../firefox-nightly_129.0a1~20240621215457_arm64.deb ...
Unpacking firefox-nightly (129.0a1~20240621215457) over (129.0a1~20240621100955) ...
Preparing to unpack .../bb-wl18xx-firmware_1.20240622.0-0~bookworm+20240622_all.deb ...
Unpacking bb-wl18xx-firmware (1.20240622.0-0~bookworm+20240622) over (1.20240515.0-0~bookworm+20240515) ...
Setting up bb-wl18xx-firmware (1.20240622.0-0~bookworm+20240622) ...
bb-wl18xx-firmware: [wl18xx-fw-4-8.9.0.0.83.bin] was set in /etc/default/bb-wl18xx-fw
'/usr/lib/firmware/ti-connectivity/git/wl18xx-fw-4-8.9.0.0.83.bin' -> '/usr/lib/firmware/ti-connectivity/wl18xx-fw-4.bin'
update-initramfs: deferring update (trigger activated)
Setting up firefox-nightly (129.0a1~20240621215457) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for mailcap (3.70+nmu1) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-6.1.80-ti-arm64-r57
Scanning processes...                                                           
Scanning processor microcode...                                                 
Scanning linux images...                                                        

Running kernel seems to be up-to-date.

The processor microcode seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.

Now let’s update the /boot/firmware/initrd.img (don’t want it loading the old 1.0.0.3 firmware

sudo cp -v /boot/initrd.img-`uname -r` /boot/firmware/initrd.img
voodoo@beagley-ai:~$ sudo cp -v /boot/initrd.img-`uname -r` /boot/firmware/initrd.img
'/boot/initrd.img-6.1.80-ti-arm64-r57' -> '/boot/firmware/initrd.img'

ti sneaky, firmware is under wlcore:

voodoo@beagley-ai:~$ dmesg | grep wlcore: | grep version
[   42.953371] wlcore: Wireless driver version 1.7.0.114
[   42.953843] wlcore: Wireless firmware version 1.7.0.130
[   42.953863] wlcore: Wireless PHY version 1.2.36.5.22.66

going to add that to beagle-version too… bb-beagle-version (1.20240622.0) (3131fc8b) · Commits · BeagleBoard.org / repos-arm64 · GitLab

Nope no dice with new firmware

voodoo@beagley-ai:~$ journalctl | grep SoftAp0
Jun 22 13:30:55 beagley-ai iwd[689]: udev interface=SoftAp0 ifindex=6
Jun 22 13:30:55 beagley-ai systemd-networkd[539]: SoftAp0: Configuring with /etc/systemd/network/SoftAp0.network.
Jun 22 13:30:55 beagley-ai systemd-networkd[539]: SoftAp0: Link UP
Jun 22 13:30:55 beagley-ai (udev-worker)[492]: wlan0: Process '/sbin/iw dev wlan0 interface add SoftAp0 type managed' failed with exit code 233.

Okay, now we’ve got progress…

voodoo@beagley-ai:~$ journalctl | grep SoftAp0
Jun 22 14:33:54 beagley-ai iwd[693]: udev interface=SoftAp0 ifindex=5
Jun 22 14:33:54 beagley-ai systemd-networkd[547]: SoftAp0: Configuring with /etc/systemd/network/SoftAp0.network.
Jun 22 14:33:54 beagley-ai systemd-networkd[547]: SoftAp0: Link UP

iwd was stealing my inteface… told it to ignore it… wiphy.c: add cc33xx_driver to driver_info to stop iwd from re-create the netdev (2f58a008) · Commits · BeagleBoard.org / Iwd · GitLab

Now let’s patch: /etc/udev/rules.d/82-SoftAp0-start-hostpad.rules

SUBSYSTEM=="net", KERNEL=="SoftAp0", DRIVERS=="iwlwifi", TAG+="systemd", ENV{SYSTEMD_WANTS}="hostapd@SoftAp0.service"
SUBSYSTEM=="net", KERNEL=="SoftAp0", DRIVERS=="mwifiex_pcie", TAG+="systemd", ENV{SYSTEMD_WANTS}="hostapd@SoftAp0.service"
SUBSYSTEM=="net", KERNEL=="SoftAp0", DRIVERS=="wl18xx_driver", TAG+="systemd", ENV{SYSTEMD_WANTS}="hostapd@SoftAp0.service"
SUBSYSTEM=="net", KERNEL=="SoftAp0", DRIVERS=="iwlwifi", TAG+="systemd", ENV{SYSTEMD_WANTS}="hostapd@SoftAp0.service"
SUBSYSTEM=="net", KERNEL=="SoftAp0", DRIVERS=="mwifiex_pcie", TAG+="systemd", ENV{SYSTEMD_WANTS}="hostapd@SoftAp0.service"
SUBSYSTEM=="net", KERNEL=="SoftAp0", DRIVERS=="wl18xx_driver", TAG+="systemd", ENV{SYSTEMD_WANTS}="hostapd@SoftAp0.service"
SUBSYSTEM=="net", KERNEL=="SoftAp0", DRIVERS=="cc33xx_driver", TAG+="systemd", ENV{SYSTEMD_WANTS}="hostapd@SoftAp0.service"
sudo update-initramfs -uk `uname -r`
sudo cp -v /boot/initrd.img-`uname -r` /boot/firmware/initrd.img

Okay, that’s now looking good…

voodoo@beagley-ai:~$ journalctl | grep SoftAp0
Jun 22 14:41:48 beagley-ai iwd[695]: udev interface=SoftAp0 ifindex=5
Jun 22 14:41:48 beagley-ai systemd-networkd[533]: SoftAp0: Configuring with /etc/systemd/network/SoftAp0.network.
Jun 22 14:41:48 beagley-ai systemd-networkd[533]: SoftAp0: Link UP
Jun 22 14:41:48 beagley-ai systemd[1]: Condition check resulted in sys-subsystem-net-devices-SoftAp0.device - /sys/subsystem/net/devices/SoftAp0 being skipped.
Jun 22 14:41:48 beagley-ai systemd[1]: hostapd@SoftAp0.service - Access point and authentication server for Wi-Fi and Ethernet (SoftAp0) was skipped because of an unmet condition check (ConditionFileNotEmpty=/etc/hostapd/SoftAp0.conf).

So let’s modify /boot/firmware/services/SoftAp0.conf

voodoo@beagley-ai:~$ cat /boot/firmware/services/SoftAp0.conf 
interface=SoftAp0

ssid=BeagleY-AI-WiFi

# 1=wpa, 2=wep, 3=both
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
wpa_passphrase=BeagleBone

# a simply means 5GHz
# g simply means 2.4GHz band
hw_mode=g

# the channel to use
channel=1

# limit the frequencies used to those allowed in the country
ieee80211d=1
# the country code
country_code=US

# 802.11n support
ieee80211n=1
# QoS support, also required for full speed on 802.11n/ac/ax
wmm_enabled=1

macaddr_acl=0
ignore_broadcast_ssid=0

logger_syslog=-1
logger_syslog_level=2

and set it for auto-configuration… (goal is just for end users to copy teh file…)

voodoo@beagley-ai:~$ cat /boot/firmware/sysconf.txt | grep hostapd
# hostapd_file - Set a configuration for hostapd https://wiki.gentoo.org/wiki/Hostapd
hostapd_file=SoftAp0.conf
sudo reboot

Checking bbbio-set-sysconf to see if it did it’s job:

voodoo@beagley-ai:~$ journalctl | grep bbbio-set-sysconf
Jun 22 14:41:42 beagley-ai systemd[1]: Starting bbbio-set-sysconf.service - BeagleBoard Set up system configuration...
Jun 22 14:41:43 beagley-ai bbbio-set-sysconf[745]: Reading the system configuration settings from /boot/firmware/sysconf.txt
Jun 22 14:41:43 beagley-ai bbbio-set-sysconf[753]: Reading the system configuration settings from /boot/firmware/sysconf.txt
Jun 22 14:41:43 beagley-ai systemd[1]: bbbio-set-sysconf.service: Deactivated successfully.
Jun 22 14:41:43 beagley-ai systemd[1]: Finished bbbio-set-sysconf.service - BeagleBoard Set up system configuration.
Jun 22 14:45:44 beagley-ai systemd[1]: Starting bbbio-set-sysconf.service - BeagleBoard Set up system configuration...
Jun 22 14:45:45 beagley-ai bbbio-set-sysconf[724]: Reading the system configuration settings from /boot/firmware/sysconf.txt
Jun 22 14:45:45 beagley-ai bbbio-set-sysconf[730]: Reading the system configuration settings from /boot/firmware/sysconf.txt
Jun 22 14:45:45 beagley-ai bbbio-set-sysconf[736]: Setting up hostapd with 'SoftAp0.conf'
Jun 22 14:45:45 beagley-ai bbbio-set-sysconf[749]: Setting up hostapd with 'SoftAp0.conf'
Jun 22 14:45:45 beagley-ai bbbio-set-sysconf[772]: **********************************************
Jun 22 14:45:45 beagley-ai bbbio-set-sysconf[784]: **********************************************
Jun 22 14:45:45 beagley-ai bbbio-set-sysconf[789]: Rebooting after setting up sysconf.txt options
Jun 22 14:45:45 beagley-ai bbbio-set-sysconf[797]: Rebooting after setting up sysconf.txt options
Jun 22 14:45:45 beagley-ai bbbio-set-sysconf[800]: **********************************************
Jun 22 14:45:45 beagley-ai bbbio-set-sysconf[804]: **********************************************
Jun 22 14:45:47 beagley-ai systemd[1]: bbbio-set-sysconf.service: Deactivated successfully.
Jun 22 14:45:47 beagley-ai systemd[1]: Stopped bbbio-set-sysconf.service - BeagleBoard Set up system configuration.
Jun 22 14:46:18 beagley-ai systemd[1]: Starting bbbio-set-sysconf.service - BeagleBoard Set up system configuration...
Jun 22 14:46:19 beagley-ai bbbio-set-sysconf[742]: Reading the system configuration settings from /boot/firmware/sysconf.txt
Jun 22 14:46:19 beagley-ai bbbio-set-sysconf[755]: Reading the system configuration settings from /boot/firmware/sysconf.txt
Jun 22 14:46:19 beagley-ai systemd[1]: bbbio-set-sysconf.service: Deactivated successfully.
Jun 22 14:46:19 beagley-ai systemd[1]: Finished bbbio-set-sysconf.service - BeagleBoard Set up system configuration.

Checking hostapd service

voodoo@beagley-ai:~$ journalctl | grep hostapd
Jun 22 14:45:15 beagley-ai systemd[1]: Removed slice system-hostapd.slice - Slice /system/hostapd.
Jun 22 14:45:45 beagley-ai bbbio-set-sysconf[736]: Setting up hostapd with 'SoftAp0.conf'
Jun 22 14:45:45 beagley-ai bbbio-set-sysconf[749]: Setting up hostapd with 'SoftAp0.conf'
Jun 22 14:46:24 beagley-ai systemd[1]: Created slice system-hostapd.slice - Slice /system/hostapd.
Jun 22 14:46:24 beagley-ai systemd[1]: Starting hostapd@SoftAp0.service - Access point and authentication server for Wi-Fi and Ethernet (SoftAp0)...
Jun 22 14:46:24 beagley-ai (hostapd)[1061]: hostapd@SoftAp0.service: Referenced but unset environment variable evaluates to an empty string: DAEMON_OPTS
Jun 22 14:46:24 beagley-ai hostapd[1061]: SoftAp0: interface state UNINITIALIZED->COUNTRY_UPDATE
Jun 22 14:46:24 beagley-ai hostapd[1061]: SoftAp0: interface state COUNTRY_UPDATE->ENABLED
Jun 22 14:46:24 beagley-ai hostapd[1061]: SoftAp0: AP-ENABLED
Jun 22 14:46:24 beagley-ai systemd[1]: Started hostapd@SoftAp0.service - Access point and authentication server for Wi-Fi and Ethernet (SoftAp0).

Checking SoftAp0 Interface:

voodoo@beagley-ai:~$ sudo ifconfig -a SoftAp0
SoftAp0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.8.1  netmask 255.255.255.0  broadcast 192.168.8.255
        inet6 fe80::3468:b5ff:fe8e:2850  prefixlen 64  scopeid 0x20<link>
        ether 36:68:b5:8e:28:50  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 57  bytes 11122 (10.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

But uhoh… wlan0… lost ip… i’m still on eth0 atleast… trying sudo dhclient wlan0

voodoo@beagley-ai:~$ sudo ifconfig -a wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::3668:b5ff:fe8e:284f  prefixlen 64  scopeid 0x20<link>
        ether 34:68:b5:8e:28:4f  txqueuelen 1000  (Ethernet)
        RX packets 2  bytes 282 (282.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 39  bytes 8900 (8.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

My phone see’s it, but internally, lots of:

Jun 22 14:54:47 beagley-ai hostapd[1065]: SoftAp0: STA 86:6d:e7:95:96:0c IEEE 802.11: authenticated
Jun 22 14:54:47 beagley-ai hostapd[1065]: SoftAp0: STA 86:6d:e7:95:96:0c IEEE 802.11: associated (aid 1)
Jun 22 14:54:47 beagley-ai hostapd[1065]: SoftAp0: STA 86:6d:e7:95:96:0c RADIUS: starting accounting session 94E5DF2C7E08A296
Jun 22 14:54:47 beagley-ai hostapd[1065]: SoftAp0: STA 86:6d:e7:95:96:0c WPA: pairwise key handshake completed (RSN)
Jun 22 14:55:05 beagley-ai hostapd[1065]: SoftAp0: STA 86:6d:e7:95:96:0c IEEE 802.11: disassociated
Jun 22 14:55:06 beagley-ai hostapd[1065]: SoftAp0: STA 86:6d:e7:95:96:0c IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)

and will not just stay connected…

okay, rerying the not-as cool __ap option:

SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan[0-9]", DRIVERS=="cc33xx_driver" \
        RUN+="/sbin/iw dev %k interface add SoftAp0 type __ap"

We get both interfaces now:

voodoo@beagley-ai:~$ sudo ifconfig -a SoftAp0
SoftAp0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.8.1  netmask 255.255.255.0  broadcast 192.168.8.255
        inet6 fe80::3468:b5ff:fe8e:2850  prefixlen 64  scopeid 0x20<link>
        ether 36:68:b5:8e:28:50  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 69  bytes 12768 (12.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

voodoo@beagley-ai:~$ sudo ifconfig -a wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.3.76  netmask 255.255.252.0  broadcast 192.168.3.255
        inet6 fd67:8008:348d:efe5:3668:b5ff:fe8e:284f  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::3668:b5ff:fe8e:284f  prefixlen 64  scopeid 0x20<link>
        ether 34:68:b5:8e:28:4f  txqueuelen 1000  (Ethernet)
        RX packets 330  bytes 75633 (73.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 90  bytes 24589 (24.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I can ping my phone now…

voodoo@beagley-ai:~$ ping 192.168.8.205
PING 192.168.8.205 (192.168.8.205) 56(84) bytes of data.
64 bytes from 192.168.8.205: icmp_seq=1 ttl=64 time=62.2 ms
64 bytes from 192.168.8.205: icmp_seq=2 ttl=64 time=28.2 ms
64 bytes from 192.168.8.205: icmp_seq=3 ttl=64 time=14.8 ms
64 bytes from 192.168.8.205: icmp_seq=4 ttl=64 time=30.8 ms

Regards,

Success, once i turned off all my vpn/etc settings!

Internal BeagleY-AI web-browser…

Regards,

and final package update bb-wlan0-defaults (1.20240622.0) (acf06bbd) · Commits · BeagleBoard.org / repos-arm64 · GitLab

okay all packages now pushed and synced to the apt repo:

sudo apt update ; sudo apt-get upgrade -yq

Triggering full image rebuild!

Okay, please test! Index of /rootfs/debian-arm64-12-bookworm-xfce-v6.1-ti/2024-06-22

You can use our Use custom option in bb-imager

Wait for it complete flashing, pull out microSD and stick it back to reload…

Open the Boot mount and edit both sysconf.txt and ./services/SoftAp0.conf

Plug microSD into BeagleY-AI and allow it to bootup…

We can check that everything was setup via:

journalctl | grep bbbio-set-sysconf
Debian GNU/Linux 12 beagley-ai ttyS2

BeagleBoard.org Debian Bookworm Xfce Image 2024-06-22
Support: https://bbb.io/debian
default username is [voodoo]

beagley-ai login: voodoo
Password: 

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
voodoo@beagley-ai:~$ journalctl | grep bbbio-set-sysconf
Jun 22 16:58:49 BeagleBone systemd[1]: Starting bbbio-set-sysconf.service - BeagleBoard Set up system configuration...
Jun 22 16:58:49 BeagleBone bbbio-set-sysconf[857]: Reading the system configuration settings from /boot/firmware/sysconf.txt
Jun 22 16:58:49 BeagleBone bbbio-set-sysconf[867]: Reading the system configuration settings from /boot/firmware/sysconf.txt
Jun 22 16:58:49 BeagleBone bbbio-set-sysconf[873]: Resetting debian password
Jun 22 16:58:49 BeagleBone bbbio-set-sysconf[896]: Resetting debian password
Jun 22 16:58:50 BeagleBone bbbio-set-sysconf[1032]: Changing debian to voodoo
Jun 22 16:58:50 BeagleBone bbbio-set-sysconf[1025]: Changing debian to voodoo
Jun 22 16:58:54 BeagleBone systemd[1]: Reloading requested from client PID 1124 ('systemctl') (unit bbbio-set-sysconf.service)...
Jun 22 16:58:58 BeagleBone systemd[1]: Reloading requested from client PID 1201 ('systemctl') (unit bbbio-set-sysconf.service)...
Jun 22 16:59:00 BeagleBone bbbio-set-sysconf[1300]: Setting up iwd with Country code 'US'
Jun 22 16:59:00 BeagleBone bbbio-set-sysconf[1301]: Setting up iwd with Country code 'US'
Jun 22 16:59:00 BeagleBone bbbio-set-sysconf[1304]: Configuring WiFi Credentials
Jun 22 16:59:00 BeagleBone bbbio-set-sysconf[1305]: Configuring WiFi Credentials
Jun 22 16:59:00 BeagleBone bbbio-set-sysconf[1307]: Avenger -> /var/lib/iwd/Avenger.psk
Jun 22 16:59:01 BeagleBone bbbio-set-sysconf[1313]: Setting up hostapd with 'SoftAp0.conf'
Jun 22 16:59:01 BeagleBone bbbio-set-sysconf[1314]: Setting up hostapd with 'SoftAp0.conf'
Jun 22 16:59:01 BeagleBone bbbio-set-sysconf[1317]: Setting hostname to 'beagley-ai'
Jun 22 16:59:01 BeagleBone bbbio-set-sysconf[1318]: Setting hostname to 'beagley-ai'
Jun 22 16:59:01 beagley-ai bbbio-set-sysconf[1320]: Adding 'beagley-ai' to /etc/hosts
Jun 22 16:59:01 beagley-ai bbbio-set-sysconf[1321]: Adding 'beagley-ai' to /etc/hosts
Jun 22 16:59:01 beagley-ai bbbio-set-sysconf[1322]: Setting keymap to 'us'
Jun 22 16:59:01 beagley-ai bbbio-set-sysconf[1323]: Setting keymap to 'us'
Jun 22 16:59:01 beagley-ai bbbio-set-sysconf[1332]: Reloading keymap. This may take a short while
Jun 22 16:59:06 beagley-ai bbbio-set-sysconf[1686]: Setting timezone to 'America/North_Dakota/Center'
Jun 22 16:59:06 beagley-ai bbbio-set-sysconf[1689]: Setting timezone to 'America/North_Dakota/Center'
Jun 22 16:59:08 beagley-ai bbbio-set-sysconf[1773]: Enabling lightdm.service
Jun 22 16:59:08 beagley-ai bbbio-set-sysconf[1774]: Enabling lightdm.service
Jun 22 16:59:09 beagley-ai systemd[1]: Reloading requested from client PID 1779 ('systemctl') (unit bbbio-set-sysconf.service)...
Jun 22 16:59:11 beagley-ai systemd[1]: Reloading requested from client PID 1817 ('systemctl') (unit bbbio-set-sysconf.service)...
Jun 22 16:59:13 beagley-ai systemd[1]: Reloading requested from client PID 1775 ('systemctl') (unit bbbio-set-sysconf.service)...
Jun 22 16:59:15 beagley-ai bbbio-set-sysconf[1888]: **********************************************
Jun 22 16:59:15 beagley-ai bbbio-set-sysconf[1889]: **********************************************
Jun 22 16:59:15 beagley-ai bbbio-set-sysconf[1890]: Rebooting after setting up sysconf.txt options
Jun 22 16:59:15 beagley-ai bbbio-set-sysconf[1892]: Rebooting after setting up sysconf.txt options
Jun 22 16:59:15 beagley-ai bbbio-set-sysconf[1893]: **********************************************
Jun 22 16:59:15 beagley-ai bbbio-set-sysconf[1895]: **********************************************
Jun 22 16:59:17 beagley-ai systemd[1]: bbbio-set-sysconf.service: Deactivated successfully.
Jun 22 16:59:17 beagley-ai systemd[1]: Finished bbbio-set-sysconf.service - BeagleBoard Set up system configuration.
Jun 22 16:59:17 beagley-ai systemd[1]: bbbio-set-sysconf.service: Consumed 8.660s CPU time.
Jun 22 16:59:45 beagley-ai systemd[1]: Starting bbbio-set-sysconf.service - BeagleBoard Set up system configuration...
Jun 22 16:59:46 beagley-ai bbbio-set-sysconf[727]: Reading the system configuration settings from /boot/firmware/sysconf.txt
Jun 22 16:59:46 beagley-ai bbbio-set-sysconf[734]: Reading the system configuration settings from /boot/firmware/sysconf.txt
Jun 22 16:59:46 beagley-ai systemd[1]: bbbio-set-sysconf.service: Deactivated successfully.
Jun 22 16:59:46 beagley-ai systemd[1]: Finished bbbio-set-sysconf.service - BeagleBoard Set up system configuration.

Interfaces are up:

voodoo@beagley-ai:~$ sudo ifconfig -a wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.3.77  netmask 255.255.252.0  broadcast 192.168.3.255
        inet6 fe80::3668:b5ff:fe8e:284f  prefixlen 64  scopeid 0x20<link>
        inet6 fd67:8008:348d:efe5:3668:b5ff:fe8e:284f  prefixlen 64  scopeid 0x0<global>
        ether 34:68:b5:8e:28:4f  txqueuelen 1000  (Ethernet)
        RX packets 472  bytes 129750 (126.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 103  bytes 25100 (24.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

voodoo@beagley-ai:~$ sudo ifconfig -a SoftAp0
SoftAp0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.8.1  netmask 255.255.255.0  broadcast 192.168.8.255
        inet6 fe80::3468:b5ff:fe8e:2850  prefixlen 64  scopeid 0x20<link>
        ether 36:68:b5:8e:28:50  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 64  bytes 11614 (11.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
1 Like

OK, should I turn off NetworkManager, and stop and deinstall dnsmasq, which is in the RPI forum?

I am confused on what network configuration tool is used, and where the settings are stored.
On
https://docs.beagleboard.org/latest/boards/beagley/ai/02-quick-start.html
It seems NetworkManager is used, or iwd to connect the wlan0 interface.

For eth0 it seems /etc/systemd/network/eth0.network is used, but I also find wlan0.network, SoftAp0.network and usb0, usb1 and mlan0 over there.

So it revolves around 3 questions:
What is stored where?
Where can I turn interfaces on or off?
Is there any overview that

Kind Regards,
Johan Henselmans

By default the image is setup to use systemd-network + iwd. There is no reason to enable network manager in the quick start guide.

OK, thanks Robert for the clarification.

I switched to this version and successfully have the BeagleY-AI wifi host working, but it seems to have disabled the hdmi output. Was this intentional for this updated image? The only other change I made was adding the UART and SPIDev overlay and commented out the last line in the extlinux.conf file

I wouldn’t expect you to lose HDMI with that. What kernel verison are you running uname -r?

We had to disable the initrd, as using overlays would corrupt the initrd in memory…

Regards,

6.1.80-ti-arm64-r57

apt update should pull in an updated kernel:

sudo apt update
sudo apt-get dist-upgrade

Regards,