From owner-freebsd-usb@FreeBSD.ORG Sun Dec 13 22:45:08 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CA981065670 for ; Sun, 13 Dec 2009 22:45:08 +0000 (UTC) (envelope-from tlb@tlb.org) Received: from anybots.com (mail.anybots.com [64.142.12.96]) by mx1.freebsd.org (Postfix) with SMTP id 522198FC0C for ; Sun, 13 Dec 2009 22:45:08 +0000 (UTC) Received: (qmail 16873 invoked from network); 13 Dec 2009 22:45:07 -0000 Received: from unknown (HELO ?10.10.10.66?) (10.10.10.66) by 10.10.10.20 with SMTP; 13 Dec 2009 22:45:07 -0000 Message-Id: From: Trevor Blackwell To: ed@freebsd.org In-Reply-To: <200912111038.06875.hselasky@c2i.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Sun, 13 Dec 2009 14:45:07 -0800 References: <43EC7D78-31E5-4B86-9316-002AE650727A@tlb.org> <200912111038.06875.hselasky@c2i.net> X-Mailer: Apple Mail (2.936) Cc: freebsd-usb@freebsd.org Subject: Re: USB serial device naming X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Dec 2009 22:45:08 -0000 I can't seem to find a way to match USB serial ports & tty names. I have two serial USB devices, which I can distinguish easily from "usbconfig show_ifdrv" ugen2.2: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen2.2.0: umodem0: ugen2.3: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen2.3.0: uplcom0: and they result in two ttys: /dev/cuaU0 /dev/cuaU1 but I can't figure out how to map the USB devices to tty names. It depends on what order they come up in. They're assigned sequentially by a bitmap system in usb_serial.c How can my code figure this out? I think what I want is some sort of ioctl on the raw USB device or usbconfig option to tell me what tty it appears as. -- Trevor Blackwell 650 776 7870 tlb@tlb.org