Date: Mon, 4 Jun 2007 00:30:40 +1000 (EST) From: Ian Smith <smithi@nimnet.asn.au> To: Tim Judd <tjudd2k@yahoo.com> Cc: Roland Smith <rsmith@xs4all.nl>, freebsd-questions@freebsd.org Subject: Re: COM1 problems Message-ID: <Pine.BSF.3.96.1070603233514.13641C-100000@gaia.nimnet.asn.au> In-Reply-To: <20070603083347.5913B16A4D1@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 3 Jun 2007 01:01:38 -0700 (PDT) Tim Judd <tjudd2k@yahoo.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.1070603233514.13641C-100000>