LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-01-2004, 03:56 AM   #1
vidyaraj
LQ Newbie
 
Registered: Mar 2003
Posts: 12

Rep: Reputation: 0
Lightbulb serial port communication


hi all
currently i am using suse linux 8.1. I want to make sure my serial port driver is installed and configured the serial port or not.
I am getting following messages so i want to confirm from you pupil wheather my serial port is configured properly or not.

In the type dmesg in the command prompt
$ dmesg
i am getting this message like

serial driver version 505c(2001-07-08) with HUB-6 MANY_PORTS MULTIPORT
SHARE_IRQ SERIAL_PCI enabled

ttys00 at 0x03f8 (irq=4) is a 16550A

the device i connected is ttys0 but i am wondering why i am getting ttys00 in the demesg !!!!!!!!!!!!! Can any one help me in answering?
Is there any way to test wheather my serial port is configured properly or not Because i am not able to communicate with device i used t connect in my serial port.
Expecting your kind reply

This is the text of my serial file configuration do i need to uncomment in this file!!!!!!!!!
#!/bin/sh
#
# /etc/init.d/serial
#
# Initializes the serial ports on your system
#
# Without uncommenting some of the lines in this script, you'll be unable to
# use ports other than the first two, and those only if they use "standard"
# IRQ values (whatever those are... :^) The rc.serial script made a couple
# machines I tested this on hang at this point in the boot process, so it's
# commented out by default. However, if you need to set up extended serial
# ports, it's a very good starting point. It usually works great.
# More info that will be useful: I did some testing and found that the lines
# in /etc/rc.d/rc.serial that are most likely to make the machine hang are the
# one that sets up /dev/ttyS3, and the last time, which causes a report to be
# issued to the console about how the ports were configured. This tries to
# report on *every* port... if you change it so it only lists the ports you're
# going to use (/dev/ttyS0 /dev/cua1 /dev/cua2 for example) that it probably
# won't cause a hang. Also, the "wild" interrupt detection used for auto-
# configuration can cause problems as well. I highly recommend using the
# manual configuration lines to avoid trouble.
#
### BEGIN INIT INFO
# Provides: setserial
# Required-Start:
# Required-Stop:
# Default-Start: B
# Default-Stop:
# Description: Initializes the serial ports
### END INIT INFO

. /etc/rc.status

rc_reset
case $1 in
start|b)
cd /dev

SETSERIAL="/bin/setserial -b"
PORTS=`for p in ttyS? ttyS??; do test -e $p && echo $p; done`

run_setserial ()
{
$SETSERIAL $@
rc_status
}
echo "#########################################################"
echo "********************Configuring serial ports$$$$$$$$$$$$$$"
echo "##########################################################"

# Do wild interrupt detection (uncomment if you're brave enough to
# attempt auto-configuration... )
#
# run_setserial -W ${PORTS}

###############################################################
#
# AUTOMATIC CONFIGURATION
#
# Uncomment the appropriate lines below to enable auto-configuration
# of a particular board. Or comment them out to disable them....
#
###############################################################

# Do AUTOMATIC_IRQ probing
#
AUTO_IRQ=auto_irq

# These are the standard COM1 through COM4 devices
#
# If you have an internal modeme with a Rockwell Chipset, add a "skip_test"
# to the /dev/ttyS3 line below. (It's not added by default because it will
# screw up people with 8514 displays).
#
# run_setserial /dev/ttyS0 ${AUTO_IRQ} skip_test autoconfig
# run_setserial /dev/ttyS1 ${AUTO_IRQ} skip_test autoconfig
# run_setserial /dev/ttyS2 ${AUTO_IRQ} skip_test autoconfig
# run_setserial /dev/ttyS3 ${AUTO_IRQ} autoconfig

# These are for the first AST Fourport board (base address 0x1A0)
#
# run_setserial /dev/ttyS4 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS5 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS6 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS7 ${AUTO_IRQ} autoconfig

# These are for the second AST Fourport board (base address 0x2A0)
#
# run_setserial /dev/ttyS8 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS9 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS10 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS11 ${AUTO_IRQ} autoconfig

