From owner-freebsd-usb@FreeBSD.ORG Mon Dec 13 07:56:53 2010 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 A93D8106564A; Mon, 13 Dec 2010 07:56:53 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from mx.critical.ch (cl-8.zrh-02.ch.sixxs.net [IPv6:2001:1620:f00:7::2]) by mx1.freebsd.org (Postfix) with ESMTP id 27C848FC21; Mon, 13 Dec 2010 07:56:52 +0000 (UTC) Received: from wiggles.bwns.ch (localhost [IPv6:::1]) by mx.critical.ch (8.14.3/8.14.3/critical-1.0) with SMTP id oBD7upsu093757; Mon, 13 Dec 2010 08:56:51 +0100 (CET) (envelope-from ehaupt@FreeBSD.org) Date: Mon, 13 Dec 2010 08:56:51 +0100 From: Emanuel Haupt To: Andrew Thompson Message-Id: <20101213085651.43110117.ehaupt@FreeBSD.org> In-Reply-To: References: <20101212194924.b625d7ad.ehaupt@FreeBSD.org> X-Mailer: Sylpheed 3.0.3 (GTK+ 2.22.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-usb@FreeBSD.org Subject: Re: static usb device configuration 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: Mon, 13 Dec 2010 07:56:53 -0000 Andrew Thompson wrote: > On 13 December 2010 07:49, Emanuel Haupt wrote: > > Is there any way I can make sure that the following device: > > > > ugen1.3: at usbus1, cfg=3D0 md=3DHOST > > spd=3DFULL (12Mbps) pwr=3DON > > > > =A0bLength =3D 0x0012 > > =A0bDescriptorType =3D 0x0001 > > =A0bcdUSB =3D 0x0200 > > =A0bDeviceClass =3D 0x0000 > > =A0bDeviceSubClass =3D 0x0000 > > =A0bDeviceProtocol =3D 0x0000 > > =A0bMaxPacketSize0 =3D 0x0008 > > =A0idVendor =3D 0x0403 > > =A0idProduct =3D 0x6001 > > =A0bcdDevice =3D 0x0400 > > =A0iManufacturer =3D 0x0000 =A0 > > =A0iProduct =3D 0x0000 =A0 > > =A0iSerialNumber =3D 0x0003 =A0 > > =A0bNumConfigurations =3D 0x0001 > > > > Is always registered as: > > > > /dev/usb/1.3.0 >=20 > You would be better making a symlink using devd rules, something like >=20 > 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 : 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