LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 02-28-2008, 04:19 PM   #1
mogumbo
LQ Newbie
 
Registered: Feb 2003
Distribution: RedHat 8.0
Posts: 13

Rep: Reputation: 0
Question serial port lag


Hi,
I'm trying to get multiple Elo TouchSystems 1537L touch screens working on one computer. They can use both serial and USB, but their proprietary Linux driver only handles one screen. So I'm using the elographics input driver that comes with Suse 10.3, which handles multiple screens just fine.

I have one computer that has 2 serial ports on the motherboard, and I can make 2 screens work great on that computer. setserial gives me this info about those ports:
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
Baud_base: 115200, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test
/dev/ttyS1, Line 1, UART: 16550A, Port: 0x02f8, IRQ: 3
Baud_base: 115200, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test

Now I am trying to make 2 screens work on a computer with no motherboard serial ports. I installed a Siig CyberSerial 4S PCIe card with 4 ports. setserial gives me this info on the first 2 ports:
/dev/ttyS0, Line 0, UART: 16950/954, Port: 0xbf00, IRQ: 16
Baud_base: 1152000, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test
/dev/ttyS1, Line 1, UART: 16950/954, Port: 0xbf08, IRQ: 16
Baud_base: 1152000, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test

The big difference appears to be the chip on this card. And I've already tried matching the baud rate to the rate on the working computer.

The problem when using this card is that the mouse pointer moves in response to touching the screen, but much slower than you move your finger on the screen (it lags behind your finger at about 1/3 the speed of your finger). Then if you move the mouse at all, the pointer moves through the rest of the path that you previously traced with your finger. When the pointer finishes following that path it goes back to following the mouse input.

It seems like the touchscreen input is building up in a buffer faster than the buffer is being emptied. If you move your finger on the screen for several seconds, the mouse pointer suddenly goes to full speed but always stays several seconds behind your finger input.

I have read a lot about serial ports in the last couple days, but I"m stumped. Anybody know what my problem is?
 
Old 02-28-2008, 04:52 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Have you tried using the serial ports in other applications, such as interfacing a serial mouse, or transferring data with something like C-Kermit, or operating as a serial console? If yes, how well or poorly did it work in that situation? Is there a vendor-supplied linux driver for that card? The IO addresses and interrupts used are non-standard for PC architecture serial ports. What about the other 2 serial ports on the card?

--- rod.
 
Old 02-29-2008, 01:14 PM   #3
mogumbo
LQ Newbie
 
Registered: Feb 2003
Distribution: RedHat 8.0
Posts: 13

Original Poster
Rep: Reputation: 0
I can't find a serial mouse, but I found an old serial Flybox joystick. It worked fine with this new serial card; no lag at all.

I tried putting the serial card in the same machine with the good motherboard serial ports. The touch screens work with the motherboard serial ports but have have the same troublesome lag with the serial card in that machine.

There are only vendor-supplied Windows drivers with this card.

The 3rd and 4th serial ports on the card have the same behavior as the first two.
 
Old 02-29-2008, 03:32 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
The fact that there are vendor-supplied Windows drivers for the card suggests that the card is different enough that standard 8250 UART family drivers will not work. One vague & general suggestions: run
Code:
stty -a
on working & non-working ports. It may reveal some differences that can be adjusted.

Something like the 'low-latency' option to setserial may help.

Have you researched the card online, with respect to Linux compatibility?

--- rod.
 
Old 03-03-2008, 03:07 PM   #5
mogumbo
LQ Newbie
 
Registered: Feb 2003
Distribution: RedHat 8.0
Posts: 13

Original Poster
Rep: Reputation: 0
I have tried many options on stty and setserial now, but still no luck. When I first looked at this card I couldn't find any multi-port cards with specific Linux support, but the chip on this card was listed in a Linux serial HOWTO.

Unless anyone has any other suggestions, it looks like it's about time to give up and try another card. I saw one or two online this morning that have their own Linux drivers.
 
Old 03-24-2008, 01:28 PM   #6
mogumbo
LQ Newbie
 
Registered: Feb 2003
Distribution: RedHat 8.0
Posts: 13

Original Poster
Rep: Reputation: 0
Well, I replaced the Siig CyberSerial 4S PCIe card with a StarTech PEX4S650 card. Linux reports 4 serial ports like this:

gerald:/home/svs # setserial /dev/ttyS0
/dev/ttyS0, UART: 16550A, Port: 0xbf00, IRQ: 16
gerald:/home/svs # setserial /dev/ttyS1
/dev/ttyS1, UART: 16550A, Port: 0xbf08, IRQ: 16
gerald:/home/svs # setserial /dev/ttyS2
/dev/ttyS2, UART: 16550A, Port: 0xbe00, IRQ: 16
gerald:/home/svs # setserial /dev/ttyS3
/dev/ttyS3, UART: 16550A, Port: 0xbe08, IRQ: 16

However, only the first 2 ports actually work. I have tested with 2 different devices. So with this I can get 2 of my 3 touchscreens working perfectly.

Using the serial driver supplied by StarTech, the touchscreen response has lag again, but all 4 ports work. So it looks like the lag is probably a problem with the touchscreens themselves; they're probably hitting some corner case with serial communication in general.

But I can't help but thinking I'm close to having this working with the serial driver included with Linux. If I could just get all 4 ports working. I have tried changing my IRQs to the defaults in /etc/init.d/setserial and have tried adding "8250.nr_uarts=4" to /boot/grub/menu.lst, but none of that worked. I'm not looking at this as a lag problem anymore; just a problem of making more than 2 serial ports work with the standard driver. Anyone have any suggestions on this?
 
Old 03-26-2008, 11:42 AM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
I've just re-read your original post more closely. I see that the vendor-supplied Linux driver for the touch-screen does not support multiple screens. I wonder why? Perhaps there is a fundamental basis to your problem there.
Have you tried adjusting any of the driver parameters in Xorg.conf, especially the two timing-oriented parameters?
Is there any difference in performance when using just one touchscreen? One area that I would try to explore would be the use of non-data carrying RS-232 pins, modem control lines. Are these fully implemented on your board? Associated driver parameters correct? Is the cable you are using fully & correctly wired for use with these pins (have you installed any sort of 'extension cable')?
Are you handy with programming at all? If this problem were on my desk, I'm pretty sure I would start by rigging up some kind of pass-through module to trap the serial traffic and inspect it and compare it between working and non-working systems, particularly with respect to timing.
--- rod.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
linux serial port to router console port connection? frankie_fix Linux - General 3 02-26-2007 09:32 PM
Parallel Port & Serial Port device identification helpmeforlinux Linux - Hardware 3 01-02-2007 01:15 AM
IBM AIX 5.2/5.3 serial port/tty0 port vinod_balani AIX 2 02-19-2006 03:38 PM
Using serial port card(PCMCIA) with IPAQ running Linux, can't find ttyS0 port d2army Linux - Laptop and Netbook 0 11-12-2005 08:07 PM
Using an USB port as a standard DB9 Serial Port Lsteele Linux - Newbie 1 10-22-2005 09:48 AM


All times are GMT -5. The time now is 11:22 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration