How to set up your Racal InterLan NI5210 to work under Linux


I. Introduction.

This document includes step by step instructions which will help you to configure your Racal InterLan Network Card with NI5210B chipset. It is based on my experience while trying to set up my small home network in my appartment. I have heared that setting up a network card under Linux can be a pain in the butt but I really didn't have any idea it gets that nasty. Most of you probably know that Racal InterLan is not produced anymore since 1990-91. It is an old network card that has jumpers for memory addresses, RAM size, and IRQs. This seemed to be equal to Chinese when I first learned about the card but later it all started making sence. I would advise you however to get a little bit of information on the terms pointed above because you will only really understand how to set the jumpers if you know what they are really for. When you see the 18 jumper slots, please, don't get scared, it will all make sence at the end.

I will make a note here that my work on Racal InterLan NI5210B has been done on a Gateway 2000, People PC, Intel PI - 166, 586, 64 RAM, 2 HD (2.5G, 2G), running Red Hat Linux 7.0.

Why to choose Racal? The network card is old, and kinda slow, but look at it this way - you can probably purchase one for $ 2-5 from any computer show that deals old hardware parts It is totally neat for home networks because it doesn't really need a hub or anything else except the cable. So basically you save a good ammount of money and get to have a network in the house. Doesn't really get better than this!

II. Getting to know the "piece".

Let's look at the network card a little bit closer. There can be a bit of a confusion for those of you that don't really know about the network card hardware. Interesting things to see are some of the components of the network card that would eventually help you in deciding how to set the jumpers. The longest chip on the board is the processor. It is a 82586 LAN coprocessor. It's purpose is to handle the data carriage, transmission errors, data-link level processing data. It handles transmission as well as reception of that data and notifies the CPU that it has arrived. That's about as much as you'll need to know about it. The RAM that is built-in for it and it can be 8 or 16 Kbytes. The RAM holds data that was received and processed by the coprocessor, holds data that is ready to "go out" to the network, and it is a link between both processors (coprocessor and your PC CPU). Remember, if there is an empty slot on your network card this is probbaly an empty slot for extra RAM, and your card has probably 8Kb RAM. If you are a little bit curious as I am:), you will be very excited to know that the MAC address is written on a sticker on top of the chip that holds the 48-bit number. (Isn't this c00l:).
Before I start with the jumpers I need to tell you that in order to get the network card working you will need a BNC Thin-Ethernet cable. You will also need several other things as well. I will give you an example with what I have set up at home. For connecting 2 computers you will need 2 T connectors, 2 terminators (which are just resistors), and ofcourse some cable:)

III. The jumpers.

O.K. so far so good. Now let's look closely at the jumpers. There are 5 types of jumpers that perform different tasks. I will go through each individually to describe how changing the settings can affect the configuration. I will also provide you with a set of tables that can help you customise your own NI5210.

1. IRQ Jumpers.

I can say that IRQ jumpers are the easiest to set. There are numbers for IRQs and you put the jumper on the slot that you want. The slots are numbered from 2 to 7. On my machine I have planty of stuff hooked up and my only free IRQ was 8 and then 9. Now, apparently on Linux IRQ 9 = IRQ 2 (Don't ask me why) so the problem is solved. I advise you to put the setting the IRQ jumper to 2. For just in case to make sure something is not already there you can type in "cat  /proc/interrupts" which will give you a good listing of the IRQs that are already in use. This can be a pain sometimes. Some IRQs won't show up in "/proc/interrups". To see them you need to enter the BIOS of the compputer and write them down and then compare what you have written with the "/proc/interrupts". If you need some additional information about the status of the IRQs and the ISA and PNP devices on your system you can also try "isapnp" (read the manpage for it first if you want to understand anything at all:))

2. Input/Output Base Address

