[CentOS] Need to test serial port connection

Thu Feb 26 19:16:44 UTC 2009
Anne Wilson <cannewilson at googlemail.com>

On Thursday 26 February 2009 18:55:22 William L. Maltby wrote:
> On Thu, 2009-02-26 at 16:55 +0000, Anne Wilson wrote:
> > On Thursday 26 February 2009 13:37, William L. Maltby wrote:
> > <snip>
> >
> > > > Feb 26 12:12:25 borg2 kernel: serial8250: ttyS0 at I/O 0x3f8 (irq =
> > > > 4) is a 16550A
> > > > Feb 26 12:12:25 borg2 kernel: serial8250: ttyS1 at I/O 0x2f8 (irq =
> > > > 3) is a 16550A
> > >
> > > Didn't you say there was only one port? There might be a second on the
> > > main board that is accessible via a header. If it's not hooked up
> > > disable all but the first in the BIOS (later). It's not really hurting
> > > anything as is, but it will free the I/O address and IRQ for assignment
> > > to other devices.
> >
> > I believe you are right. I remember those - and the 25-9-pin adapter :-).
> > Peering around the back in a dark corner, I  could well have been
> > mistaken. OK - female socket, so that's a  COM port, I think.
>
> To be politically correct and eliminate ambiguity, we'll change the
> terms here. Socket (formerly female connector) on the computer s/b a
> parallel printer port. Almost always a 25 pin in the past, but I've not
> kept up with that stuff over the years.
>
> Plug (formerly male connector) on the computer s/b serial ports.
>
> On the cable, this is reversed, of course. Now if the cable has RS-232
> on both ends and is not a fully symmetrical null modem cable, it will
> make a difference which end is connected to what. Make sure your cable
> socket end is what's hooked to the computer. Often the cables will be
> labeled which end goes to computer or device.
>
> Sometimes cables have the same gender on both ends. If they've done that
> you could just have the cable reversed (presuming it's one of the
> asymmetric cables). It's not uncommon for a null to be made by jumpering
> certain pins on just one side of the cable and crossing 2 and 3 end to
> end.
>
> > Now I'm really confused.  The BIOS definitely only shows one COM port. 
> > To be
>
> Ouch! Since I've not kept up with this stuff I can't sat if there are
> other new devices which use 16550 serial drivers. _But_, there are
> definitely 2 ports as the detection routines must write to the ports and
> read status to determine if it's a 16450, 16550 and revision A or not
> (the original 16550 had insufficient buffer IIRC and the A had to be
> issued to prevent overflow at higher speeds. CPUs "back in the day" were
> just to slow to handle the interrupts quickly enough).
>
> My guess is that your BIOS has a "menu" in the legacy devices area that
> has a drop-down or scrollable menu to select which port to configure. In
> there you can enable/disable, change default I/O and IRQ settings, etc.
> I think you'll find a second port defined.
>
OK - so far I've had to do this in short spells, which is definitely not the 
most productive.  Hopefully tomorrow I'll get a good long spell when I can 
check out manuals both for the motherboard and the UPS.

> Which raises the possibility of the computer's connector being on ttyS1
> instead of 0. 

I can change the config files and try those, too.

> But I suspect if you check the back of the computer you
> might see two plug connectors. These should be the serial ports. In
> today's world, probably 9 pin.
>
> > honest, I can't remember whether I connected it or not.  I guess I ought
> > to open the box and see what's what, but not today - it's already too
> > late to do that.
>
> Where's your dedication?! Where's your glass of wine?! Not at the same
> location?! Time to leave I guess!  :-)
>
Oddly enough my husband can get quite tetchy if I spend more than 12 hours a 
day with a computer :-)

> > > > Feb 26 12:12:25 borg2 kernel: 00:05: ttyS0 at I/O 0x3f8 (irq = 4) is
> > > > a 16550A
> > > >
> > > > Is this what I'm looking for?  I don't see anything else.
> > >
> > > Yes. That means that all is as expected (i.e. as _I_ expect).
> > >
> > Ctrl-A Z  - yes, I found that.
>
> In one of the menus from there, IIRC, you can set baud rate, parity,
> flow control, etc. BTW, someone mentioned UPS. Really dumb ones don't
> send anything except a power loss or battery low indication. Old ones
> used to do this just be controlling DTR (IIRC) and you couldn't "see"
> anything until it was raised. I don't know the details of yours (if it
> is a UPS) but there should be some docs or a CD that describes a minimal
> amount of that information. Or maybe they expect WinBlows and just put
> that information in a help menu.
>
In the 'User Manual' that comes with it there is no such info, as far as I can 
see.  There's a 120-page manual on the CD.  I'll examine that tomorrow.  
However, at a glance, it seems to expect you to set things up with its own gui 
software.  Since there is a Linux setup section, I'm guessing that it runs in 
a browser.  Again, I'll give it my attention in the morning.

> BTW, someone mentioned RS-232C. That's the cable and electrical
> specifications. RS-232D is the connector specifications for a "D" shell
> connector. They don _not_ conflict. They are just different parts of the
> same overall specification. So you need have no confusion if you see us
> reference the seemingly conflicting specifications.
>
Being only moderately geeky, I just think of RS-232 as serial connection - I 
don't know the details :-)

> > Settings at present:
> >
> > A	Serial Device 			: /dev/ttyS0
> > B	Lockfile Location		: /var/lock
> > C	Callin Program			:
> > D	Callout Program		:
> > E	Bps/Par/Bits			: 38400 8N1
> > F	Hardware Flow Control	: Yes
> > G	Software Flow Control	: No
>
> Hardware flow control is suspect _if_ the device doesn't allow flow
> until some event is seen, e.g. DTR or DCD and/or some information from
> the device is ready to be transmitted. This could make it look like
> nothing is working. But that really depends on how the device is
> supposed to behave.
>
> Unless the device can send large amounts of data or requires flow
> control, you might try disabling it.
>
OK - I'll look at that, too.

I'm not often beaten by things, but sometimes I have to fight them on and off 
for quite a while before they are resolved.  I'm grateful for all the help I'm 
getting here.  I shan't be giving up for a good while yet :-) if at all.

Anne
-- 
New to KDE4? - get help from http://userbase.kde.org
Just found a cool new feature?  Add it to UserBase
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.centos.org/pipermail/centos/attachments/20090226/9db8495a/attachment-0005.sig>