I me and Linux

Friday, May 26, 2006

Getting RealTek 8139D network card working in linux

If you have bought the RealTek 8139D Ethernet card and found that it doesnt work under linux, then well dont worry. All is not lost. There is a software called "ndiswrapper" to rescue your card.
It is a project to get the wireless cards runing under linux. These cards generally dont come with drivers for linux. So what this project does is it uses the windows driver itself to make the device work.
In their own words
"This project implements Windows kernel API and NDIS (Network Driver Interface Specification) API within Linux kernel. A Windows driver for wireless network card is then linked to this implementation so that the driver runs natively, as though it is in Windows, without binary emulation.
With ndiswrapper, virtually every miniPCI (builtin), PCI, PCMCIA (Cardbus only) or USB wireless network card works in Linux. Although ndiswrapper is intended for wireless network cards, other devices are known to work: e.g., USB to serial port device, ethernet card, home phone network device etc. See Wiki entry List for devices known to work."
So you can use your network card in linux aswell.Only difference is that it is now "wlan0" instead of "eth0".

How to get it to work.

If your distribution provides the ndiswrapper package the go to configuration step directly.

If your distribution doesnt provide it then,

First download the stable ndiswrapper software. To get it go to their site and follow the links there to get to the download page. Always use the stable version.

http://ndiswrapper.sourceforge.net

once you have downloaded the package, extract it somewhere.

tar -zxvf ndiswrapper-.tar.gz

cd into the extracted directory and

cd ndiswrapper-

issue the following commands as normal user

make clean
make

now become root user using su and do the following
su
make install

Configuring the ndiswrapper

Once it is installed we proceed to configure the ndiswrapper to get the card working
You need the card's driver for windows, preferably windowsxp's drivers. Copy it to some location where you can access it.
suppose they are in current directory do the following
first cd into the drivers directory and then give the following command

ndiswrapper -i netslnt.inf

next load the ndiswrapper kernel module

/sbin/depmod (not required but, just in case)
/sbin/modprobe ndiswrapper

to load the module next time automatically do this

ndiswrapper -m

this adds the line

alias wlan0 ndiswrapper

to your /etc/modprobe.conf

now to check if your network is working run the folowing commands as root user

ifconfig wlan0 ipaddress
route add default gateway gateway-address

This is only temporary solution to access the internet.
Once the card is working you can follow your distributions way of configuring network. Only mind that now your card is wlan0 and not eth0.

I hope this helped.
Good luck.

0 Comments:

Post a Comment

<< Home