Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

National Instruments PCI-232I(4) Not working under Centos 5.2 or Redhat 5.1

We have had the PCI-232 installed under Redhat 3.3 and now are looking to move to a more modern OS. We are going to eventually look at a hard ware update but this is far away from where we are now.

 

Under Redhat 3.3 I had to copy over the setserial options into /etc/rc.d/init.d/serial so that linux new to setup the serial ports. In that we reserved the memory for each of our 5 NI PCI-232 Cards.

 

We then in /etc/serial.conf had an entry for each port /dev/ttyS4 port 0x6000 uart 16550A irq 10 ^fourport. This all worked and the ports would work straight away.

 

On Centos However the port devices do not exist by default. I have managed to get the system to believe it has the devices installed and entered the above command elsewhere to allow the setup of the ports. However now it is almost like the operating system is not operating the cards.

 

lspci -v -n -d 1093:* shows up 5 cards with the IRQ's and Memory space that is in all our other machines.

 

Prior to me manually running setserial the device says port 0x0000 irq 0 uart unknown.

 

 

0 Kudos
Message 1 of 5
(3,979 Views)

Hello Yanto,

 

I have looked into your post on the forum.  I understand that you are trying to use the NI Serial PCI cards after moving a different distro of Linux.  The best way to start investigating this is to look into the kernel versions.  Please compare the kernel you were using with Redhat 3.3 and that of CentOS 5.1.  Because of the different in date of release between them, it is likely that you are installing different versions. 

 

In a Terminal window, please use the following command, and reply with the result for each OS.

 

$ uname -r

 

Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 2 of 5
(3,955 Views)

Hi Yanto,

 

As you suggested it may be that the driver simply isn't binding to the hardware.  After you run through the steps to associate the hardware with the driver can you run:

 

dmesg | grep ttyS

 

I would expect to see something like the following for each of the ports:

 

serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0a: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

 

If you don't see anything for each of the ports then I don't think the driver is binding to the hardware.  One reason this may happen is that you may have more ports than the kernel has been configured to support.  You may want to add "8250.nr_uarts=16" (or however many ports your machine will have) to your kernel boot line in /boot/grub/menu.lst

 

Additionally you may be interested in knowing that we are working on adding support to the Linux kernel for both the legacy RS232 and 843x RS232 devices.  Once this goes into the kernel you won't need to do any extra configuration steps everything should just work.  Unfortunately this won't happen until kernel 2.6.30 at the earliest.  If your comfortable building/patching your own kernels the patches are:

 

Patch1

Patch2

 

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 3 of 5
(3,935 Views)

Hello,

 

This definately seems linked to the change in kernel but that is the whole point of why we are upgrading. In order to move to a newer kernel hoping that it will have better support of hardware. The systems are 4 years old and are running on IDE. We have just gone through trying to get linux to run on SATA hardware and found it a pain (more so in laptops) so we wanted to try and catch up on our current hardware first before moving to new hardware.

 

Current System
2.4.21-20.EL

 

New System

2.6.18-92.el5

0 Kudos
Message 4 of 5
(3,930 Views)

Hello Shawn,

 

I have used the command 8250.nr_uarts=24 as we have 2 on board ports 0 and 1 and 2 that use a slightly different memory address than the on board ones (this is the same on our old system) Then we have /dev/ttyS4 - /dev/ttyS23 as 5 x PCI-232(4) cards.

 

The grep of dmesg is exactly as you say in your post. Im not sure where this serial 8250/16550A Revision 1.90c is running from but that seems to work fine.

 

I have managed to run setserial manually on the ports but I get Input/Output errors. When I set them manually everything looks correct it just does not work.

 

It should be noted however that on our old system when you grep dmesg there is nothing that proves the other 20 ports have been setup. The original 2 show up but its using a different serial driver that is obviously not used in the 2.6 kernel.

 


Serial driver version 5.05c (2001-07-08) with MANY_PORTS MULTIPORT SHARE_IRQ SER
IAL_PCI ISAPNP enabled
ttyS0 at 0x03f8 (irq = 4) is a 16550A
ttyS1 at 0x02f8 (irq = 3) is a 16550A
 

This is the output on Dmesg.

 

On our old systems we simply use /etc/rc.d/init.d/serial which is a copy of /usr/share/doc/setserial-2.17/rc.serial with memory range intenable's added on.

 

Then in the serial.conf we use /dev/ttyS4 uart 16550A port 0x6000 irq 10 ^fourport.

There is a message shown similar to  ttyS1 at 0x02f8 (irq = 3) is a 16550A for each of our 20 ports but this is not recordd in the dmesg.

 

I have found that despite setserial being the same version it does not work with the command above. It will only work if you use the baud_base 115200 argument also otherwise it returns invalid argument.

 

regards

 

Chris

0 Kudos
Message 5 of 5
(3,928 Views)