Bridging the gap between CCIE RS and SP

March 10, 2009

Sunrising USB Ethernet adapter driver

Filed under: dynamips — Tags: , — 21500 @ 5:20 pm

This is a bit off topic but there is nothing on the net so I guess I’ll make a post. I bought a whole batch of these no name brand usb adapters for dynamips just to find there is no linux driver for it. Since the Windows driver name is SR9600 if had a suspicion that the Davicom 9601 driver will be compatible, it is, but it needs a tweak to make it work. Its simple, the driver needs to know the device code of the adapter so that the driver will recognize the hardware. This can be done with any no name usb device without a linux driver thats compatible with the dm9601 driver. First this is to find the hardware/vendor code:

lsusb
Bus 002 Device 004: ID 0fe6:8101

Ok then we need to download the source of the dm9601 driver because we are going to compile again. I did a search on google which lead me to this thread: http://ubuntuforums.org/showthread.php?t=483189 which is a good read and also explain how to tweak the driver. The driver source can be downloaded here.

Once you have the driver unzip it and open the dm9601.h file. At the end insert the following:

DM9601_DEV( “SUNRISING USB Ethernet”, 0×0fe6, 0×8101,
DEFAULT_GPIO_RESET )

Then compile the driver with ‘make’. Sounds easy but here I ran into trouble with most of the files needed for the compile were not available. So I had to run:

apt-get install build-essential linux-headers-$(uname -r)

Depending which kernel version you are running you might have to open the dm9601.c and rename the config.h to autoconf.h. After I did this the driver compiled successfully.  Replace the existing module with the new one. To manually install the driver

insmod /lib/modules/2.6.27-7-server/kernel/drivers/net/usb/dm9601.ko

I noticed that I could run only one of these devices at a time. Got this error when more than one device was plugged in:

ifconfig eth1 up
SIOCSIFFLAGS: Cannot assign requested address

Hope that helps someone somewhere.

Update:
The XP drivers can be downloaded at:
http://broadxend.exolution.net/sr9600.zip
http://piaget1.exolution.net/sr9600/sr9600.zip
http://21500.net/store/sr9600.zip