# These are the 3rd and 4th ports on the Accent Async board.
#
# run_setserial /dev/ttyS12 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS13 ${AUTO_IRQ} autoconfig

# Usenet Serial Board II (base address 0x100)
#
# run_setserial /dev/ttyS16 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS17 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS18 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS19 ${AUTO_IRQ} autoconfig


# BocaBoard 4 port (BB-1004) (base address 0x100)
#
# run_setserial /dev/ttyS16 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS17 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS18 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS19 ${AUTO_IRQ} autoconfig

# BocaBoard 8 port (BB-1008) (base address 0x100),
# or two BB-1004's (base addresses 0x100 and 0x120)
#
# run_setserial /dev/ttyS16 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS17 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS18 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS19 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS20 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS21 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS22 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS23 ${AUTO_IRQ} autoconfig

# BocaBoard 16 port (BB-1008), (base address 0x100),
# or two BB-1008's (base addresses 0x100 and 0x140),
# or four BB-1004's (base address 0x100, 0x120, 0x140, and 0x160)
#
# Warning --- some of these ports may conflict with the Future Domain
# SCSI controller. If you want to run both the BocaBoards and the
# Future Domain controller, you may need to change the port assignment
# of the Bocaboards -- see below in the section on manual configuration.
#
# run_setserial /dev/ttyS16 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS17 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS18 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS19 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS20 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS21 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS22 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS23 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS24 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS25 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS26 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS27 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS28 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS29 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS30 ${AUTO_IRQ} autoconfig
# run_setserial /dev/ttyS31 ${AUTO_IRQ} autoconfig

###############################################################
#
# MANUAL CONFIGURATION
#
# If you want to do manual configuration of one or more of your
# serial ports, uncomment and modify the relevant lines.
#
###############################################################

# These are the standard COM1 through COM4 devices
#
# run_setserial /dev/ttyS0 uart 16550A port 0x3F8 irq 4
# run_setserial /dev/ttyS1 uart 16550A port 0x2F8 irq 3
# run_setserial /dev/ttyS2 uart 16450 port 0x3E8 irq 4
# run_setserial /dev/ttyS3 uart 16450 port 0x2E8 irq 3

# These are the first set of AST Fourport ports
#
# run_setserial /dev/ttyS4 uart 16450 port 0x2A0 irq 7 fourport
# run_setserial /dev/ttyS5 uart 16450 port 0x2A8 irq 7 fourport
# run_setserial /dev/ttyS6 uart 16450 port 0x2B0 irq 7 fourport
# run_setserial /dev/ttyS7 uart 16450 port 0x2B8 irq 7 fourport

# These are the second set of AST Fourport ports
#
# run_setserial /dev/ttyS8 uart 16450 port 0x2A0 irq 5 fourport
# run_setserial /dev/ttyS9 uart 16450 port 0x2A8 irq 5 fourport
# run_setserial /dev/ttyS10 uart 16450 port 0x2B0 irq 5 fourport
# run_setserial /dev/ttyS11 uart 16450 port 0x2B8 irq 5 fourport

# These are the 3rd and 4th ports on the Accent Async board.
#
# run_setserial /dev/ttyS12 uart 16450 port 0x330 irq 4
# run_setserial /dev/ttyS13 uart 16450 port 0x338 irq 4

# These are two spare devices you can use to customize for
# some board which is not supported above....
# run_setserial /dev/ttyS14 uart XXXXX port XXXX irq X
# run_setserial /dev/ttyS15 uart XXXXX port XXXX irq X

