hardillb / rpi-gadget-image-creator

Takes a standard Raspbian Lite image and adds USB Ethernet gadget config
https://www.hardill.me.uk/wordpress/2020/02/21/building-custom-raspberry-pi-sd-card-images/
Apache License 2.0
176 stars 31 forks source link

Failed to start Raise network interfaces. #3

Closed Different-Name closed 3 years ago

hardillb commented 3 years ago

I'm sorry, but this bug report is totally useless, there is no information that could possibly help me to work out what the problem is.

hardillb commented 3 years ago

Everything

hardillb commented 3 years ago

I don't know, are there? At this point, you are the only person who knows what you did to get into the state you described.

hardillb commented 3 years ago

Still not enough information

  1. What OS did you run the script on?
  2. What version of Rasbian OS image did you provide to the script?
  3. What exact Pi hardware did you run the image on?
  4. What Host Machine/OS did you plug the pi into?
  5. Have you checked on the Host machine that a network interface has also been created?
  6. How long did you leave it for the Host machine to get an IP address from the Pi?

Given that ifconfgi usb0 and the dmesg output show a configured usb0 device it obviously have managed to raise the device, so the Pi is working just fine.

hardillb commented 3 years ago

You created the image on the pi? Or did you run the script on the Dell and then write the image to sd card and boot the pi?

I'll guess that Pop!_OS 20.04 is a Ubuntu variant. Run "journalctl -f" before plugging the pi in, it will tail the system logs.

At first you should see entries about enumerating the USB devices it will look to timeout several times as the Pi boots.

Then you should watch for output from NetworkManager about sending DHCP requests and probably downing the interface which might time out.

I have seen this occasionally when running on a Pi Zero and I've been looking at some better dnsmasq options to get it to confirm DHCP addresses, but not on a Pi 4.

p.s. The error about failing to raise the network interface is probably because systemd tries to start all the network interfaces before the script to set up the USB gadget runs so at that time there is no USB0, it will automatically start once defined.

hardillb commented 3 years ago

Try running it as sudo journalctl -fit may filter the output for normal users at 20.04.

hardillb commented 3 years ago

Then I can't help.

But the Pi is working correctly.

You will have to work out how to find the logs for the network stack on Pop OS and work out why it's not getting a DHCP address from the Pi.

hardillb commented 3 years ago

Now you've gone an totally changed what we've been discussing here. I'm sorry, but I'm done now.

You can try the pre-built image with the iPad, if it doesn't work then you are on your own as I don't have a iPad

hardillb commented 3 years ago

Looks like something is broken in the 5.x kernels in the latest Rasbian/Raspberry Pi OS releases.

Things work with the 2020-02-13 build of Raspbian which still has a 4.x kernel. The 32bit pre-built image should be fine.

Just DO NOT user apt-get upgrade as this will update the kernel and it will fail on next boot.