Date: Sun, 13 Dec 2009 14:45:07 -0800 From: Trevor Blackwell <tlb@tlb.org> To: ed@freebsd.org Cc: freebsd-usb@freebsd.org Subject: Re: USB serial device naming Message-ID: <C56E01C7-B772-43F9-B5E1-2DBB2F04D4AE@tlb.org> In-Reply-To: <200912111038.06875.hselasky@c2i.net> References: <43EC7D78-31E5-4B86-9316-002AE650727A@tlb.org> <200912111038.06875.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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: <URG-Series USB Driver Hokuyo Data Flex for USB> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen2.2.0: umodem0: <Hokuyo Data Flex for USB URG-Series USB Driver, class 2/0, rev 2.00/1.00, addr 2> ugen2.3: <USB-Serial Controller Prolific Technology Inc.> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen2.3.0: uplcom0: <Prolific Technology Inc. USB-Serial Controller, class 0/0, rev 1.10/3.00, addr 3> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C56E01C7-B772-43F9-B5E1-2DBB2F04D4AE>