FREESCO 0.2.7 Plug And Play HOWTO

FREESCO 0.3.x has Plug And Play built in, it can be enabled through setup. A lot of the info in this howto does still apply however.

Plug and Play (usually abbreviated to PnP) devices are designed to automatically allocate themselves IRQ's, DMA's, memory addresses and I/O ports to avoid hardware conflicts and to make life easier.

In reality, plug and play is still a bit of a headache, especially in Linux. PCI cards are truly PnP in that they normally sort themselves out. ISA cards are, however, not capable of this and need some prodding in the right direction. Linux distributions use a set of tools called the ISAPnP Tools ( http://www.roestock.demon.co.uk/isapnptools/ ) to help configure any ISA PnP cards in the system on boot time.

Because Freesco is Linux, these tools can also be used on Freesco, although some manual configuration is required. This should hopefully mean that those old ISA PNP cards that you don't have the driver disks to or that can't be set to a mode where they occupy a fixed IRQ and port can now be used with Freesco.

But how do you go about this? It's quite simple, really. First, make sure that any cards that you want to be PnP are installed on the Freesco machine (it doesn't matter that they don't work yet) and are set to PnP mode (usually in the card's DOS or Windows device drivers, or by default for many cards).

Now, download the ISA PnP Tools from our 3rd Party Unclassified Page. They are for both the Linux and the DOS environments but here we will deal purely with the Linux configuration, which is easier to meddle with on an already-running Freesco machine. There is also a link to a single file isapnptools_compiled.zip which contains just the two Linux files needed and no documentation.

From the archives, compile and / or extract the isapnp and pnpdump programs and put them onto the Freesco machine somehow (Samba, FTP, floppy disk, something like that). We recommend putting them into the /rc/rcuser directory and will assume you have done so too. Now run the pnpdump program like so:

/rc/rcuser/pnpdump -c -o /mnt/router/etc/isapnp.conf

This will create a file called /mnt/router/etc/isapnp.conf which contains a single, example configuration already uncommented. Load this file up into your favorite text editor. Reading through this file, you should see card entries such as:

...
# Card 1: (serial identifier xx xx xx xx xx xx xx xx xx)
# Vendor Id WSC8019, Serial Number xxxxxxxxxx, checksum 0x48.
# Version 1.0, Vendor version 1.0
# ANSI string -->Plug & Play Ethernet Card<--
#
# Logical device id RTL8019
# Device supports I/O range check register
#
# Edit the entries below to uncomment out the configuration required.
# Note that only the first value of any range is given, this may be changed if required
# Don't forget to uncomment the activate (ACT Y) when happy
(CONFIGURE WSC8019/xxxxxxxxxx (LD 0
# Compatible device id PNP80d6
# Logical device decodes 10 bit IO address lines
# Minimum IO base address 0x0220
# Maximum IO base address 0x0380
# IO base alignment 32 bytes
# Number of IO addresses required: 32
(IO 0 (SIZE 32) (BASE 0x0220) (CHECK))
# IRQ 3, 4, 5, 9, 10, 11, 12 or 15.
# High true, edge sensitive interrupt
(INT 0 (IRQ 3 (MODE +E)))
(NAME "WSC8019/xxxxxxxxxx[0]{Plug & Play Ethernet Card}")
(ACT Y)
))
...

