It kind of confusing, in fact I can doing this every time in the exact same order (format, edit config.txt, edit cmdline.txt, create a ssh file, unmount, install SDcard, power on, pluggind the USB), and most of the time I got a new random interface (example name "enxa2b17becc282") which is useless to set with nmtui (no IP been showed), and just one or two times I get the "usb0" interface where I can edit with nmtui then get an IP.
So what are you putting into cmdline.txt? Just modules-load=dwc2,g_ether?
If so, you'll get a new random MAC address for each interface presented to the OS by g_ether which would give the symptoms you're reporting. This is not new behaviour in Bookworm.
You need to manually set two MAC adresses. Refer to section 4 of my guide for how to do this.
I tried different power source, different USB cable, something is wrong here ; no repeatable behaviour is very strange.
Not strange, it's exactly what I'd expect when using the minimal configuration for g_ether. Power source and USB cable are irrelevant.
[edit]
It wasn't clear from your post which computer you were talking about getting the "enxa2b17becc282" interface on but I suspect that's the Ubuntu box/USB host not the Pi. At least with RPiOS (other OS may be different) you'll get usb0 on the PI regardless of MAC address. What you get on the USB host end varies but most recent Linux releases default to predictable interface names rather than the old eth0, usb0, etc. naming scheme. Interface name is derived from various hardware attributes rather than arbitrarily assigned in the order they are detected.
[/edit]
Statistics: Posted by thagrol — Mon Dec 16, 2024 4:10 pm