Hi all,
I’m having an issue with the usb ethernet gadget that I haven’t been able to figure out. When I plug the beagle bone in I see the usb0 device on the host, but I never get 192.168.7.1 from the dhcp server on the bone. And what’s weird is that if I configure it to use that address manually, ‘jon@host-machine$ sudo ifconfig usb0 192.168.7.1’, it will work fine for roughly 5 minutes then it’ll lose the address and I have to run that command again. I’ve posted some of the diagnostic info below, but nothing really jumps out as being wrong to me…
There’s another tidbit that may or may not help: the usb0 ethernet gadget was broken like this until I installed the 3.2.21 kernel and modules with the Xenomai patch. After that it worked fine but then it went back to this broken behavior a short while later (couple of days with frequent use.) I can’t remember doing anything that might have caused this…
Information from the bone:
root@beaglebone:~# dmesg | grep usb0
[ 0.183094] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[ 0.870226] usb0: MAC 8e:52:c3:4b:26:07
[ 0.870244] usb0: HOST MAC 06:54:91:9a:f3:ac
[ 15.698074] ADDRCONF(NETDEV_UP): usb0: link is not ready
root@beaglebone:~# ifconfig usb0
usb0 Link encap:Ethernet HWaddr 8E:52:C3:4B:26:07
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root@beaglebone:~# ps -A | grep dhcp
261 ? 00:00:00 udhcpd
On the host side of things:
jon@ubuntu:~$ dmesg | grep usb0
[44342.158162] cdc_ether 1-2:1.0: usb0: register ‘cdc_ether’ at usb-0000:02:03.0-2, CDC Ethernet Device, 96:f4:7e:c8:d2:52
[44352.598445] usb0: no IPv6 routers present
[44401.591566] usb0: no IPv6 routers present
[44449.298639] usb0: no IPv6 routers present
[44497.134423] usb0: no IPv6 routers present
[44841.048077] usb0: no IPv6 routers present
[44889.369691] usb0: no IPv6 routers present
[44936.726581] usb0: no IPv6 routers present
[44985.223845] usb0: no IPv6 routers present
jon@ubuntu:~$ ifconfig usb0
usb0 Link encap:Ethernet HWaddr 06:54:91:9a:f3:ac
inet6 addr: fe80::454:91ff:fe9a:f3ac/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:62 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1634 (1.6 KB) TX bytes:13312 (13.3 KB)
jon@ubuntu:~$ sudo tcpdump -i usb0 | grep DHCP
tcpdump: WARNING: usb0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on usb0, link-type EN10MB (Ethernet), capture size 65535 bytes
22:24:52.216767 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 06:54:91:9a:f3:ac (oui Unknown), length 300
22:24:55.028805 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 06:54:91:9a:f3:ac (oui Unknown), length 300
22:25:00.800569 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 06:54:91:9a:f3:ac (oui Unknown), length 300
22:25:08.425915 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 06:54:91:9a:f3:ac (oui Unknown), length 300
22:25:20.380182 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 06:54:91:9a:f3:ac (oui Unknown), length 300
22:25:35.421184 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 06:54:91:9a:f3:ac (oui Unknown), length 300
22:25:40.190817 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 06:54:91:9a:f3:ac (oui Unknown), length 300
22:25:43.067199 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 06:54:91:9a:f3:ac (oui Unknown), length 300
It looks like udhcpd isn’t responding to the host’s requests. But the fact that it can’t even keep a static address confuses me even more. If anyone’s seen anything like this, I’d really appreciate any input on what you did to fix it.
Thanks
-JonRW