From owner-freebsd-usb@FreeBSD.ORG Fri Dec 11 02:16:58 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 401CB106566C for ; Fri, 11 Dec 2009 02:16:58 +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 B8C2D8FC18 for ; Fri, 11 Dec 2009 02:16:55 +0000 (UTC) Received: (qmail 44468 invoked from network); 11 Dec 2009 02:16:55 -0000 Received: from unknown (HELO ?10.10.10.66?) (10.10.10.66) by 10.10.10.20 with SMTP; 11 Dec 2009 02:16:55 -0000 Message-Id: <43EC7D78-31E5-4B86-9316-002AE650727A@tlb.org> From: Trevor Blackwell To: freebsd-usb@freebsd.org, freebsd-answers@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Thu, 10 Dec 2009 18:16:55 -0800 X-Mailer: Apple Mail (2.936) Cc: Subject: 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: Fri, 11 Dec 2009 02:16:58 -0000 I cannot seem to find a way to identify serial ports. I have two serial USB devices, which I can distinguish easily from usbconfig: ugen2.3: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen0.2: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON 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. They're assigned sequentially by a bitmap system in usb_serial.c Currently, no devices seem to be using this mechanism: sys/dev/usb/serial/usb_serial.c: /* Check if the client has a custom TTY name */ if (sc->sc_callback->ucom_tty_name) { sc->sc_callback->ucom_tty_name(sc, buf, sizeof(buf), sc->sc_local_unit); } is that the right way? Or, what I really want is some sort of ioctl on the raw USB device or usbconfig option to tell me what serial port it appears as. -- Trevor Blackwell 650 776 7870 tlb@tlb.org