Beagleplay - lowpan0/wpan1 only show up when running from emmc

Running my factory programmed image shows wpan1 and lowpan0 in ifconfig when the wpanusb firmware is running on the cc1352 and the bcfserial driver is not blocked with the dtbo.

I’ve also been trying out nightly sd card images such as https://rcn-ee.net/rootfs/debian-arm64-xfce/2023-03-23/beagleplay-debian-11.6-xfce-arm64-2023-03-23-10gb.img.xz and these devices do not show up when running off of the SD card.

When I flashed the emmc with the emmc-flash image from the same folder, https://rcn-ee.net/rootfs/debian-arm64-xfce/2023-03-23/beagleplay-emmc-flasher-debian-11.6-xfce-arm64-2023-03-23-10gb.img.xz I also see wpan1 and lowpan0.

Is there some limitation preventing these from working when running from the SD card?

Very strange, there shouldn’t be anything… Testing shortly…

Flasher:

beagleplay-emmc-flasher-debian-11.6-xfce-arm64-2023-03-23-10gb.img.xz

wpan0: flags=130<BROADCAST,NOARP>  mtu 123
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 300  (UNSPEC)
        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

wpan1: flags=195<UP,BROADCAST,RUNNING,NOARP>  mtu 123
        unspec 00-12-4B-00-29-B9-98-84-00-00-00-00-00-00-00-00  txqueuelen 300  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 44  bytes 3892 (3.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

debian@BeaglePlay:~$ cat /etc/dogtag 
BeagleBoard.org Debian Bullseye Xfce Image 2023-03-23

Confirmed… beagleplay-debian-11.6-xfce-arm64-2023-03-23-10gb.img.xz

wpan0: flags=130<BROADCAST,NOARP>  mtu 123
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 300  (UNSPEC)
        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

debian@BeaglePlay:~$ journalctl | grep wpan
Aug 07 13:25:10 BeaglePlay kernel: usbcore: registered new interface driver wpanusb
Aug 07 13:25:10 BeaglePlay systemd-modules-load[378]: Inserted module 'wpanusb'
Mar 23 15:36:36 BeaglePlay systemd[1]: Starting Create 6lowpan (IEEE802.15.4) network device...
Mar 23 15:36:36 BeaglePlay create_lowpan[784]: create_lowpan:CHANNEL:1
Mar 23 15:36:36 BeaglePlay create_lowpan[784]: create_lowpan:PANID:0xabcd
Mar 23 15:36:36 BeaglePlay create_lowpan[784]: create_lowpan:MACADDR:
Mar 23 15:36:36 BeaglePlay create_lowpan[784]: create_lowpan:IPADDR:
Mar 23 15:36:36 BeaglePlay create_lowpan[784]: . taking wpan0 down
Mar 23 15:36:37 BeaglePlay create_lowpan[784]: . create lowpan0
Mar 23 15:36:37 BeaglePlay create_lowpan[797]: Cannot find device "wpan1"
Mar 23 15:36:37 BeaglePlay create_lowpan[815]: command failed: No such device (-19)
Mar 23 15:36:37 BeaglePlay create_lowpan[819]: Cannot find device "wpan1"
Mar 23 15:36:37 BeaglePlay create_lowpan[822]: Cannot find device "lowpan0"
Mar 23 15:36:37 BeaglePlay systemd[1]: Finished Create 6lowpan (IEEE802.15.4) network device.

very very strange…

AH! i bet it’s the missing mac address…

So currently the only time we can get the mac address (of the cc1352p) is when flashing it:

	soc_family=$(cat /sys/devices/soc0/family || true)

	case "${soc_family}" in
	AM62X)
		if [ -f /usr/share/beagleconnect/play/cc2538-bsl.py ] ; then
			/usr/share/beagleconnect/play/cc2538-bsl.py /usr/share/beagleconnect/play/ &> /tmp/rootfs/var/log/cc2538.log
			cat /tmp/rootfs/var/log/cc2538.log
			mac=$(cat /tmp/rootfs/var/log/cc2538.log | grep '^Primary IEEE Address:' | awk -F 'Address: ' '{print $2}' || true)
			echo "MACADDR=${mac}" >> /tmp/rootfs/etc/default/lowpan
		fi
		;;
	esac

so the non-flasher never get’s a default MACADDR, i’ll need to just generate something and fake it on the non-flasher…

Regards,