From owner-freebsd-stable@FreeBSD.ORG Fri Oct 6 13:25:33 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 95E7B16A412 for ; Fri, 6 Oct 2006 13:25:33 +0000 (UTC) (envelope-from arg-bsd@arg.me.uk) Received: from arg.me.uk (arg1.demon.co.uk [62.49.12.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1223043D45 for ; Fri, 6 Oct 2006 13:25:32 +0000 (GMT) (envelope-from arg-bsd@arg.me.uk) Received: by arg.me.uk (Postfix, from userid 1002) id BAEBD9B06; Fri, 6 Oct 2006 14:25:31 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by arg.me.uk (Postfix) with ESMTP id AB70C5D12; Fri, 6 Oct 2006 14:25:31 +0100 (BST) Date: Fri, 6 Oct 2006 14:25:31 +0100 (BST) From: Andrew Gordon X-X-Sender: freebsd@server.arg.sj.co.uk To: Karl Denninger In-Reply-To: <20061006000909.GB2473@FS.denninger.net> Message-ID: <20061006135019.L76485@server.arg.sj.co.uk> 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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-stable@freebsd.org 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 13:25:33 -0000 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). As already mentioned in this thread, USB serial adapters fall into the 'too cheap' category (the purchase cost isn't worth mentioning, but you have no idea what will arrive when you order one). IMO, it's worth standardising on one adapter type (hence one device driver) and spending a bit more time/money on the purchasing. I standardized on adapters using the FTDI chips (www.ftdichip.com, they sell their own adapters but these chips are widely used and I've usually bought mine elsewhere). FTDI have been through about 3 generations of these chips while remaining driver compatible. When I started (several years ago), the uftdi driver wasn't up to the job for the sort of reasons you mention (control of handshakes, real-time control), but for my applications it was convenient to avoid using uftdi and simply address the devices with the ugen driver - giving me direct control over the handshakes, the FIFO timeout behaviour etc. I believe that uftdi has since improved and may now be the right way to go if your applications want a tty-style interface (I don't use it much, having as above written all my serious applications another way). The FTDI devices keep the device descriptors etc. in an EEPROM, so my approach to the 'which port is which' problem was to change the textual part of the descriptor - "usbdevs -d" then immediately tells you what is going on. The EEPROM is writable over the USB connection - I have a program to do so if anybody wants it.