LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 05-14-2007, 04:09 AM   #1
polemon
Member
 
Registered: Jun 2005
Distribution: Fedora 18, Ubuntu 11.10, Ubuntu Server 11.10, DamnSmallLinux 3.4.4, FreeDOS 1.1, OpenBSD 5.0
Posts: 194

Rep: Reputation: 31
Fedora Core 5: # cat /dev/ttyS0 error


Hi.

I'd like to use the smart-card reader/writer that I have, it connects to a RS-232 Serial port.

the Applications for that device work fine on an old Laptop with such RS-232 port, but not on my desktop computer.

when I try to read that port, I get an error message:

# cat /dev/ttyS0
cat: /dev/ttyS0: Input/output error

I do it as root, and I do have read and write permission.

how do I get rid of that error?

please help,

--polemon

--
-EOF-
 
Old 05-14-2007, 09:05 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Quote:
the Applications for that device work fine on an old Laptop with such RS-232 port, but not on my desktop computer.
Can you provide some details? What applications?

Does /dev/ttyS0 exist? Your serial port must be configured with the same settings as the reader/writer.

Try:
cat < /dev/ttyS0
 
Old 05-14-2007, 11:19 AM   #3
polemon
Member
 
Registered: Jun 2005
Distribution: Fedora 18, Ubuntu 11.10, Ubuntu Server 11.10, DamnSmallLinux 3.4.4, FreeDOS 1.1, OpenBSD 5.0
Posts: 194

Original Poster
Rep: Reputation: 31
Of course it does exist, i get an Input/output error, not an cat: /dev/ttyS5: No such file or directory error.

The application just moves values to the ttyS0 port (i.e writes to it)

Code:
# setserial -a ttyS0
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 auto_irq
those are the exact same setting that i have on my laptop, where the port actually does work.
I can cat that port there. When nothing's connected to it, nothing is displayed, but I don't get an error message...

# cat < /dev/ttyS0
cat: -: Input/output error

What now?
 
Old 05-14-2007, 06:26 PM   #4
polemon
Member
 
Registered: Jun 2005
Distribution: Fedora 18, Ubuntu 11.10, Ubuntu Server 11.10, DamnSmallLinux 3.4.4, FreeDOS 1.1, OpenBSD 5.0
Posts: 194

Original Poster
Rep: Reputation: 31
Ok, I partially solved the problem:

The problem was, the ports IRQ-setup in BIOS was confusing the Kernel (it was set to auto).
I changes that to IRQ 4 and all is good now.

Almost all, though...

After systemboot, the permissions on /dev/ttyS0 is 660
I'd like it to be 666, is there a config file, that I could set things up with, or should I use setserial in rc.local?

--polemon
 
Old 05-14-2007, 07:37 PM   #5
samstar
Member
 
Registered: Apr 2007
Distribution: suse 10.2
Posts: 324

Rep: Reputation: 31
Hi,

Don't know if you might consider this a security breach, but to get access to my serial GPS, I added my user account to the "uucp" permissions group instead of changing permissions on the device itself.

Sam
 
  


Reply



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
What would happen if I where to cat /dev/mem > /dev/null Joey.Dale Linux - General 11 07-26-2009 12:46 PM
echo $chr(1) > /dev/ttyS0 got error rapsatol Programming 1 03-12-2007 10:26 AM
cat /dev/ttyS0: Input/output error lionking_x Linux - Hardware 3 01-06-2006 11:16 PM
Fedora core fedora device /dev/dsp can't be opened J3N7iL Linux - Hardware 3 06-30-2005 03:10 PM
/dev/ttyS0 problems rbermude Linux - Software 2 06-27-2001 10:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration