FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 12-21-2007, 05:16 PM
"James B. Byrne"
 
Default CentOS-5 Need Help With Serial Ports

I have been struggling with setting up two serial ports on an HP/Compaq
D512S (Intel P4) under CentOS-5. I am not at all sure why these things
were not auto-configured when I initially installed the CentOS system from
CDs but they were not.

I have found various resources on the web and from them uncovered the
setserial utility. What I need from somebody is guidance on how to use
this utility to properly configure the ports.

Currently in /dev/ I have:


crw------- 1 uucp uucp 4, 64 Dec 21 12:14 ttyS0
crw------- 1 root root 4, 65 Dec 20 17:36 ttyS1
crw------- 1 root root 4, 66 Dec 20 17:36 ttyS2
crw------- 1 root root 4, 67 Dec 20 17:36 ttyS3


When I run setserial -g ttyS* I get this:

# setserial -g ttyS*
Cannot get serial info: Invalid argument
ttyS1: No such device or address
ttyS2: No such device or address
ttyS3: No such device or address


Can someone walk me through this? I setup hylafax previously on our
existing CentOS-4.5 server and never had this difficulty nor had to use
setserial, so far as I can recall.

Sincerely,

--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2007, 05:54 PM
"Bob Beers"
 
Default CentOS-5 Need Help With Serial Ports

On Dec 21, 2007 1:16 PM, James B. Byrne <byrnejb@harte-lyne.ca> wrote:
>
> When I run setserial -g ttyS* I get this:
>

try
setserial -g /dev/ttyS*

BTW, what does
dmesg | grep tty
show?

HTH,
-Bob
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2007, 06:35 PM
"James B. Byrne"
 
Default CentOS-5 Need Help With Serial Ports

# setserial -g /dev/ttyS*
Cannot get serial info: Invalid argument
/dev/ttyS1: No such device or address
/dev/ttyS2: No such device or address
/dev/ttyS3: No such device or address
#
# dmesg | grep tty
Xen virtual console successfully installed as ttyS0
#


--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2007, 06:54 PM
"James B. Byrne"
 
Default CentOS-5 Need Help With Serial Ports

I am not sure but this seems to refer to a similar problem. If so, can
someone tell me how to configure around this:

Bugzilla Bug 204825: CONFIG_SERIAL_8250 not set to "y" in xen0 kernel



--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2007, 07:02 PM
"Stephen John Smoogen"
 
Default CentOS-5 Need Help With Serial Ports

On Dec 21, 2007 12:35 PM, James B. Byrne <byrnejb@harte-lyne.ca> wrote:
>
> # setserial -g /dev/ttyS*
> Cannot get serial info: Invalid argument
> /dev/ttyS1: No such device or address
> /dev/ttyS2: No such device or address
> /dev/ttyS3: No such device or address
> #
> # dmesg | grep tty
> Xen virtual console successfully installed as ttyS0
>

Well my primary guess is that you are running a Xen kernel which
disables the serial tty's for its own 'tty' devices and so that guests
can grab 'real' serial ports. Other items it could be is that the BIOS
has them disabled or that the BIOS has a 'bug' that needs a patch.

http://wiki.xensource.com/xenwiki/InstallationNotes

Looking at threads referencing this.. you can either have a kernel
where Xen machines can have virtual serial access or you can have
external serial ports.. in the later case you may need to rebuild the
kernel, but you should try first booting with

xencons=off

to see if it lets the other serial ports be seen. If it doesnt then
you will need to rebuild the kernel as per installation notes.

--
Stephen J Smoogen. -- CSIRT/Linux System Administrator
How far that little candle throws his beams! So shines a good deed
in a naughty world. = Shakespeare. "The Merchant of Venice"
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2007, 07:38 PM
"James B. Byrne"
 
Default CentOS-5 Need Help With Serial Ports

Taking a suggestion from the discussion regarding the aforementioned bug I
altered /boot/grub/grub.conf and added this entry:

title CentOS (2.6.18-53.1.4.el5xen-com1)
root (hd0,0)
kernel /xen.gz-2.6.18-53.1.4.el5 com1=38400,8n1
module /vmlinuz-2.6.18-53.1.4.el5xen ro
root=/dev/VolGroup00/LogVol00 rhgb quiet xencons=xvc console=xvc
module /initrd-2.6.18-53.1.4.el5xen.img


Which explicitly sets the console for the xen root to com1 and bypasses
the module altogether. This works as can be seen by:

