Lately I had bought several el-cheapo USB-ethernet modules for work. I needed cheap ones just to run a tftp server on an aging P4 machine running on Fedora 12.

I got this off dealextreme.com for less than $5. I’ve read the reviews and it seems to work pretty well on Windows. It’s severely cheap looking and fragile but what do you expect for such a price?
The only issue I have with the usb-ethernet dongle is that the drivers do not work out of the box. I believe the drivers that they gave are extremely old. It did not even manage to compile properly! But no matter, this chip is supposedly supported in the Linux kernel. All you need to do is:
modprobe usbnet modprobe dm9601 It should work, Network Manager should be able to detect and bring up the interface (ethX). But if you are unlucky as I was, then you’ll need to read on.
The reason why some devices work and some don’t lies in the chip ID. Davicom has since changed some of their chip IDs making these older drivers invalid. What you’ll need to do is to download the source of the driver according to your linux kernel version. It is important that you get the kernel number close to the one you are using. Different kernel releases may have changes in their coding structure which may not backward compatible (hence you’ll get compile errors, etc).
run ‘uname -r‘ to get the version number of your kernel. Google the file or browse Linux kernels and download the ‘C’ file (dm9601.c).
Now open up the ‘C’ file and look for ‘usb_device_id products [] = { …. ‘ These lines contains the IDs of all the supported chip IDs in that driver version. Now you’ll need to get your USB-ethernet vendor & chip ID. You can run ‘dmesg | tail -20‘ and it’ll provide you with an output like so:
eth1: register 'asix' at usb-0000:00:1d.7-1, ASIX AX88772B USB 2.0 Ethernet, 00:60:6e:79:02:8c
eth1: ax8817x - Link Status is: 0
usb 2-2: new full speed USB device using uhci_hcd and address 2
usb 2-2: New USB device found, idVendor=0fe6, idProduct=9700
usb 2-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
usb 2-2: Product: USB 2.0 10/100M Ethernet Adaptor
usb 2-2: configuration #1 chosen from 1 choice
eth1: no IPv6 routers present
usbcore: deregistering interface driver dm9601 Look for idVendor and idProduct. These are hex numbers representing Vendor ID (0fe6) and Product ID (9700).
Back to the ‘C’ file, insert these few lines into the file, replacing vendorID with the value of idVendor and productID with the value of idProduct. Please be careful of the placement of the curly braces.
{
USB_DEVICE(0×0fe6, 0×9700),
.driver_info = (unsigned long)&dm9601_info,
},
Save the file. Copy, paste and save the Makefile below. Finally do a make. After the file has been compiled, copy the dm9601.ko file to /lib/modules/`uname -r`/kernel/drivers/net/usb/dm9601.ko
Do a rmmod dm9601 if you had initially done a modprobe. Then run modprobe dm9601.
Network Manager should be bringing up the interface now. Enjoy your el-cheapo usb nic!
– Makefile –
##================================================================
## Davicom Semiconductor Inc. For DM9601 V0.00
## --------------------------------------------------------
## Description:
## Compile driver dm9601.c to dm9601.o
##
## Modification List:
## 09/05/2000 Fixed SMPFALGS wrong on smp & smp_mod
## 08/02/2000 Changed some description string & include file path
## 07/25/2000 Append smp_mod and changed some descriptions
## 01/25/2000 by Sten Wang
##================================================================
# Comment/uncomment the following line to disable/enable debugging
#DEBUG = y
# Add your debugging flag (or not) to CFLAGS
ifeq ($(DEBUG),y)
DEBFLAGS = -O -g # "-O" is needed to expand inlines
else
DEBFLAGS = -O2
endif
EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR)
ifneq ($(KERNELRELEASE),)
# call from kernel build system
obj-m := dm9601.o
else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) LDDINCDIR=$(PWD)/../include modules
endif
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
depend .depend dep:
$(CC) $(EXTRA_CFLAGS) -M *.c > .depend
ifeq (.depend,$(wildcard .depend))
include .depend
endif






0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment