Debugging: General Approaches

  I'm having difficulty getting my usb ethernet adapter working. I
want to turn this process of fixing it into an general exercise I can
teach my students.

Here's the background for my problem:
I have an older image that boots up fine and eth0 works fine (as does
the usb keyboard and mouse).
Here's what 'uname -a' says about it:
Linux beagleboard 2.6.27-omap1 #2 Sun Jan 11 11:23:31 CET 2009 armv7l
unknown unknown GNU/Linux

I have a newer image where eth0 doesn't work (but the keyboard and
mouse do). Same hardware as before. uname -a says:
Linux beagleboard 2.6.28-omap1 #1 Fri Mar 20 01:11:29 EDT 2009 armv7l

So the question is: how to I track down this problem? Here's what I

1. Run ifconfig
a. Old Image
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:60:6E:00:03:16
          inet addr: Bcast: Mask:
          inet6 addr: fe80::260:6eff:fe00:316/64 Scope:Link
          RX packets:1182 errors:0 dropped:0 overruns:0 frame:0
          TX packets:826 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:78470 (76.6 KiB) TX bytes:68979 (67.3 KiB)

lo Link encap:Local Loopback
          inet addr: Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:600 (600.0 b) TX bytes:600 (600.0 b)

b New Image
# ifconfig
lo Link encap:Local Loopback
          inet addr: Mask:
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:43 errors:0 dropped:0 overruns:0 frame:0
          TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3184 (3.1 KiB) TX bytes:3184 (3.1 KiB)

usb0 Link encap:Ethernet HWaddr 6A:AC:00:2A:D4:6D
          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)

Hmmm.... So it looks like eth0 never got set up.

2. Check dmesg.
a. Old Image
eth0: register 'dm9601' at usb-musb_hdrc-1.4, Davicom DM9601 USB
Ethernet, 00:60:6e:00:03:16
usbcore: registered new interface driver dm9601

b. New Image
usb 2-1.4: new full speed USB device using musb_hdrc and address 5
usb 2-1.4: device v0a46 p9601 is not supported
usb 2-1.4: configuration #1 chosen from 1 choice

Hmmm.... I'm guessing the driver didn't get installed, but why?

3. Search Discussions

I found some a discussion that suggests the newer kernel may not work
but I don't know where to go from here.

4. Post a question.
And here we are. Where do I go from here?

BIG Question 1: Is this a reasonable way to approach a problem? Are
there other steps I should add? Is there more (or less) information
that should be put in the original post?

BIG Question 2: How do I get eth0 working on the new image?



Try doing ‘ifconfig usb0 down’. If this works, the I’d suspect a routing tables issue. I don’t know how to configure the routing tables in Linux, but I suspect there is plenty of literature on that.

You may be correct that the device driver is not installed, but I think you may be reading that into the error message. Do an ‘lsusb’ and ‘lsmod’ to check. There are probably some other better ways to see if the driver loaded.


...well, you didn't say where you got your kernel source tree - that
would help...

The USB bus is populated by devices which may be identified by Vendor
ID and Product ID.

Your 'dmesg' outputs show the device to be a Davicom DM9601.

The first kernel has found this device and loaded a driver.

The second kernel states that the device Vendor: 0a46, Product: 9601
is not supported.

This could be as simple as the device is not included in your .config

A quick look-see in linux-2.6/drivers/net/usb shows a dm9601.c file.

The same copy of linux has an omap3_beagle_defconfig but that file
doesn't include the DM9601 driver by default.

'make <blah, blah, blah> menuconfig' shows out of the box, the kernel
I just downloaded doesn't include the DM9601 driver even as a loadable

Look in
'Device Drivers ---> Network device support ---> USB Network Adapters --->'

Once I select the DM9601 adapter and Exit out, my .config includes this line:
CONFIG_USB_NET_DM9601=y wasn't there before!

- dan

  I think you are on to the solution. Unfortunately I'm too new at
this to take the next step. Two questions:

1. In the short term, how do I copy the driver to the correct
location on the SD card and configure the present system to use the

2. In the long term, how do I tell bitbake to include the correct
driver when building a new image?

Thanks again for all the help...



Well, if you are using 'bitbake' you are using Angstrom or some other
OpenEmbedded variant.

I find bitbake to be archaic. It is going to take something like:

# bitbake <your_target_kernel> -c menuconfig
# bitbake <your_target_kernel> -f -c compile
# bitbake <your_target_kernel>
# bitbake <your_usual_recipe>

Angstrom and OE in general are amazing techinology - as long as you
stick with the stock recipes and don't go changing things in
individual packages...

Just my humble opinion...
- dan