This is an example of just one ISA PnP device (if you have more than one, you'll see multiple entries). To decide if this is the card you need configured (i.e. the network or modem card rather than the video card, sound card or other ISA PnP device), look for the ANSI string or the NAME entry (both of which here identify our device quite clearly) or, if not, the “Logical device id” (which in this case is RTL8019, a chip commonly used on NE2000 network cards).

You should really totally comment out any devices that you won't be using in your machine, such as any sound cards, joystick ports, MIDI cards, video cards etc. Sometimes a single card may have multiple card entries (e.g. a sound card usually has it's own joystick port, MIDI port and several chips to do it's job). You can comment out these entries by putting a # symbol at the start of any line that doesn't already have one inside the entry (or entries) for that card.

The device entry for any device starts with a # Card number and ends with the double brackets line after the ACT Y command. Thus, if you are trying to comment a particular section out, you should comment out all lines between the # Card and the )) lines, including the )) line. Be careful not to comment any lines which are not inside a # Card … )) entry as some lines not inside these entries contain vital commands to detect, initialize and finalize the configuration (such as READPORT and WAITFORKEY).

Once you have isolated the card entries you need and commented out all other card entries, you now need to configure those remaining. Between the #Card … )) lines, those commands that are not #'d are those that have been chosen (by pnpdump) to configure the device. These are not the ideal settings and may not even work as no account has been taken of whether they could possibly conflict with other devices. You'll notice that they are simply the first available slots.

Each resource needed (normally only IRQ's and IO ports) has a valid range for the computer it was run on. Here, for example, we can see the limits of the ranges in the lines:

...
# Minimum IO base address 0x0220
# Maximum IO base address 0x0380
...

# IRQ 3, 4, 5, 9, 10, 11, 12 or 15.

Viewing the Linux files /proc/interrupts and /proc/ioports with the more command:

more /proc/interrupts
more /proc/ioports

will give us a list of the currently used IO ports and IRQ's on our computer, thus eliminating any possibility of a conflict. We can then change the lines in isapnp.conf which specify the IRQ and IO port to match free spaces in our machine. In the example above, we could change the IRQ and IO port to our desired settings (say we knew that IRQ 9 and IO port 0×240 were free) by changing the lines to read:

...
(IO 0 (SIZE 32) (BASE 0x0240) (CHECK))
...
(INT 0 (IRQ 9 (MODE +E)))

Be very careful to preserve the other text, the bracketing and the formatting of the file when you do this. We at From Scratch have also found it necessary to remove any (CHECK) statements in the file, as this instructs isapnp to try and see if the specified port is free, which can cause either lockups or the configuration program to exit with Fatal errors (which do not indicate fatal hardware problems, merely an unrecoverable error when trying to allocate a particular device to a particular IRQ or IO port). Thus, we recommend you do the same by removing any (CHECK) command. Our first line from above is now:

(IO 0 (SIZE 32) (BASE 0x0240))

Notice that the nesting of brackets must be correct, that is the number of open brackets must equal the number of closed brackets. Now that the configuration has been made, we can save our changes and try it out using the isapnp command:

/rc/rcuser/isapnp /mnt/router/etc/isapnp.conf

If all goes well, there should be no FATAL or ERROR messages running this command and the card(s) will now be using the IRQ and IO port we specified in the file. If there are any FATAL messages, reading the lines will help determine the problem. Usually, this is either an already-used IO port or IRQ which the program has detected from the /proc files or, if nothing else, just a plain conflict. Try changing the values to the next most convenient and trying again.

If the program locks the machine, this is also a bad sign. :-) . Reboot, edit the file again and choose different values.

If the procedure does manage to successfully configure the card, it's a simple matter of making the changes happen on boot up every time. This can be done by placing the following line near the top of your /rc/rc_init file:

/rc/rcuser/isapnp /etc/isapnp.conf

You should then reboot the machine. Hopefully, the same success message will appear in the system logs on each bootup and you can configure Freesco as normal using the setup program, stating the IRQ and IO port you chose for the devices in the isapnp.conf file as and when you are prompted for them.

Now, for those who use floppy installations of Freesco, some space-saving tips. Firstly, the pnpdump program only need be run on the Freesco machine once (and it must be the machine you will be using Freesco on. Another, even identical, machine will not have the same configuration available to it) and pnpdump doesn't require the isapnp program to run. Therefore, you can copy pnpdump to the Freesco machine on it's own, then run it as above once, after which it can be deleted, so long as you keep the isapnp.conf file it generates. Then you can copy across the isapnp program and try it out, editing the isapnp.conf file as needed. Obviously, isapnp and isapnp.conf must stay on the floppy to be run every time you boot from it. They should fit on a standard Freesco floppy comfortably.

Also, the isapnp.conf configuration file is heavy on comments (lines beginning with #) which, once the program is confirmed working, can be removed without changing the configuration (although it will be a little harder to determine what's going on). We suggest removing any #'d line, except for those that specify valid IRQ and IO ports for the device.

We've successfully used this method to allow a PnP NE2000 compatible card (which has both fixed IRQ and PnP modes) to be loaded in either mode on a Freesco router and work as normal. Here at From Scratch, we prefer using Trust ISA cards and have bought several of Trust's ISA Network Starter Kits (which include two ISA cards, all necessary T-pieces and terminators and a ten meter RG58 coax cable).

Unfortunately, these kits are no longer made but can still be found. Trust have a good reputation with ourselves and we will usually check Trust's website before we buy any product to see if they have their own version. We suspect that their Gamers Network Kit, their PCI network kit and similar will be just as configurable. We also recommend their external 56K modem as this is a good, cheap, hardware, Linux-compatible modem.

We've found Trust products to be reliable, with good drivers for many platforms, excellent support, cheap price and very standard. And no, we don't work for them or get any money for saying that. :-)

Good luck on your own endeavors!

 
freesco/howtos/plug_and_play.txt (97485 views) · Last modified: 2005/09/14 00:49 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki