From owner-freebsd-questions@FreeBSD.ORG Sun Jun 3 14:30:50 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3373716A400 for ; Sun, 3 Jun 2007 14:30:50 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.freebsd.org (Postfix) with ESMTP id 82F0413C483 for ; Sun, 3 Jun 2007 14:30:48 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.5) with SMTP id AAA25375; Mon, 4 Jun 2007 00:30:41 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Mon, 4 Jun 2007 00:30:40 +1000 (EST) From: Ian Smith To: Tim Judd In-Reply-To: <20070603083347.5913B16A4D1@hub.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Roland Smith , freebsd-questions@freebsd.org Subject: Re: COM1 problems X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2007 14:30:50 -0000 On Sun, 3 Jun 2007 01:01:38 -0700 (PDT) Tim Judd 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 pointers....it'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