Re: COM1 problems

2007-06-03 Thread Derek Ragona

At 03:01 AM 6/3/2007, Tim Judd wrote:

I'm subscribed to the digest, everyone -- send CC me on every reply
please...

Hi there, new installation, 6.2-STABLE.

I have a Belkin UPS on COM1 and sysutils/nut is trying to talk with it.
 I know it talks with it, because it has in the past.  The problem I'm
getting is that NUT is just filling the screen with errors, tty
overflows, and various problems related to communication on that port
with the UPS.

Looking at NUT's website, they say the UPS communicates at 2400 baud
8N1 and I'd like to believe that.  I tested without specifying a speed:
# tip com1
and didn't get anything..  waited 30 seconds or so.  After reading
NUT's website, I tried:
# tip -2400 com1
and got binary data (not readable information, but data none-the-less).

The kernel reports the port as sio0, but sio0 doesn't exist in /dev
the only serial port I see is cuad0{,.init,.lock} and that seems to be
hard-coded by some init script (but I don't know where).  cuad* also is
said to be a dialout line, not a generic com device.  /etc/remote does
indicate it is a generic device in the sense it will just pass
input/output...

How can I configure /dev/cuad0 to be 2400 baud fixed?

thanks for any tips and pointersit's been a while since I've dealt
with serial ports.


I have a similar setup with no issues.  You do need to be sure you have the 
correct nut driver for your UPS, and the cable tight.


-Derek

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: COM1 problems

2007-06-03 Thread Ian Smith
On Sun, 3 Jun 2007 01:01:38 -0700 (PDT) Tim Judd <[EMAIL PROTECTED]> wrote:

 > Hi there, new installation, 6.2-STABLE.
 > 
 > I have a Belkin UPS on COM1 and sysutils/nut is trying to talk with it.
 >  I know it talks with it, because it has in the past.  The problem I'm
 > getting is that NUT is just filling the screen with errors, tty
 > overflows, and various problems related to communication on that port
 > with the UPS.

If this goes unresolved, try pasting some real error messages?

 > Looking at NUT's website, they say the UPS communicates at 2400 baud
 > 8N1 and I'd like to believe that.  I tested without specifying a speed:
 > # tip com1
 > and didn't get anything..  waited 30 seconds or so.  After reading
 > NUT's website, I tried:
 > # tip -2400 com1
 > and got binary data (not readable information, but data none-the-less).

Quite likely symptomatic of baudrate mismatch then (without seeing any..)

 > The kernel reports the port as sio0, but sio0 doesn't exist in /dev
 > the only serial port I see is cuad0{,.init,.lock} and that seems to be
 > hard-coded by some init script (but I don't know where).  cuad* also is
 > said to be a dialout line, not a generic com device.  /etc/remote does
 > indicate it is a generic device in the sense it will just pass
 > input/output...

You want cuaa0, which will likely appear when you open it.  cuad0 (once
ttyd0) might appear if you've got some getty running on it .. make sure
/etc/ttys has this set to 'off' - unless of course nut claims it there? 

tip or anything should be able to open cuaa0 anyway, assuming nothing's
actually locking (ie also using) that dialup (not 'dialout') device.

 > How can I configure /dev/cuad0 to be 2400 baud fixed?

'tip -2400 com1' will use /dev/cuaa0 at 2400, but I suspect that's not
the baudrate your UPS is talking.  Perhaps 2400 is only a default, and
your UPS is set to something else?  From within tip:
  ~?   help
  ~v   show variables
  ~s ba?   show baudrate
  ~s ba=1200   set baudrate .. till traffic looks like ascii ..

 > thanks for any tips and pointersit's been a while since I've dealt
 > with serial ports.

I don't know your UPS (nor which model) but a little googling is a
dangerous thing; from 'nut belkin upd freebsd' this smelled useful:

 http://www.networkupstools.org/doc/2.0.1/INSTALL.html

Um, does it use a regular or cross-over cable?  CTS/RTS used?  Carrier
asserted, or needs setting up as a hardwired line? (as in /etc/remote) 

As Roland said:

 >> Look at sio(8), under FILES; the callin ports at /dev/ttyd?.

and maybe the para before FILES too.  Don't worry about the locking
stuff, though if curious, 'serial' has moved from /etc/ to /etc/rc.d/
but I've not played with that since FreeBSD 2.2.6 dialups years ago.

Cheers, Ian

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: COM1 problems

2007-06-03 Thread Roland Smith
On Sun, Jun 03, 2007 at 01:01:38AM -0700, Tim Judd wrote:
> I'm subscribed to the digest, everyone -- send CC me on every reply
> please...
> 
> Hi there, new installation, 6.2-STABLE.
> 
> I have a Belkin UPS on COM1 and sysutils/nut is trying to talk with it.
>  I know it talks with it, because it has in the past.  The problem I'm
> getting is that NUT is just filling the screen with errors, tty
> overflows, and various problems related to communication on that port
> with the UPS.
> 
> Looking at NUT's website, they say the UPS communicates at 2400 baud
> 8N1 and I'd like to believe that.  I tested without specifying a speed:
> # tip com1
> and didn't get anything..  waited 30 seconds or so.  After reading
> NUT's website, I tried:
> # tip -2400 com1
> and got binary data (not readable information, but data none-the-less).
> 
> The kernel reports the port as sio0, but sio0 doesn't exist in /dev
> the only serial port I see is cuad0{,.init,.lock} and that seems to be
> hard-coded by some init script (but I don't know where).  cuad* also is
> said to be a dialout line, not a generic com device.  /etc/remote does
> indicate it is a generic device in the sense it will just pass
> input/output...

Look at sio(8), under FILES; the callin ports at /dev/ttyd?.

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpNdJU3wNvtd.pgp
Description: PGP signature