# setserial -g /dev/ttyS*
/dev/ttyS0, UART: unknown, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3

However, since this fix will get clobbered on the very next kernel update
the recommended method seems to be to add these rules to udev:

ACTION=="add", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id;
do /sbin/modprobe pnp:d$$id ; done < /sys/$devpath/id'"

Can somebody tell me how to do that? Where do I do this. I have very
little experience with this sort of thing. As this bug is reported
upstream and is more than a year old I have some difficulty understanding
how it persists in CentOS-5.

Regards,

--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2007, 07:43 PM
"Stephen John Smoogen"
 
Default CentOS-5 Need Help With Serial Ports

On Dec 21, 2007 1:38 PM, James B. Byrne <byrnejb@harte-lyne.ca> wrote:
> Taking a suggestion from the discussion regarding the aforementioned bug I
> altered /boot/grub/grub.conf and added this entry:
>
> title CentOS (2.6.18-53.1.4.el5xen-com1)
> root (hd0,0)
> kernel /xen.gz-2.6.18-53.1.4.el5 com1=38400,8n1
> module /vmlinuz-2.6.18-53.1.4.el5xen ro
> root=/dev/VolGroup00/LogVol00 rhgb quiet xencons=xvc console=xvc
> module /initrd-2.6.18-53.1.4.el5xen.img
>
>
> Which explicitly sets the console for the xen root to com1 and bypasses
> the module altogether. This works as can be seen by:
>
> # setserial -g /dev/ttyS*
> /dev/ttyS0, UART: unknown, Port: 0x03f8, IRQ: 4
> /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
> /dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
> /dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
>
> However, since this fix will get clobbered on the very next kernel update
> the recommended method seems to be to add these rules to udev:
>
> ACTION=="add", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id;
> do /sbin/modprobe pnp:d$$id ; done < /sys/$devpath/id'"
>
> Can somebody tell me how to do that? Where do I do this. I have very
> little experience with this sort of thing. As this bug is reported
> upstream and is more than a year old I have some difficulty understanding
> how it persists in CentOS-5.
>

If upstream does not fix it, CentOS does not fix it. Bug for bug
compatible. Also I am not sure it is a true bug as much as an optional
system setting. Most of Xen documentation assumes your ttyS0 is being
run by Xen .. so turning it off from that way would be thought of
people as being bug who were going by the Xen docs.

--
Stephen J Smoogen. -- CSIRT/Linux System Administrator
How far that little candle throws his beams! So shines a good deed
in a naughty world. = Shakespeare. "The Merchant of Venice"
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2007, 08:03 PM
"James B. Byrne"
 
Default CentOS-5 Need Help With Serial Ports

I fixed the UART assignment for ttyS0 with

# setserial /dev/ttyS0 UART 16550A

and now my modem's TR signal is high as desired. My question, am I
condemned to manually editing the grub.conf file after every kernel update
or is their a way to configure the system so that I get access to ttyS0
with the grub entries as distributed via yum?

Sincerely,

--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2007, 08:12 PM
"William L. Maltby"
 
Default CentOS-5 Need Help With Serial Ports

On Fri, 2007-12-21 at 16:03 -0500, James B. Byrne wrote:
> I fixed the UART assignment for ttyS0 with
>
> # setserial /dev/ttyS0 UART 16550A
>
> and now my modem's TR signal is high as desired. My question, am I
> condemned to manually editing the grub.conf file after every kernel update
> or is their a way to configure the system so that I get access to ttyS0
> with the grub entries as distributed via yum?

Add the command to /etc/rc.d/rc.local

>
> Sincerely,
>

--
Bill

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-21-2007, 08:27 PM
"James B. Byrne"
 
Default CentOS-5 Need Help With Serial Ports

Ok, I can now configure ttyS1 with faxaddmodem, which I could not do
before these changes, so that is progress. However, faxaddmodem reports
that it cannot detect a modem on ttyS0. Since the modem and cable are the
same for both, I am simply physically switching the port that the cable
connects to in order to carry out the configuration, obviously something
else is wrong.

Does anyone have any pointers on how to get the primary serial port back
from xen so that it can be of some use? can I configure the irq for com1
to use ttyS2? Will that work?

Seizing one of just two available serial devices for a console port
strikes me as a dubious design choice. I venture that the vast majority
of ES5/CentOS5 installations do not even configure xen doms other than 0
and of those that do, only a vanishingly small percentage actually employ
a serial console interface.

Regards,

--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 06:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org