Jump to content
xisto Community
mm22

How To Use Usb To Lan Adapter In Linux Ubuntu R: install Windows drivers via ndisgtk

Recommended Posts

I wanted to add one more network interface to my desktop computer and the easiest way to do that was to purchase a USB to LAN adapter, i.e. one of those devices that plug into a USB port and let you connect a network LAN cable to it. Having two or more network interfaces on our PC lets us create several subnets, one of them can then be used to connect to the internet, the other one to conenct to another computer and so on.

 

As my USB to LAN adapter did not come with a Linux driver (or Mac for that matter, only Windows provided) I did some research in order to get it to work under Linux Ubuntu. The system somehow recognized the device whose presence appeared in /var/log/syslog but I didn't know how to use it for my purpose of connecting to a network. Either the driver was not installed correctly or further configuration steps were required. While looking for a solution I found a note on the Ubuntu help about installing Windows drivers on Ubuntu, by using a "wrapper" to convert them back to Linux. While the tool is mainly designed for wireless cards it worked well for me for the USB to LAN adapter, and I believe it could work for other devices.

 

Here is what I did (Ubuntu 9.04 Jaunty, USB to LAN device JP108)

 

open System>Administration>Synaptic Package Manager

search and install ndisgtk (a few more packages will be automatically installed)

open System>Administration>Windows Wireless Drivers

click on Install New Driver (an error might popup but didn't cause any harm for me)

select the inf file from your Windows drivers folder/disk (I chose the XP version in my case)

once the driver has been added you should be able to use Network Manager (icon in the application tray) to configure IP settings for the USB to LAN adapter (in my case I manually set the address to 192.168.0.2 so that I can connect to another computer directly connected via LAN cable)

Share this post


Link to post
Share on other sites

A little update on that. After restarting my computer I noticed I could not connect to the internet when both the on-board ethernet card (eth0) and the newly configured USB to LAN device (assigned to wlan0 by Ubuntu) were connected. I found out the problem was related to USB to LAN device becoming the default connection once it was activated. Looking to change the default connection I found many solutions involving changing configuration files and so on. But I found a way to do so in Network Connections manager (right-click tray icon and Edit connections...). From the Network Connections window change to Wired tab and Edit the connection referring to USB to LAN device (it is kind of confusing because the device is actually called wlan0 but it is not a wireless card and here it rightly appears where it belongs, wired connections). Go to the IPv4 tab and open Routes... Check the box "Use this connection only for resources on its network". In this way the connection will not be used as default, thus your other connection (e.g. on-board lan) will be the default and the one connecting to the internet. There are probably other ways to solve this, perhaps setting up manual routes, but I find it convenient using "automatic" settings whenever possible so that I can quickly change things if the physical configuration changes without having to mess around with static configuration files.

Share this post


Link to post
Share on other sites

I was able to use this model (JP108) nearly out-of-the-box using kernel 2.6.32-37-generic while enabling the kernel module dm9601 (for this issue, man modprob).

 

You can check your dmesg for any indication that the device (it's actual name is Davicom DM9601 USB Ethernet) did take an eth* network interface (for me, dmesg showed that it was eth1 before getting renamed to eth2).

 

Next, make sure that sudo ethtool eth* can read the device by showing it's info, if so, make sure that also it detects a plugged-in cable in the Link detected property.

 

In my case, I am using wicd to manage both my wired and wireless interfaces, and I needed to restart it's service, as well as configuring the wired interface to be eth2 through wicd-client.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.