Date: Mon, 13 Dec 2010 08:56:51 +0100 From: Emanuel Haupt <ehaupt@FreeBSD.org> To: Andrew Thompson <thompsa@FreeBSD.org> Cc: freebsd-usb@FreeBSD.org Subject: Re: static usb device configuration Message-ID: <20101213085651.43110117.ehaupt@FreeBSD.org> In-Reply-To: <AANLkTim7agR-6RFBRyDJjybURw2pkgwhtX64jDpy61NN@mail.gmail.com> References: <20101212194924.b625d7ad.ehaupt@FreeBSD.org> <AANLkTim7agR-6RFBRyDJjybURw2pkgwhtX64jDpy61NN@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Andrew Thompson <thompsa@FreeBSD.org> wrote:
> On 13 December 2010 07:49, Emanuel Haupt <ehaupt@freebsd.org> wrote:
> > Is there any way I can make sure that the following device:
> >
> > ugen1.3: <product 0x6001 vendor 0x0403> at usbus1, cfg=0 md=HOST
> > spd=FULL (12Mbps) pwr=ON
> >
> > bLength = 0x0012
> > bDescriptorType = 0x0001
> > bcdUSB = 0x0200
> > bDeviceClass = 0x0000
> > bDeviceSubClass = 0x0000
> > bDeviceProtocol = 0x0000
> > bMaxPacketSize0 = 0x0008
> > idVendor = 0x0403
> > idProduct = 0x6001
> > bcdDevice = 0x0400
> > iManufacturer = 0x0000 <no string>
> > iProduct = 0x0000 <no string>
> > iSerialNumber = 0x0003 <Reader 195>
> > bNumConfigurations = 0x0001
> >
> > Is always registered as:
> >
> > /dev/usb/1.3.0
>
> You would be better making a symlink using devd rules, something like
>
> notify 100 {
> match "system" "USB";
> match "subsystem" "DEVICE";
> match "type" "ATTACH";
> match "vendor" "0x0403";
> match "product" "0x6001";
> action "ln -s /dev/$cdev /dev/mydevice";
> };
Unfortunately the program in question uses libusb and the configuration
only allows to define the device by specifying <busnum>:<devaddr> and
there are multiple identical devices around with only iSerialNumber
being different from each other. Somehow I need to make sure the
devices in the USB hub are always recognized in the same order.
I guess one solution would be to generate the configuration each time
the program starts.
Emanuel
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101213085651.43110117.ehaupt>
