USB serial device naming

Trevor Blackwell tlb at tlb.org
Fri Dec 11 02:16:58 UTC 2009


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 at tlb.org







More information about the freebsd-usb mailing list