The I/O base address is an address in the PC by which the it identifies the piece of hardware. In operation the PC uses it to gain access to the NI5210 command and status registers. On the hardware part the jumpers are located in the bottom left corner next to the IRQ jumpers. The jumpers are included with tiny brackets with a title "IOBA" and are numbered 8 through 3. The original settings of the card are set to IOBA "0x360". Many of you probably can figure out that the IOBA MUST be different than any other address of expansion boards on the PC. This IO address must not overlap any other device address on the PC. NI5210 IOBA must be at least 0x8 less than any other BA on the PC.
Ok. Now to continue with calculating the IOBA. It is important to know that the IOBA starts at 0x200 and ends at 0x3f8. Knowing this imagine the following: 0x200 is 1 000 000 000 binary. What we really will need to pay attention here is the the values of the second to the seventh bits from left to right. Ok so imagine this

Value000000
Slot876543

Now. On the card board you can see marks A and B. A stands for 0 and B stands for 1. So let's say that you want to set your card with IOBA=0x360. 0x360 is 1 101 100 000. If you look at the mid 6 bits you will see 101100 so this is your settings: BABBAA. A and B means closer to A and closer to B. Note that the possible addresses start from 0x200(hex) => 1 000 000 000(bin) and end at 0x3f8(hex) => 1 111 111 000(bin). I think this is about as much as one needs to know to set up this type of jumpers.

Quick Reference Table:

Address HEXAddress BIN876543
0x2001000000000AAAAAA
0x2081000001000AAAAAB
0x2101000010000AAAABA
0x2181000011000AAAABB
0x2201000100000AAABAA
0x2281000101000AAABAB
0x2301000110000AAABBA
0x2381000111000AAABBB
0x2401001000000AABAAA
0x2481001001000AABAAB
0x2501001010000AABABA
0x2581001011000AABABB
0x2601001100000AABBAA
0x2681001101000AABBAB
0x2701001110000AABBBA
0x2781001111000AABBBB
0x2801010000000ABAAAA
0x2881010001000ABAAAB
0x2901010010000ABAABA
0x2981010011000ABAABB
0x2a01010100000ABABAA
0x2a81010101000ABABAB
0x2b01010110000ABABBA
0x2b81010111000ABABBB
0x2c01011000000ABBAAA
0x2c81011001000ABBAAB
0x2d01011010000ABBABA
0x2d81011011000ABBABB
0x2e01011100000ABBBAA
0x2e81011101000ABBBAB
0x2f01011110000ABBBBA
0x2f81011111000ABBBBB
0x3001100000000BAAAAA
0x3081100001000BAAAAB
0x3101100010000BAAABA
0x3181100011000BAAABB
0x3201100100000BAABAA
0x3281100101000BAABAB
0x3301100110000BAABBA
0x3381100111000BAABBB
0x3401101000000BABAAA
0x3481101001000BABAAB
0x3501101010000BABABA
0x3581101011000BABABB
0x3601101100000BABBAA
0x3681101101000BABBAB
0x3701101110000BABBBA
0x3781101111000BABBBB
0x3801110000000BBAAAA
0x3881110001000BBAAAB
0x3901110010000BBAABA
0x3981110011000BBAABB
0x3a01110100000BBABAA
0x3a81110101000BBABAB
0x3b01110110000BBABBA
0x3b81110111000BBABBB
0x3c01111000000BBBAAA
0x3c81111001000BBBAAB
0x3d01111010000BBBABA
0x3d81111011000BBBABB
0x3e01111100000BBBBAA
0x3e81111101000BBBBAB
0x3f01111110000BBBBBA
0x3f81111111000BBBBBB

3. Memory Base Address Jumpers.

The memory base address marks the beginning of the memory address in the memory space of the PC. This not only concernes the network card but also every expansion card on the PC. There are 4 jumpers for the MBA which are located under the IOBA marked with 17, 16, 15, 14. This is a little bit more weird. Imagine the number C0000. In binary - 1111 1111 1100 0000. The numbers 17, 16, 15, 14 are representing the 11, 12, 13, 14 bits from left to right in the number. So let's see what happens if the values are changed. So if you want to see how the card is set up (MBA wise) all you need to do is substitute 0 for A and 1 for B and voila. Note that the range here is from 0xC0000 to 0xEC000.