# These are the ports used for either the Usenet Serial II
# board, or the Boca Board 4, 8, or 16 port boards.
#
# Uncomment only the first 4 lines for the Usenet Serial II board,
# and uncomment the first 4, 8, or all 16 lines for the
# Boca Board BB-1004, BB-1008, and BB-2016 respectively.
#
# run_setserial /dev/ttyS16 uart 16550A port 0x100 irq 12
# run_setserial /dev/ttyS17 uart 16550A port 0x108 irq 12
# run_setserial /dev/ttyS18 uart 16550A port 0x110 irq 12
# run_setserial /dev/ttyS19 uart 16550A port 0x118 irq 12
# run_setserial /dev/ttyS20 uart 16550A port 0x120 irq 12
# run_setserial /dev/ttyS21 uart 16550A port 0x128 irq 12
# run_setserial /dev/ttyS22 uart 16550A port 0x130 irq 12
# run_setserial /dev/ttyS23 uart 16550A port 0x138 irq 12
# run_setserial /dev/ttyS24 uart 16550A port 0x140 irq 12
# run_setserial /dev/ttyS25 uart 16550A port 0x148 irq 12
# run_setserial /dev/ttyS26 uart 16550A port 0x150 irq 12
# run_setserial /dev/ttyS27 uart 16550A port 0x158 irq 12
# run_setserial /dev/ttyS28 uart 16550A port 0x160 irq 12
# run_setserial /dev/ttyS29 uart 16550A port 0x168 irq 12
# run_setserial /dev/ttyS30 uart 16550A port 0x170 irq 12
# run_setserial /dev/ttyS31 uart 16550A port 0x178 irq 12

###########################################################
#
# Print the results of the serial configuration process
#
###########################################################


${SETSERIAL} -bg ${PORTS} 2> /dev/null
rc_status
echo "Configured serial ports"
rc_status -v1
;;
stop)
rc_failed 3
rc_status -v
;;
status)
rc_failed 4
rc_status -v
;;
*)
echo "usage: setserial {start|stop|status}"
;;
esac
rc_exit
 
Old 03-01-2004, 05:32 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"the device i connected is ttys0"

/dev/ttys0 and /dev/ttyS0 are two different devices. The device that you want to connect to is /dev/ttyS0

"Is there any way to test whether my serial port is configured properly or not"

If you have a second serial port then you can connect a null modem cable between the two serial ports and start two copies of minicom, one on each port. Then try to send data from one minicom to the other.

If you only have one serial port then you could connect an external dialout modem on that serial port and use minicom to send an ATZ command to the modem. If everything is working correctly the modem will respond with "OK".
___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

Last edited by jailbait; 03-01-2004 at 05:34 PM.
 
Old 03-01-2004, 08:04 PM   #3
vidyaraj
LQ Newbie
 
Registered: Mar 2003
Posts: 12

Original Poster
Rep: Reputation: 0
serial port communication

i believe that i did some mistake in my previous message
Here i am using ttyS0 only but what the problem i am facing is
in
dmesg i am getting message like
ttyS00 insted of ttyS0 that why i got surpised and wondering why it is coming like that.................
if any one can help in answering my question
 
Old 03-01-2004, 08:53 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"ttyS00 insted of ttyS0 that why i got surpised and wondering why it is coming like that................."

This may just be a mistake in the message. You can double check what your serial configuration is with:
setserial -ga /dev/ttyS? | less

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 03-01-2004, 09:05 PM   #5
vidyaraj
LQ Newbie
 
Registered: Mar 2003
Posts: 12

Original Poster
Rep: Reputation: 0
serial port communication

hi
thanks for your quick and kind response
if i type the command like

$ setserial -ga /dev/ttyS0

i am getting message like, does that means my serial port driver is configured properly

/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


thanks
my e-mail id is raj_brhmam@yahoo.com. i would like to good friendhship with u and to know more about u jailbait . if possible pls drop me e-mail about u.

cheers
vidyaraj
 
Old 03-02-2004, 10:52 AM   #6
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"i am getting message like, does that means my serial port driver is configured properly"

Yes. Your serial port is properly configured.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 03-02-2004, 07:46 PM   #7
vidyaraj
LQ Newbie
 
Registered: Mar 2003
Posts: 12

Original Poster
Rep: Reputation: 0
serial communication

hi Steve Stites

Thanks for your response
 
  


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
serial port communication prems Linux - Newbie 1 04-17-2005 03:31 AM
Serial port communication programming SeanatIL Programming 3 07-17-2004 09:26 PM
serial port communication vidyaraj Linux - Software 2 03-15-2004 12:32 AM
communication with serial port vidyaraj Linux - Hardware 0 03-09-2004 09:32 PM
communication via serial port perdesiz Linux - Software 0 11-13-2003 07:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:04 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration