Closed martinmCGG closed 4 months ago
This same issue occurs when specifying a custom subnet and selecting RNDIS.
I added the line mentioned by @martinmCGG (thanks, good catch!) to my interfaces file, rebooted and it is now working.
Edit: I created a pull request to fix the issue, see #10
On RPi4 model B and a fresh raspios (2024-03-15-raspios-bookworm-arm64-lite.img.xz), after running the script ('y' on all prompts, default IP and choosing '2) ECM Network device type') and restarting, I get the following error:
The reason is an invalid generated interface config for usb0:
It misses a line that says the interface should use a static IP address. After adding it, and a power cycle, the USB connection started working.
The interface config seems to be generated here: https://github.com/kmpm/rpi-usb-gadget/blob/596892fdbc1b3934e9f906c1a4955933d07dcf11/rpi4-usb.sh#L188 Adding the missing line should fix that.
Also "otg_mode=1" may need to be disabled in config.txt. (I did that during debugging and did not verify if it's necessary, and perhaps that relates only to the compute module 4 so it's not relevant)