Quick Reference Table:

Address HEXAddress BIN17161514
0xc00001111111111000000AAAA
0xc40001111111111000100AAAB
0xc80001111111111001000AABA
0xcc0001111111111001100AABB
0xd00001111111111010000ABAA
0xd40001111111111010100ABAB
0xd80001111111111011000ABBA
0xdc0001111111111011100ABBB
0xe00001111111111100000BAAA
0xe40001111111111100100BAAB
0xe80001111111111101000BABA
0xec0001111111111101100BABB

4. Extended Memory Socket Jumpers Setting

The extended memory jumpers are located at the bottom of the row together with IOBA and MBA. they are noted as XME and XRE. I don't really know how to make the calculations on this set of jumpers so if anyone knows, please let me know. It is important to know that if you have:

Quick Reference Table:

SettingXMEXRE
8-Kbyte RAM1_
16-Kbyte RAM00
Optional Boot PROM Device01

The Boot PROM device is used for diskless system. The easiest way to determine whether the network card is 8 or 16 Kbytes is to look at the card itself and look for an empty extended memory socket. If there is one it means that it has 8K if there isn't -> it's 16K.
Now a few more words about the PROM. It figures that it is the place where the Ethernet source address assigned by the manufacturer is stored. In other words it contains the MAC. It allows the computer to boot from the network instead from a hardware device on the PC. Note that if you ever want to do that with NI5210 you will most likely need to set the MBA as the first boot device in the PC BIOS.

5. IBM PC XT Slot Selection Jumper(W27)

This jumper should be enabled only if the NI5210 is to be installed in slot 8 of an IBM PC XT or compatible. So I imagine most of you don't really need to enable it. Just leave it hanging on only ONE of the pins.

IV. Making it work

Now comes the last and best. After reading for 7 hours and going through minimum 60 web pages I finally managed to make my NI5210 work. As you can imagine I was pretty much pleased. Now comes the easy part. You need to put the configured card in the ISA PNP slot of your PC, close the lid and hook it up to the network. Turn on your PC and log in as root. Now go to:

/lib/modules/kernel version/net/

Check to see if you have the necessary module for NI5210. It should be called:

ni52.o

If you don't have it ... you will need to recompile your kernel adding support for it. If you have it - GREAT!
The command for adding the module is:

insmod ni52

There's another tricky part. This module cannot be automated so you need to manually pass parameters to it. NI5210 requires the following parameters:

io=IOBA's value
irq=IRQ setting
memstart=MBA's value
memend=MBA's value + RAM's value

All the values are clear except for the "memend" . You can calculate "memend" by adding 8Kbytes or 16 Kbytes (ofcourse converted in decimal and back to hex) to MBA's value. For example if you have 8K RAM this means you will have to add 8 x 1024 converted to hex to the MBA. For fast reference 8K is 2000(hex) and 16K is 4000(hex).
So your command line for NI5210 with IOBA=0x360, IRQ=9, MBA=0xd0000 and RAM=8Kbytes will be as follows:

# insmod ni52 io=0x360 irq=9 memstart=0xd0000 memend=0xd2000

This is the command used to enable to NI5210 card with factory settings. If they are changed I hope you will know how to calculate the new ones. However, I advise you to set the jumpers back to the factory settings and perform the upper command. Now all you need to do is set up your network parameters with linuxconf and restart the network deamon with:

/etc/rc.d/init.d/network restart

If you don't want to do this again after restarting your computer (and I think you don't:)) you can add the following lines in:

/etc/modules.conf
alias eth0 ni5
options ni52 io=0x360 irq=9 memstart=0xd0000 memend=0xd2000

And there you go! It works! Have fun!:)