LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-19-2004, 10:38 AM   #1
esi-eric
Member
 
Registered: May 2004
Location: Florida
Distribution: 7.2
Posts: 32

Rep: Reputation: 15
Problem Programming Serial Ports in Linux 7.2


Hello Everyone!

I am having a problem with Configuring/Reading/Writing Serial Ports under Linux 7.2. First of all, I have a total of 5 serial ports on my machine. They all are read/writable/configurable under Windows, so I know that they are not broken! Anyway, under Linux after doing a dmesg | more I find that the 5 serial ports are seen as follows:

Serial Port 1: /dev/ttyS0
Serial Port 2: /dev/ttyS4
Serial Port 3: /dev/ttyS5
Serial Port 4: /dev/ttyS6
Serial Port 5: /dev/ttyS7

Now, the good thing is that I can Configure/Read/Write Serial Ports 1, 2, and 3!!! However, for some reason (using the same code that worked for configuring Serial Ports 1, 2, and 3) does not work for Configuring/Reading/Writing Serial Ports 4 and 5.

When I do configure serial ports 4 and 5 for the standard 9600 Baud, 1 stop bit, no parity, 8 data bits, I get weird results like being able to write at 1200 baud instead of 9600 baud which the software is intending to program it to communicate at. In addition, there is no readback functionality on serial ports 4 or 5 at all. NOTE once again that this code works for serial ports 1, 2, and 3. I have flip flopped the device settings so that the port is configured by working code which worked for the other ports, but it does not work for ports 4 and 5. I know that it is not the code because it works for 3 out of the 5 other ports.

What can I do in Linux to check these ports and see that they are functioning properly and that I can read/write/and configure them properly for my system that I am currently working on? I think that since I am able to communicate with workable hardware and software for 3 out of the 5 ports that I have some sort of hardware problem when programming these ports in Linux. Thank you very much for all of your time and consideration!!!

Eric.
 
Old 07-19-2004, 12:03 PM   #2
idaho
Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438

Rep: Reputation: 30
setserial will display the status of your system's serial ports, andallow you to change their default settings.

Read /usr/share/doc/setserial-2.17/README to see how to configure them automatically on boot up.

This is assuming that you have proper kernel support for whatever serial card hardware you have added to your system. You may need to recompile your kernel to enable support.
 
  


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
Problem of serial port programming fingerling54 Linux - Software 4 05-18-2005 03:22 PM
connect linux to MS-windows via serial ports longnam Slackware 2 04-30-2005 03:08 PM
Redhat 9.0 problem with serial ports banerji Linux - Hardware 1 02-27-2004 01:14 PM
Serial ports doesn't work under SuSE Linux 9.0... peso Linux - Hardware 13 02-20-2004 01:38 AM
Monitoring Serial Ports under Linux fcAL Linux - General 0 09-17-2002 12:10 PM

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

All times are GMT -5. The time now is 06:44 AM.

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