From owner-freebsd-usb@freebsd.org Wed Nov 11 21:57:37 2015 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 541CFA2C8D5 for ; Wed, 11 Nov 2015 21:57:37 +0000 (UTC) (envelope-from bsmply@gmail.com) Received: from mail-ob0-x22d.google.com (mail-ob0-x22d.google.com [IPv6:2607:f8b0:4003:c01::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 147B814D2; Wed, 11 Nov 2015 21:57:37 +0000 (UTC) (envelope-from bsmply@gmail.com) Received: by obbbj7 with SMTP id bj7so14036030obb.1; Wed, 11 Nov 2015 13:57:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hFvKOaXpB7aCBqKz21bOdoeSn/0epuOxIWWXdYWSIPU=; b=H31Vu7exAzwo9LDKz6rSQkfqNNHabWRmm34epN0Bfcfx5K50aViIXjNMoaJ3OPHpup 962iV9DIWhsLo5pKzhQ1h6nxTqGx3ib+7svCjLQFxFApAYwX0CFF9HUUom6IVZULaDM9 mMn/OsorRqeLkz5eZAe8i8Sy/igg6REphKKVIbTpLKdfdnD45N71lJqwawMGvEWVFLfP pa17lrRLhGPwM4/KddWS4745zTXPsisSZLeQMd+A3wDIk5GP5gbSLdUsbpoKL0DH7BBP QNTmMs3BvhXb4GBrncT9kROZadNQ6uv5/9TxJ8jTMI6WN1uD3Gw1m7LgIKrJpWJoO/Li tL9Q== MIME-Version: 1.0 X-Received: by 10.60.125.33 with SMTP id mn1mr7142873oeb.65.1447279056133; Wed, 11 Nov 2015 13:57:36 -0800 (PST) Received: by 10.76.44.145 with HTTP; Wed, 11 Nov 2015 13:57:36 -0800 (PST) In-Reply-To: <1447277889.91061.22.camel@freebsd.org> References: <56421DFD.6070503@selasky.org> <564222D8.6020900@selasky.org> <56422764.4040307@selasky.org> <1447277889.91061.22.camel@freebsd.org> Date: Wed, 11 Nov 2015 16:57:36 -0500 Message-ID: Subject: Re: How to access a FTDI usb device with a custom vendor and product id's From: Burton Sampley To: Ian Lepore Cc: Hans Petter Selasky , freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2015 21:57:37 -0000 Ian, Thank you for your prompt reply. Looking at the usbdevs file, I found 0x2100, but there is no entry for 0x9e56, which is my device. So, I'm assuming that changing uftdi.c to the correct name for the VID will only solve part of my problem. I will further assume that I need to find the correct/proper entry for usbdevs as well. Is this a correct assumption? If so, then how/where can I find the proper entry for usbdevs? Here's the 2 closest entries: /* RT system products */ product RTSYSTEMS CT29B 0x9e54 FTDI compatible adapter product RTSYSTEMS SERIAL_VX7 0x9e52 FTDI compatible adapter For me, what appears to be the last piece of the puzzle is to find the correct name to place in the 3rd field. Based on the following: $ /usr/local/bin/sudo /usr/sbin/usbconfig -d ugen2.3 dump_device_desc ugen2.3: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (90mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0008 idVendor = 0x2100 idProduct = 0x9e56 bcdDevice = 0x0600 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 bNumConfigurations = 0x0001 $ does "CT-62B" look reasonable? Regards, -Burton On Wed, Nov 11, 2015 at 4:38 PM, Ian Lepore wrote: > On Wed, 2015-11-11 at 16:28 -0500, Burton Sampley wrote: > > I added a line to the table, but it seems to have failed since I used > > the > > VID# instead of the VID# name. Where are the VID names mapped to the > > VID#'s? Apparently, I know enough about coding to be dangerous. > > I'll do > > some more digging to try to fix my own error. > > > > Here's a diff of the original source and my modified source: > > > > [/usr/src/sys/dev/usb/serial]$ /usr/bin/diff ./uftdi.c ./uftdi.c.ORIG > > 914d913 > > < UFTDI_DEV(2100, 9e56, 0), > > [/usr/src/sys/dev/usb/serial]$ > > > > Here's the compile splattage: > > The VID and PID names are in the file src/sys/dev/usb/usbdevs. > > -- Ian > -- Your mind is like a parachute, it works much better when it is open.