I've tried to get IP over USB working on a Raspberry Pi 4 with 2G of memory. usbnet works fine with Raspbian on this same hardware setup

usrcfg.txt (absence of dr_mode=peripheral doesn't seem to make a difference)



net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait modules-load=dwc2,g_ether fixrtc 

root@ubuntu:/boot/firmware# ip a show eth0                                     
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group defa
ult qlen 1000                                                                   
    link/ether dc:a6:32:02:a2:77 brd ff:ff:ff:ff:ff:ff                          
    inet brd scope global dynamic eth0           
       valid_lft 85802sec preferred_lft 85802sec                                
    inet6 fe80::dea6:32ff:fe02:a277/64 scope link                               
       valid_lft forever preferred_lft forever                                  
root@ubuntu:/boot/firmware# ip a show usb0                                     
Device "usb0" does not exist.                                                   
root@ubuntu:/boot/firmware#  lsmod | grep g_ether                              
g_ether                16384  0                                                 
usb_f_rndis            45056  1 g_ether                                         
u_ether                32768  2 usb_f_rndis,g_ether                             
libcomposite           77824  2 usb_f_rndis,g_ether                             

I think this is a clue to the problem:

[    9.117963] udc-core: couldn't find an available UDC - added [g_ether] to list
  • Did you find a solution to this? I would like to get this working as well.
    – Aossey
    Apr 30 '20 at 0:19

The problem is that the kernel config did not include it. The kernel needs to be rebuilt after setting CONFIG_USB_DWC2_DUAL_ROLE and CONFIG_USB_OTG.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.