Installing RTL8139D NIC on Linux

From Wiki

Despite signs with Realtek chipset RTL8139D have support in the kernel, other manufacturers make false copies of these nics.

If modules with 8139too or 8139cp didn´t work for you, then the procedure below can help you.

This procedure worked for the following type of card:

 Hangzhou Silan Microelectronics Co., Ltd. RTL8139D [Realtek] PCI 10/100BaseTX ethernet adapter (rev 01) 

Thanks to LonelySpooky


Note 1: You must have the kernel-headers or linux-headers and kernel-devel installed

Note 2: You need to install the driver in Windows XP


Checking the model of your NIC

1. Initially we will examine your NIC model

 # lspci -v 
 
 00:08.0 Ethernet controller: Hangzhou Silan Microelectronics Co., Ltd. RTL8139D [Realtek] PCI 10/100BaseTX ethernet adapter (rev 01) 
        Flags: bus master, medium devsel, latency 32, IRQ 193 
        Memory at df000000 (32-bit, non-prefetchable) [size = 256] 
        I / O ports at 9000 [size = 256] 
        [virtual] Expansion ROM at 10000000 [disabled] [size = 128K] 
        Capabilities: [50] Power Management version 2 
        Capabilities: [60] Vital Product Data 


Installing Ndiswrapper

Here we use the Ndiswrapper, which is a project that implements the NDIS API on linux.


2. Download Ndiswrapper:

 http://sourceforge.net/project/showfiles.php?group_id=93482 

or

 wget http://ufpr.dl.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-1.53.tar.gz 


3. Unpack the file:

 # tar -xzvf ndiswrapper-1.53.tar.gz 


4. Enter the directory:

 # cd ndiswrapper-1.53 


5. Compiling

 # make 

6. Installing Ndiswrapper

 # make install 


Installing the NDIS Driver

7. Create the directory

 # mkdir -p /usr/local/sbin/driversxp/ 

and copy the Windows XP drivers for it. Files netslnt.inf,readme.txt,slnt.sys


8. Install the Windows XP driver with the command

 # ndiswrapper -i /usr/local/sbin/driverxp/netslnt.inf 

9. Run depmod

 # depmod -a 


10. Loading the module Ndiswrapper

 # modprobe ndiswrapper 


Setting up the card

11. Configure the interface:

 # ifconfig wlan0 <ipaddress> 

ex.: ifconfig wlan0 192.168.1.10


12. Run ndiswrapper -m

 # ndiswrapper -m 

13. Checking

 # ifconfig wlan0 
 
 wlan0 Link encap: Ethernet HWaddr 00: E0: 4E: 21: F8: 29 
          inet addr: 192.168.1.10 Bcast: 192.168.1.255 Mask: 255.255.255.0 
          inet6 addr: fe80:: 2e0: 4eff: fe21: f829/64 Scope: Link 
          UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1 
          RX packets: 118815 errors: 0 dropped: 0 overruns: 0 frame: 0 
          TX packets: 103442 errors: 0 dropped: 0 overruns: 0 carrier: 0 
          collisions: 0 txqueuelen: 1000 
          RX bytes: 85109884 (81.1 MiB) TX bytes: 17099046 (16.3 MiB) 
          Interrupt: 193 Memory: df000000-df000100 


14. For the module to be loaded at startup, the file modprobe.conf add the line:

 alias wlan0 ndiswrapper 


Example file / etc/sysconfig/network-scripts/ifcfg-wlan0

 TYPE = Ethernet 
 DEVICE = wlan0 
 BOOTPROTO = none 
 Netmask = 255.255.255.0 
 Ipaddr = 192.168.1.10 
 GATEWAY = 192.168.1.254 
 ONBOOT = yes 


tags: rtl8139 linux driver rtl8139d