29 Comments »

  1. Hi – I have on of these USB-Ethernet adaptors with vendor ID 0FE6/8101 but cannot find the windows drivers anywhere. Could you tell me where you got it please?

    Comment by Dean Odley — March 12, 2009 @ 5:22 pm

  2. Hi Dean, email sent, please check and let me know.

    Comment by 21500 — March 12, 2009 @ 6:40 pm

  3. Hi,

    I was wondering where I could find the Windows driver for the device as well. Any help will be greatly appreciated!

    Thanks!

    Comment by Mantissa — April 9, 2009 @ 8:37 am

  4. Email sent. I tried to upload them to some of the driver sites without any joy.

    Comment by 21500 — April 9, 2009 @ 1:36 pm

  5. Thanks for helpful post.
    My card is werid. I have to plug it in and out several times to make it working.
    I can use more than one card.
    Cheers!

    Comment by ciastek — May 7, 2009 @ 11:47 pm

  6. for those who wanted the win xp driver, currently you can download at
    http://broadxend.exolution.net/sr9600.zip or http://piaget1.exolution.net/sr9600/sr9600.zip.

    Btw I still need a reliable way to compile dm9601.c to work with sr9600 properly in OpenSuse 11.1. Thanks.

    Comment by Exolution — May 21, 2009 @ 4:25 am

  7. hi, I compiled the module under slax, the interface is there but I have 00:00:00:00:00:00 as mac address, I can not use even a single one, any idea?

    Comment by gedeon — May 21, 2009 @ 6:39 am

  8. Have you tried to set the mac address:
    ifconfig eth2 hw ether 00:22:22:22:22:22

    Comment by 21500 — May 21, 2009 @ 6:48 am

  9. Solved !!
    just give the port a mac address manually

    ifconfig eth0 hw ether 00:00:5e:00:fa:ce

    Comment by gedeon — May 21, 2009 @ 7:14 am

  10. Hi 21500, I have it device on my Computer, I’ve try to compiled it but I got some errors…

    sudo make
    make -C /lib/modules/2.6.27.24-170.2.68.fc10.i686/build M=/home/pai/dm9601.new/dm9601-2.6 LDDINCDIR=/home/pai/dm9601.new/dm9601-2.6/../include modules
    make[1]: Entering directory `/usr/src/kernels/2.6.27.24-170.2.68.fc10.i686′
    make[1]: Warning: File `/usr/src/kernels/2.6.27.24-170.2.68.fc10.i686/arch/x86/Makefile_32.cpu’ has modification time 1.5e+07 s in the future
    scripts/Makefile.build:46: *** CFLAGS was changed in “/home/pai/dm9601.new/dm9601-2.6/Makefile”. Fix it to use EXTRA_CFLAGS. Stop.
    make[1]: *** [_module_/home/pai/dm9601.new/dm9601-2.6] Error 2
    make[1]: Leaving directory `/usr/src/kernels/2.6.27.24-170.2.68.fc10.i686′
    make: *** [default] Error 2

    it’s there I missing up???

    Thanks in advance…

    Comment by pias — July 10, 2009 @ 8:58 am

  11. Hi, Just to say thanks!! Works fine after the tweaks you mentioned. As I recall, as well as the USB ID and autoconf change I also had to comment out the CFLAGS in the make file i.e.

    #CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR)

    Comment by Chris Rutherford — July 21, 2009 @ 10:14 pm

  12. Hi, I have followed your steps. I could compile with no problem and loaded the driver (insmod)… But still it seems as the driver is not recognizing my device. Both lsusb and dmesg show the same output as before.. Also ifconfig returns no device.. Do you have an idea of how could I debug this or if there is a workaround. I am using mepis 2.6.27 kernel..
    Thanks

    Comment by rafael — August 17, 2009 @ 6:20 pm

  13. Hi Rafael, is your usb device a SR9600 and if not, are you sure the Davicom driver is compatible?

    Also I am not familiar with mepis, does it auto detect usb devices e.g flash disks? I would attempt to bring the device up without the automated utilities and try the ifup and ifdown scripts. Hopefully this would give you some useful error to google.

    Good luck

    Comment by 21500 — August 17, 2009 @ 9:32 pm

  14. Hi,

    Thanks for your reply .

    lsusb returns me Bus 002 Device 004: ID 0fe6:8101 so i think my device is SR9600 …

    I usually have to mount manually usb devices.

    I tried ifup eth0, but that does not work. Is there a special command to mannualy create the device?

    Tomorow I will take a deeper look…

    I will post the solution I eventually find in a comment to help others…

    bye

    Comment by rafael — August 17, 2009 @ 10:39 pm

  15. I finally made it work… Just installed a new antix version with a newer kernel. But, although ifconfig eth0 returns me a device, it is usuless… dhclient3 fails to connect. arg…

    Comment by rafael — August 18, 2009 @ 5:12 pm

  16. Also check the mac address, you might need to assign it manually:
    ifconfig eth0 hw ether 00:22:22:22:22:22

    Comment by 21500 — August 18, 2009 @ 9:23 pm

  17. I have the same problem.
    Do you solved it?
    Thanks

    Comment by giurti — September 16, 2009 @ 5:04 pm

  18. Hi everyone.

    Well, let me explain my experience.
    I have the same device, and I have 3 devices working very well at same time.

    1. Follow this post, compile and install the driver.
    2. You will see your new interface, but you need to change the MAC address to do it work, one option is: ifconfig eth1 hw ether 00:11:22:33:44:55
    3. If you have many devices you need to change the MAC address to all devices. But with ifconfig you couldn’t do. The only options that I found, is to use a program called macchanger. Once you change the MAC address of every device you can use it with any problem :D .

    Well, sorry for the english, thats all that I have to say.

    Comment by aldorm — October 3, 2009 @ 12:27 am

  19. Hello! thanks for your tutorial. I am facing a problem when compiling the modified .h file. The error goes as follows:
    [root@luiskr dm9601-2.6]# make
    make -C /lib/modules/2.6.27.25-78.2.56.fc9.i686/build M=/home/evilcat/dm9601-2.6 LDDINCDIR=/home/evilcat/dm9601-2.6/../include modules
    make[1]: Entering directory `/usr/src/kernels/2.6.27.25-78.2.56.fc9.i686′
    scripts/Makefile.build:46: *** CFLAGS was changed in “/home/evilcat/dm9601-2.6/Makefile”. Fix it to use EXTRA_CFLAGS. Stop.
    make[1]: *** [_module_/home/evilcat/dm9601-2.6] Error 2
    make[1]: Leaving directory `/usr/src/kernels/2.6.27.25-78.2.56.fc9.i686′
    make: *** [default] Error 2
    [root@luiskr dm9601-2.6]#

    I havev other ehternet-usb device previously configured that works perfect.

    [root@luiskr dm9601-2.6]# /sbin/lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 005 Device 003: ID 0fe6:8101
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 002: ID 0a46:9601 Davicom Semiconductor, Inc. DM9601 Fast Ethernet Adapter
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 002: ID 413c:8103 Dell Computer Corp. Wireless 350 Bluetooth
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    [root@luiskr dm9601-2.6]

    Thanks for your help!

    Comment by Evilcat — October 16, 2009 @ 4:52 am

  20. I make it work. but it have nothing when i reset computer.Have any method make this usb device boot with system?

    Comment by chai — October 27, 2009 @ 6:15 am

  21. hi, i have the 9600 usb/ethernet adaptor, but it wont install on vista. cana anyone help?

    Comment by Ryan Allan — November 5, 2009 @ 5:01 pm

  22. Any drivers for MAC OS???

    Comment by madaleno — December 13, 2009 @ 9:48 pm

  23. A some man… you make 3 day of my hard day with ndiswrapper have a solution. I’m very happy to find a way that familiar with me like compile it.

    Thanks Brow.

    Comment by 5untucH — December 28, 2009 @ 11:54 pm

  24. I have a similar problem. I bought a usb ethernet adapter(of some company ENTER). And I can’t get it run on my ubuntu 9.10. It works fine on windows xp with SR9600 driver. I have tried following the directions here without success. My lsusb output gives the same device id as posted here by you. Please help

    PS: This is the only adapter available around here and my lan port is busted

    Comment by Amartya — February 3, 2010 @ 5:20 pm

  25. I was able to compile the module for my kernel. After restart, sudo modprobe dm9601 in few second recognizes my device. But device will not show when I try ifconfig it is not listed. When I try sudo ifconfig eth1 up I’ve receive

    SIOCSIFFLAGS: Cannot assign requested address

    Anyone??

    Comment by Marko — February 19, 2010 @ 2:48 pm

  26. this usb dongle is directly suported with the kernel 2.6.31.12 as I am using fedora 12 and all I had to do was stick it into the usb port. few months ago I was using ubuntu 9.10 and had to compile the driver.

    Comment by william — March 4, 2010 @ 10:15 pm

  27. concerning to the error listed above, make sure you’re using a usb 2.0 port and that you have enough power suply. I tried to use it with an old toshiba laptop using debian lenny. the laptop only had usb1.0 and the dongle did not work at all. so I installed a pcmcia-usb2.0 card and everything went fine.

    Comment by william — March 4, 2010 @ 10:19 pm

  28. Hi,
    can anyone post the compiled driver, the .ko.gz file with the sunrising usb ethernet line, because i’m using endian firewall and there is no compiler installed there.
    Thanks in advane !!! and thanks for the help.

    Comment by arif — April 15, 2010 @ 5:30 am

  29. Will this work with FreeBSD? I’m trying to get it to work with pfSense

    Comment by Jose — August 10, 2010 @ 6:49 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress