BeaglePlay: Only use as Wifi client but preserve use of AP if needed to use

ctrl_interface=DIR=/run/wpa_supplicant GROUP=netdev
update_config=1
p2p_disabled=1
country=US
network={
ssid=“WR0001”
psk=“xxxxxxxxxxxxxxxxxxxxxx”
}

idk… sudo beagle-version ?

Regards,

eeprom:[BEAGLEPLAY-A0-02007801030101640623003374SSSS]
model:[BeagleBoard.org_BeaglePlay]
dogtag:[BeagleBoard.org Debian Bullseye Xfce Image 2023-07-01]
bootloader:[/dev/mmcblk0boot0]:[tiboot3.bin]:[U-Boot SPL 2021.01-gb248392d (Jan 04 2023 - 19:38:45 +0000)]
bootloader:[/dev/mmcblk0]:[/boot/firmware/tiboot3.bin]:[U-Boot SPL 2021.01-gf036fbdc (Jun 23 2023 - 14:41:07 +0000)]
bootloader:[/dev/mmcblk0]:[/boot/firmware/tispl.bin]:[U-Boot SPL 2021.01-gf036fbdc (Jun 23 2023 - 14:41:07 +0000)]
bootloader:[/dev/mmcblk0]:[/boot/firmware/u-boot.img]:[U-Boot 2021.01-gf036fbdc (Jun 23 2023 - 14:41:07 +0000)]
bootloader:[/dev/mmcblk1]:[/boot/firmware/tiboot3.bin]:[U-Boot SPL 2021.01-gf036fbdc (Jun 23 2023 - 14:41:07 +0000)]
bootloader:[/dev/mmcblk1]:[/boot/firmware/tispl.bin]:[U-Boot SPL 2021.01-gf036fbdc (Jun 23 2023 - 14:41:07 +0000)]
bootloader:[/dev/mmcblk1]:[/boot/firmware/u-boot.img]:[U-Boot 2021.01-gf036fbdc (Jun 23 2023 - 14:41:07 +0000)]
UBOOT: Booted Device-Tree:[k3-am625-beagleplay.dts]
kernel:[5.10.168-ti-arm64-r108]
nodejs:[v12.22.12]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-u-boot-beagleplay]:[2021.01.20230213.16-0~bullseye+20230810]
pkg:[bb-customizations]:[1.20230810.0-0~bullseye+20230810]
pkg:[bb-usb-gadgets]:[1.20230623.0-0~bullseye+20230623]
pkg:[bb-wl18xx-firmware]:[1.20230425.0-0~bullseye+20230425]
cmdline:[root=/dev/mmcblk1p2 ro rootfstype=ext4 rootwait net.ifnames=0 ]
ti-sci:
Aug 13 22:05:14 BPLAY4DCA kernel: ti-sci 44043000.system-controller: ABI: 3.1 (firmware rev 0x0008 '8.5.3--v08.05.03 (Chill Capybar')
optee:
Aug 13 22:05:14 BPLAY4DCA kernel: optee: revision 3.18 (4adb4a1f)
dmesg | grep remote
[    6.025680] remoteproc remoteproc0: 30074000.pru is available
[    6.032721] remoteproc remoteproc1: 30078000.pru is available
[   10.476650] k3-m4-rproc 5000000.m4fss: configured M4 for remoteproc mode
[   10.499053] remoteproc remoteproc2: 5000000.m4fss is available
[   10.508794] remoteproc remoteproc2: Direct firmware load for am62-mcu-m4f0_0-fw failed with error -2
[   10.518042] remoteproc remoteproc2: powering up 5000000.m4fss
[   10.523962] remoteproc remoteproc2: Direct firmware load for am62-mcu-m4f0_0-fw failed with error -2
[   10.533218] remoteproc remoteproc2: request_firmware failed: -2
dmesg | grep pru
[    6.025680] remoteproc remoteproc0: 30074000.pru is available
[    6.032721] remoteproc remoteproc1: 30078000.pru is available
dmesg | grep pinctrl-single
[    1.613072] pinctrl-single 4084000.pinctrl: 34 pins, size 136
[    1.613618] pinctrl-single f4000.pinctrl: 171 pins, size 684
dmesg | grep gpio-of-helper
lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
lspci
END

Weird now(no eth0, usb power and netdriver, on W10 host:
Tracing route to bplay4dca. [192.168.7.2]
over a maximum of 30 hops:
1 <1 ms <1 ms <1 ms BPLAY4DCA [192.168.7.2]
Trace complete.

192.168.1.76 6C:30:2A:0B:83:73 wifi wlan0 when working before last reboot.
now ping 192.168.1.76
Reply from 192.168.1.85: Destination host unreachable.
Reply from 192.168.1.85: Destination host unreachable.
Reply from 192.168.1.85: Destination host unreachable.
Reply from 192.168.1.85: Destination host unreachable.

Wifi Host BPLAY-4DCA shows up in networks

Now it seems OK:

From router after boot(wifi address of wlan0 from MAC)

Pinging 192.168.1.71 with 32 bytes of data:
Reply from 192.168.1.71: bytes=32 time=2ms TTL=64
Reply from 192.168.1.71: bytes=32 time=2ms TTL=64
Reply from 192.168.1.71: bytes=32 time=3ms TTL=64
Reply from 192.168.1.71: bytes=32 time=2ms TTL=64

IDX LINK    TYPE       OPERATIONAL SETUP
  1 lo      loopback   carrier     unmanaged
  2 eth0    ether      no-carrier  configuring
  3 eth1    ether      no-carrier  unmanaged
  4 wpan0   ieee802154 off         unmanaged
  5 wlan0   wlan       routable    configured
  6 SoftAp0 wlan       no-carrier  configured
  7 wpan1   ieee802154 carrier     unmanaged
  8 lowpan0 6lowpan    degraded    unmanaged
  9 usb0    gadget     routable    configured
 10 usb1    gadget     no-carrier  configuring
 11 docker0 bridge     no-carrier  unmanaged

11 links listed.

10 minutes later

 sudo networkctl -a
IDX LINK    TYPE       OPERATIONAL SETUP
  1 lo      loopback   carrier     unmanaged
  2 eth0    ether      no-carrier  configuring
  3 eth1    ether      no-carrier  unmanaged
  4 wpan0   ieee802154 off         unmanaged
  5 wlan0   wlan       routable    configured
  6 SoftAp0 wlan       no-carrier  configured
  7 wpan1   ieee802154 carrier     unmanaged
  8 lowpan0 6lowpan    degraded    unmanaged
  9 usb0    gadget     routable    configured
 10 usb1    gadget     no-carrier  configuring
 11 docker0 bridge     no-carrier  unmanaged

11 links listed.

and no BPLAY-4DCA from hostapd

This is 5GHz wlan0 and 2.4GHz hostapd I believe:

# a simply means 5GHz
# g simply means 2.4GHz band
hw_mode=g
IDX LINK    TYPE       OPERATIONAL SETUP
  1 lo      loopback   carrier     unmanaged
  2 eth0    ether      no-carrier  configuring
  3 eth1    ether      no-carrier  unmanaged
  4 wpan0   ieee802154 off         unmanaged
  5 wlan0   wlan       routable    configured
  6 wpan1   ieee802154 carrier     unmanaged
  7 lowpan0 6lowpan    degraded    unmanaged
  8 SoftAp0 wlan       routable    configured
  9 usb0    gadget     routable    configured
 10 usb1    gadget     no-carrier  configuring
 11 docker0 bridge     no-carrier  unmanaged

11 links listed.

But today after nother power cycle but several hours I checked and got

IDX LINK    TYPE       OPERATIONAL SETUP
  1 lo      loopback   carrier     unmanaged
  2 eth0    ether      no-carrier  configuring
  3 eth1    ether      no-carrier  unmanaged
  4 wpan0   ieee802154 off         unmanaged
  5 wlan0   wlan       routable    configured
  6 SoftAp0 wlan       no-carrier  configured
  7 wpan1   ieee802154 carrier     unmanaged
  8 lowpan0 6lowpan    degraded    unmanaged
  9 usb0    gadget     routable    configured
 10 usb1    gadget     no-carrier  configuring
 11 docker0 bridge     no-carrier  unmanaged

11 links listed.

That normal, what’s your issue?

Only posted it because the previous one was a fresh boot too, and the difference was that the first time was SoftAp0 wlan routable configured and the second time SoftAp0 wlan no-carrier configured

Well hostapd is in control of that, we really don’t touch SoftAp0 from the user point of view…

Something probably got delayed or timed out…

journalctl -b 0 -k -g hostapd

Regards,

Before no BeaglePlay-4DCA.

sudo systemctl status hostapd
● hostapd.service - Access point and authentication server for Wi-Fi and Ethernet
     Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-08-15 14:38:38 UTC; 3h 11min ago
       Docs: man:hostapd(8)
    Process: 721 ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid $DAEMON_OPTS ${DAEMON_CONF} (code=exited, status=0/>
   Main PID: 812 (hostapd)
      Tasks: 1 (limit: 2117)
     Memory: 2.3M
        CPU: 341ms
     CGroup: /system.slice/hostapd.service
             └─812 /usr/sbin/hostapd -B -P /run/hostapd.pid /etc/hostapd/hostapd.conf

Aug 15 14:38:37 BPLAY4DCA systemd[1]: Starting Access point and authentication server for Wi-Fi and Ethernet...
Aug 15 14:38:38 BPLAY4DCA hostapd[721]: SoftAp0: interface state UNINITIALIZED->ENABLED
Aug 15 14:38:38 BPLAY4DCA hostapd[721]: SoftAp0: AP-ENABLED
Aug 15 14:38:38 BPLAY4DCA systemd[1]: Started Access point and authentication server for Wi-Fi and Ethernet.

sudo systemctl restart hostapd

sudo networkctl -a
IDX LINK    TYPE       OPERATIONAL SETUP
  1 lo      loopback   carrier     unmanaged
  2 eth0    ether      no-carrier  configuring
  3 eth1    ether      no-carrier  unmanaged
  4 wpan0   ieee802154 off         unmanaged
  5 wlan0   wlan       routable    configured
  6 SoftAp0 wlan       routable    configured
  7 wpan1   ieee802154 carrier     unmanaged
  8 lowpan0 6lowpan    degraded    unmanaged
  9 usb0    gadget     routable    configured
 10 usb1    gadget     no-carrier  configuring
 11 docker0 bridge     no-carrier  unmanaged

Connected with wifi with BeaglePlay-4DCA by wifi on W10, ethernet on W10 ssh still connected to wlan0 BPlay. Unsure why access point BeaglePlay-4DCA not up before, but came up after restart.
SoftAp0 has a timeout? wlan0 as connected client prevents hostapd starting access point? Curious.

after connecting to BeaglePlay-4DCA, i did nothing with it for a few hours. When I returned I saw no connection so I restarted hostapd and watched it as
$ sudo hostapd -d /etc/hostapd/hostapd.conf
random: getrandom() support available
Configuration file: /etc/hostapd/hostapd.conf
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-14-72:1
nl80211: Supports Probe Response offload in AP mode
nl80211: Using driver-based off-channel TX
nl80211: Driver-advertised extended capabilities (default) - hexdump(len=8): 04 00 00 00 00 00 00 40
nl80211: Driver-advertised extended capabilities mask (default) - hexdump(len=8): 04 00 00 00 00 00 00 40
nl80211: Supported vendor command: vendor_id=0x80028 subcmd=0
nl80211: Supported vendor command: vendor_id=0x80028 subcmd=1
nl80211: Supported vendor command: vendor_id=0x80028 subcmd=2
nl80211: Supported vendor event: vendor_id=0x80028 subcmd=0
nl80211: Supported vendor event: vendor_id=0x80028 subcmd=1
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: Enable multi-channel concurrent (driver advertised support)
nl80211: use P2P_DEVICE support
nl80211: key_mgmt=0x1fd0f enc=0xf auth=0x7 flags=0x4000511f363fae0 rrm_flags=0x10 probe_resp_offloads=0x7 max_stations=0 max_remain_on_chan=30000 max_scan_ssids=1
nl80211: interface SoftAp0 in phy phy0
nl80211: Set mode ifindex 6 iftype 3 (AP)
nl80211: Setup AP(SoftAp0) - device_ap_sme=0 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0xaaaad2713be0
nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0xaaaad2713be0 match= multicast=0
nl80211: kernel reports: Match already configured
nl80211: Register frame command failed (type=176): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Could not configure driver mode
nl80211: deinit ifname=SoftAp0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=6)
netlink: Operstate: ifindex=6 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211 driver initialization failed.
hostapd_interface_deinit_free(0xaaaad270b9e0)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0xaaaad270b9e0)
SoftAp0: interface state UNINITIALIZED->DISABLED
hostapd_bss_deinit: deinit bss SoftAp0
SoftAp0: AP-DISABLED
hostapd_cleanup(hapd=0xaaaad270d1b0 (SoftAp0))
SoftAp0: CTRL-EVENT-TERMINATING
hostapd_free_hapd_data: Interface SoftAp0 wasn’t started
hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) → hapd_deinit
hostapd_interface_free(0xaaaad270b9e0)
hostapd_interface_free: free hapd 0xaaaad270d1b0
hostapd_cleanup_iface(0xaaaad270b9e0)
hostapd_cleanup_iface_partial(0xaaaad270b9e0)
hostapd_cleanup_iface: free iface=0xaaaad270b9e0

and noticed again no BeaglePlay-4DCA in wireless networks. So doing
` sudo networkctl -a
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 eth0 ether no-carrier configuring
3 eth1 ether no-carrier unmanaged
4 wpan0 ieee802154 off unmanaged
5 wlan0 wlan routable configured
6 SoftAp0 wlan no-carrier configured
7 wpan1 ieee802154 carrier unmanaged
8 lowpan0 6lowpan degraded unmanaged
9 usb0 gadget routable configured
10 usb1 gadget no-carrier configuring
11 docker0 bridge no-carrier unmanaged

11 links listed.

Although this link is ancient, Can a Linux machine act as both a wireless client and access point simultaneously using a single physical WLAN interface? - Super User , I wonder if what I need is two wlan0 configuraions, wlan0_ap and wlan0_client to get ap , client and and maybe wpagui to work “right”.

That’s what we do…

wlan0_ap = SoftAp0
wlan0_client = wlan0

Right now wpagui is filtering out wlan0 for some reason…

Regards,

Everything is making more sense now. I can easily use SoftAp0 and wlan0 as expected on 2.4GHz. When i tried to use SoftAp0 and wlan0 at 5Ghz, hostapd would exit with

Aug 16 21:10:16 BPLAY4DCA hostapd[1866]: Could not determine operating frequency

Try these flags over the existing ones we setup for 2.4Ghz… : hostapd.conf

# "a" simply means 5GHz
hw_mode=a
# the channel to use, 0 means the AP will search for the channel with the least interferences (ACS)
channel=0
# limit the frequencies used to those allowed in the country
ieee80211d=1
# the country code
country_code=US
# 802.11n support
ieee80211n=1
# 802.11ac support
ieee80211ac=1
# QoS support, also required for full speed on 802.11n/ac/ax
wmm_enabled=1

Regards,

I tried 0 and 1 for channel, ieee80211d=1 and #ieee80211d=1

Aug 17 01:37:00 BPLAY4DCA kernel: wlcore: down
Aug 17 01:37:00 BPLAY4DCA hostapd[1193]: SoftAp0: interface state UNINITIALIZED->COUNTRY_UPDATE
Aug 17 01:37:00 BPLAY4DCA hostapd[1193]: Could not determine operating frequency
Aug 17 01:37:00 BPLAY4DCA hostapd[1193]: SoftAp0: interface state COUNTRY_UPDATE->DISABLED
Aug 17 01:37:00 BPLAY4DCA hostapd[1193]: SoftAp0: AP-DISABLED
Aug 17 01:37:00 BPLAY4DCA hostapd[1193]: SoftAp0: Unable to setup interface.
Aug 17 01:37:00 BPLAY4DCA hostapd[1193]: SoftAp0: interface state DISABLED->DISABLED
Aug 17 01:37:00 BPLAY4DCA hostapd[1193]: SoftAp0: AP-DISABLED
Aug 17 01:37:00 BPLAY4DCA hostapd[1193]: SoftAp0: CTRL-EVENT-TERMINATING
Aug 17 01:37:00 BPLAY4DCA hostapd[1193]: hostapd_free_hapd_data: Interface SoftAp0 wasn’t started
Aug 17 01:37:00 BPLAY4DCA hostapd[1193]: nl80211: deinit ifname=SoftAp0 disabled_11b_rates=0
Aug 17 01:37:00 BPLAY4DCA kernel: wlcore: down
Aug 17 01:37:00 BPLAY4DCA systemd[1]: hostapd.service: Control process exited, code=exited, status=1/FAILURE

I changed things back as suggested except used channel=36 and it worked.
How to properly set up AP mode | Community | Murata Manufacturing Co., Ltd.

I have no idea why this would work on different hw.

from what I’ve read, channel=0 should also work for 5Ghz, as it scan’s and sets a value?

Regards,

The zero was what I read would scan as well, but TIL List of WLAN channels - Wikipedia and from others that 36, 40, 44, 48 would be prime US indoor channels.

Maybe wireless-regdb would allow “0”?