From owner-freebsd-stable@FreeBSD.ORG Fri Oct 6 17:53:15 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C879D16A412 for ; Fri, 6 Oct 2006 17:53:15 +0000 (UTC) (envelope-from karl@FS.denninger.net) Received: from FS.denninger.net (wsip-70-169-168-7.pn.at.cox.net [70.169.168.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id E696F43D77 for ; Fri, 6 Oct 2006 17:53:14 +0000 (GMT) (envelope-from karl@FS.denninger.net) Received: from fs.denninger.net (localhost [127.0.0.1]) by FS.denninger.net (8.13.6/8.13.1) with SMTP id k96HrDur059260 for ; Fri, 6 Oct 2006 12:53:13 -0500 (CDT) (envelope-from karl@FS.denninger.net) Received: from fs.denninger.net [127.0.0.1] by Spamblock-sys (LOCAL); Fri Oct 6 12:53:13 2006 Received: (from karl@localhost) by FS.denninger.net (8.13.6/8.13.1/Submit) id k96HrD9c059257 for freebsd-stable@freebsd.org; Fri, 6 Oct 2006 12:53:13 -0500 (CDT) (envelope-from karl) Date: Fri, 6 Oct 2006 12:53:13 -0500 From: Karl Denninger To: freebsd-stable@freebsd.org Message-ID: <20061006175313.GA58888@FS.denninger.net> Mail-Followup-To: freebsd-stable@freebsd.org References: <20061005151925.GA1156@FS.denninger.net> <20061005190822.GA15547@icarus.home.lan> <20061005202144.GA11105@FS.denninger.net> <54db43990610051404x1816135ft9740ec29eb5da23@mail.gmail.com> <20061006000909.GB2473@FS.denninger.net> <20061006135019.L76485@server.arg.sj.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061006135019.L76485@server.arg.sj.co.uk> User-Agent: Mutt/1.4.2.1i Organization: Karl's Sushi and Packet Smashers X-Die-Spammers: Spammers cheerfully broiled for supper and served with ketchup! Subject: Re: Recommendations for a serial port card you can actually BUY? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Oct 2006 17:53:16 -0000 On Fri, Oct 06, 2006 at 02:25:31PM +0100, Andrew Gordon wrote: > > On Thu, 5 Oct 2006, Karl Denninger wrote: > > On Thu, Oct 05, 2006 at 05:04:41PM -0400, Bob Johnson wrote: > > > I have used USB-to-serial converters with no problem. All the control > > > signals (at least the ones my applications need) seem to work > > > correctly. I don't remember any brands or models off hand, I bought > > > what was cheap as I needed them and they all worked. "Cheap" means > > > under $20 delivered (for one port). > > > > Interesting. > > > > Now, what happens when you reboot? Do they come back in random order? > > That won't work! I need to know that port 2 will BE Port 2 the next time > > the machine comes up.... > > Competent USB devices have serial numbers in them, although the current > FreeBSD USB system doesn't provide easy access to the data (the > kernel collects it as part of the device discovery, but AFAIR doesn't do > anything with it). I solved my problems in a different way (below). I think there may be another option. Here's the boot message, with just USB related things: usb0: on uhci0 usb0: USB revision 1.0 usb1: on uhci1 usb1: USB revision 1.0 usb2: on uhci2 usb2: USB revision 1.0 usb3: on uhci3 usb3: USB revision 1.0 usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: on ehci0 usb4: USB revision 2.0 Now, isn't this in fact invarient? That is, isn't the probe on the bus going to be the same across boots? We can then get which device is on which port with.... Fs:/disk/karl> usbdevs -v Controller /dev/usb0: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 addr 2: low speed, self powered, config 1, Smart-UPS 1500 FW:601.3.D USB FW:1.5(0x0002), American Power Conversion(0x051d), rev 0.06 port 2 powered Controller /dev/usb1: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 addr 2: full speed, power 100 mA, config 1, USB-Serial Controller(0x2008), Prolific Technology Inc.(0x0557), rev 3.00 port 2 powered Controller /dev/usb2: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb3: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb4: addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered port 3 powered port 4 powered port 5 powered port 6 powered port 7 powered port 8 powered Now, where the problem comes in is that THIS line doesn't reference an attached port. That sucks, but might not be hard to fix: ucom0: Prolific Technology Inc. USB-Serial Controller, rev 1.10/3.00, addr 2 So.... is there any way to discover what port a UCOM device is attached to? If so, bingo - you've got it. I think I can get this from the usb(8) driver - going to code something up to see if it works.... -- -- Karl Denninger (karl@denninger.net) Internet Consultant & Kids Rights Activist http://www.denninger.net My home on the net - links to everything I do! http://scubaforum.org Your UNCENSORED place to talk about DIVING! http://genesis3.blogspot.com Musings Of A Sentient Mind