Mailinglist Archive: opensuse (4570 mails)

< Previous Next >
Re: [SLE] probably a silly COM port question
  • From: Paul <paul.ryan.uk@xxxxxxxxx>
  • Date: Mon, 14 Nov 2005 12:18:25 +0000 (UTC)
  • Message-id: <8b1547db0511140418l270b15d4w@xxxxxxxxxxxxxx>
hi,

> typing setserial -g /dev/ttyS? gives:
>
> /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
> /dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3
> /dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
> /dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
>
> Which seems okay?

Yes, they look ok, except no UART is specified for 1, 2, 3. Although
it could be connected to 0 and the UART is correct. Check the UPS
specifications to find out its UART. You can correct this with
setserial. You can also use setserial to automatically configure the
serial ports ("man setserial" for further information).

> However, cat /dev/ttyS0 gives absolutely nothing, no chatter, nothing.

It would give nothing. Assuming the UPS understands some commands in
the same way as a modem, you could just echo commands to it and this
will be displayed on the screen with cat /dev/ttyS0.

For example, for a modem:

On console 1 ([CTRL] [ALT] [F1]), login as root and then execute:

cat /dev/ttyS0

On console 2 ([CTRL] [ALT] [F2]), login as root and then execute:

echo "AT" > /dev/ttyS0

and assuming the modem knows AT commands then it will reply and show
the reply on console 1.

So, assuming a UPS has some standard commands (refer to the
manufacturer's manual) then it will respond to commands sent by echo
and display the output on console 1

--
/Paul

"It's not about the ending, it's about the journey." - Lex Luthor

< Previous Next >