Date: Thu, 10 Dec 2009 18:16:55 -0800 From: Trevor Blackwell <tlb@tlb.org> To: freebsd-usb@freebsd.org, freebsd-answers@freebsd.org Subject: USB serial device naming Message-ID: <43EC7D78-31E5-4B86-9316-002AE650727A@tlb.org>
next in thread | raw e-mail | index | archive | help
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: <URG-Series USB Driver Hokuyo Data Flex for USB> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen0.2: <USB-Serial Controller Prolific Technology Inc.> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43EC7D78-31E5-4B86-9316-002AE650727A>