scientificlinuxforum.org QR code
Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> Questions regarding PCI cards for serial and GPIB communication
michael
 Posted: Apr 21 2012, 09:31 PM
Quote Post


SLF Newbie


Group: Members
Posts: 4
Member No.: 1488
Joined: 21-April 12









Greetings,

I am considering migrating to SL (or a RHEL equivalent) from Fedora for the primary machine in my lab. Stability is very important to me and I no longer want to tremble in fear each time I run 'yum update'.

I've already got SL 6.2 on the machine I'd like to use and the install was uneventful.

The main software I use (the thing that must run) is quite compatible with RHEL derived distributions and has good support. They even recommend Centos or SL as the base operating system. So that's not an issue. (http://www.certif.com/)

The main hardware point that will potentially cause issues are the PCI expansion cards. In short I need several serial ports (more than 4, but let's leave it at 4 for now so that I can hopefully avoid compiling the kernel for the time being) and GPIB communication. How I get the exact number serial ports can be negotiated between PCI cards and USB to serial adapters.

I have to communicate to several pieces of hardware (motor controllers) that use serial ports. Right now I've got:

a handful of Gigaware usb-to-serial adapters
Koutech dual serial card, model PS220 (Timedia PCI2S550 below)
Startech single PCI express card, model PEX1S553LP (NetMos 9900 below)
Startech 8 port adapter that we're just not going to worry about right now.

The GPIB card came from NI and I don't suspect it will be a problem (it's important, but let's place it at one step below getting the serial lines).

A much smaller hardware requirement is getting a couple of USB cameras to work so I can view things remotely. But that is both not required, and probably much easier.

Now... putting this together and using : setserial -g /dev/ttyS*

/dev/ttyS0, UART: 16550A, Port: 0xd0c0, IRQ: 17
/dev/ttyS1, UART: 16550A, Port: 0xd0c8, IRQ: 17
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3

below you'll find a shortened version of lspci -v for the relevent cards :

03:01.0 Serial controller: Timedia Technology Co Ltd PCI2S550 (Dual 16550 UART) (rev 01) (prog-if 02 [16550])
Subsystem: Timedia Technology Co Ltd SER4037A (2x RS232 port)
Flags: stepping, medium devsel, IRQ 17
I/O ports at d0c0 [size=32]
Kernel driver in use: serial

03:02.0 Communication controller: National Instruments PCI-GPIB (rev 02)
Subsystem: National Instruments PCI-GPIB
Flags: bus master, medium devsel, latency 32, IRQ 4
Memory at fe504000 (32-bit, non-prefetchable) [size=2K]
Memory at fe500000 (32-bit, non-prefetchable) [size=16K]

04:00.0 Serial controller: NetMos Technology Device 9900 (prog-if 02 [16550])
Subsystem: Device a000:1000
Flags: fast devsel, IRQ 18
I/O ports at c000 [size=8]
Memory at fe401000 (32-bit, non-prefetchable) [size=4K]
Memory at fe400000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [50] MSI: Enable- Count=1/8 Maskable- 64bit+
Capabilities: [78] Power Management version 3
Capabilities: [80] Express Legacy Endpoint, MSI 00
Capabilities: [100] Virtual Channel <?>
Capabilities: [800] Advanced Error Reporting

So, it would seem it finds the Koutech card (as setserial and lspci both report IRQ 17). That's good.

It's a little worrisome that the computer tries to configure /dev/ttyS2 on the same IRQ as what it's assigning to the GPIB card, but I think that can be reassigned easily enough(?).

But I am unable to get anything transmitted over the serial lines. Going so far as to run two instances of minicom (one for ttyS0 and one to ttyS1), connecting them while reversing the transmit/receive pins, and absolutely nothing goes out and comes back.

Similar results occur when I try /dev/ttyUSB0 and /dev/ttyUSB1

And while "lspci" finds the startech card single port pic-e card, it does not configure at all.

Sadly the computer does not have serial ports built on the board (at least that I am aware of and can use).

If I can get 3-4 serial ports, then we'll be in business (functionally controlling the hardware from the computer) and everything else can be worked through as time allows.

The cards and usb-serial adapters (as well as the GPIB card) worked under FC 15 and 16, so I don't think there's a huge incompatibility issue, nor is it likely that the hardware died.

Any suggestions or help would be appreciated. I could easily be missing something simple.

thank you,

Michael
PM
^
michael
 Posted: Apr 22 2012, 09:16 PM
Quote Post


SLF Newbie


Group: Members
Posts: 4
Member No.: 1488
Joined: 21-April 12










Update...

After spending a bit of time(too much) playing with things the USB-serial adapters now talk over minicom, as does the Koutech dual port card! I have yet to actually get the primary software to communicate over the ports, but it does look like at a hardware level things have straightened out. Honestly though I don't know quite where the mistake was corrected.

The machine got rebooted a few times and I pulled the pci cards out, re-ran both setserial and lspci. That confirmed the 2 port card was indeed showing up as ttyS0 and ttyS1. I tried adjusting the speeds with setserial and a few other parameters. There were also a few times where I'd end up deleting LCK files from /var/lock. Also, things got easier after I just jumped pins 2 and 3 together as a loopback (be sure to turn off hardware flow control too) so I could just work a single instance of minicom on a single port. But I can't identify the single point when things (at least some) began working.

That still leaves the Startech single port card non-functional. But I can live with buying another usb-serial adapter if I need. They have a kernel patch, but my head hurts too much to go through it at the moment.

I don't expect the GPIB card to give me any hassles, but I'll post if I get stuck again.

Michael
PM
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll