Debugging no lowpan0 interface on BeaglePlay

I’m not able to see lowpan0 on my board and I’m starting to wonder if this is a hardware issue…

What I’ve done so far:

  1. Flashed with this file: beagleplay-emmc-flasher-debian-11.6-minimal-arm64-2023-03-10-4gb.img.xz
  2. Booted. Checked ifconfig, here is list:
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::6e30:2aff:fe08:c082  prefixlen 64  scopeid 0x20<link>
        ether 6c:30:2a:08:c0:82  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 42  bytes 7044 (6.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 34:08:e1:84:fc:23  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 656  bytes 54353 (53.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 656  bytes 54353 (53.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.7.2  netmask 255.255.255.0  broadcast 192.168.7.255
        inet6 fe80::1eba:8cff:fea2:ed6b  prefixlen 64  scopeid 0x20<link>
        ether 1c:ba:8c:a2:ed:6b  txqueuelen 1000  (Ethernet)
        RX packets 301  bytes 40781 (39.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 124  bytes 25780 (25.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.6.2  netmask 255.255.255.0  broadcast 192.168.6.255
        inet6 fe80::1eba:8cff:fea2:ed6d  prefixlen 64  scopeid 0x20<link>
        ether 1c:ba:8c:a2:ed:6d  txqueuelen 1000  (Ethernet)
        RX packets 533  bytes 55170 (53.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 248  bytes 196700 (192.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 6c:30:2a:08:c0:81  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
  1. Ran thru steps 1 thru 4 on Wireless MCU Zephyr Development — BeagleBoard Documentation

  2. In Step 2 above, I can flash the chip successfully as seen here:

./build/play/cc2538-bsl.py build/play
CC2538 BSL script customized for Laughing Coyote CC1352P target!
Setting BOOT and RESET low
Setting RESET high
Setting BOOT high
Opening port /dev/ttyS4, baud 50000
Reading data from build/play/zephyr/zephyr.bin
Cannot auto-detect firmware filetype: Assuming .bin
Connecting to target...
CC1350 PG2.0 (7x7mm): 704KB Flash, 20KB SRAM, CCFG.BL_CONFIG at 0x000AFFD8
Primary IEEE Address: 00:12:4B:00:29:C4:CA:F5
    Performing mass erase
Erasing all main bank flash sectors
    Erase done
Writing 720896 bytes starting at address 0x00000000
Write 208 bytes at 0x000AFF300
    Write done                                
Verifying by comparing CRC32 calculations.
    Verified (match: 0x4eb734b7)

  1. Step 4 is: lsmod | grep bcfserial which results in
bcfserial              24576  0
mac802154              77824  1 bcfserial

So no wpanusb is being loaded?

If I try to loapd wpanusb manually via modprobe I then see it via lsmod, but still no lowpan0 in ifconfig.

Any ideas?

there is a udev rule /etc/udev/rules.d/83-wpan0-start-lowpan0.rules that start lowpan.service, which is located : /lib/systemd/system/lowpan.service

That calls /usr/sbin/create_lowpan, which wants some arguments. The same lowpan.service has a field called EnvironmentFile, which supplies the values of the arguments to create_lowpan. It is this create_lowpan that should make your devices show up in ifconfig.

But I’m not sure why that doesn’t load for you automatically, if you’ve successfully programmed the cc1352 and are not loading the overlay to disable bcfserial. Your output seems to confirm that these are both the case.

I’ve been able to get lowpan0 and wpan1 to show up using the 3-23-23 flasher build. I’m pretty sure it was working in my factory image before I broke my image elsewhere, so I don’t think it has anything to do with the build date, as long as its an emmc flasher image. I found that the sd card images definitely don’t work for wpan, as confirmed here Beagleplay - lowpan0/wpan1 only show up when running from emmc - #2 by RobertCNelson

Thank you for this @toddm

I think we have found the problem: I have no /etc/udev/rules.d/83-wpan0-start-lowpan0.rules nor do I have the associated lowpan.service.

Not sure how thats possible as its a freshly flashed system.

Perhaps those are located in a debian package that isn’t installed? I’ve searched for lowpan using apt search and apt-file find but it doesn’t pull up anything.

@RobertCNelson how can I install those?

I didn’t catch the “minimal” in your image name. The one I used was beagleplay-emmc-flasher-debian-11.6-xfce-arm64-2023-03-23-10gb.img.xz

That did it!

For reference that script and service are provided by beagleconnect .deb package…

Update.

@RobertCNelson I booted again with the “minimal” image to see if I could get lowpan.service working on that, and the service starts but gives an error.

$ systemctl status lowpan.service

● lowpan.service - Create 6lowpan (IEEE802.15.4) network device
     Loaded: loaded (/lib/systemd/system/lowpan.service; enabled; vendor preset: enabled)
     Active: active (exited) since Thu 2023-03-30 11:50:16 UTC; 42s ago
    Process: 539 ExecStart=/usr/sbin/create_lowpan $CHN $PAN $MACADDR $IP6 (code=exited, status=0/SUCCESS)
   Main PID: 539 (code=exited, status=0/SUCCESS)
        CPU: 110ms

Mar 30 11:50:16 BeaglePlay create_lowpan[539]: create_lowpan:PANID:0xabcd
Mar 30 11:50:16 BeaglePlay create_lowpan[539]: create_lowpan:MACADDR:
Mar 30 11:50:16 BeaglePlay create_lowpan[539]: create_lowpan:IPADDR:
Mar 30 11:50:16 BeaglePlay create_lowpan[539]: . taking wpan0 down
Mar 30 11:50:16 BeaglePlay create_lowpan[539]: . create lowpan0
Mar 30 11:50:16 BeaglePlay create_lowpan[559]: Cannot find device "wpan1"
Mar 30 11:50:16 BeaglePlay create_lowpan[576]: command failed: No such device (-19)
Mar 30 11:50:16 BeaglePlay create_lowpan[579]: Cannot find device "wpan1"
Mar 30 11:50:16 BeaglePlay create_lowpan[582]: Cannot find device "lowpan0"
Mar 30 11:50:16 BeaglePlay systemd[1]: Finished Create 6lowpan (IEEE802.15.4) network device.

This looks like same issue of missing MAC ADDR as mentioned in @toddm other thread here (Beagleplay - lowpan0/wpan1 only show up when running from emmc - #2 by RobertCNelson).

So in summary:

If you are running the minimal image and then install beagleconnect package, the lowpan service won’t start because somehow it is missing a MAC address in /etc/default/lowpan

Great! Now that your lowpan0 shows up, I wonder if you can run “wpan-ping -d”?

When I do this on my beagleplay, I get a bind error. But when I do it on a raspberry pi + nrf52840 wpanusb setup, I am able to wpan-ping, open and communicate over udp sockets, etc.

Same, bind error

I tried specifying wpan1 and wpan0 same error on both.

Not sure why there is wpan0, wpan1, and lowpan0 (wpan0 and lowpan0 both share same mac address…)