From mboxrd@z Thu Jan 1 00:00:00 1970 From: berthold@xn--hllmanns-n4a.de (=?utf-8?q?Berthold_H=C3=B6llmann?=) Date: Tue, 26 Dec 2006 19:18:10 +0000 Subject: Re: UDEV rule for uploading firmware Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org "Kay Sievers" writes: > On 12/25/06, Berthold H=C3=B6llmann wrote: >> I try to fix a UDEV rule for uploading firmware for an USB audio >> device. The tool madfuload has to get the device name in either the >> DEVICE environment variable or via a command line switch. The original >> rule as delivered with the program is: >> >> ACTION=3D"add", SUBSYSTEM=3D"usb", DEVPATH=3D"/*.0", ENV{PRODUCT}=3D"763= /2806/*", RUN+=3D"/usr/local/sbin/madfuload -l -3 -f /usr/local/share/usb/m= audio/ma006100.bin" > > Try hooking into the "usb_device" event, not "usb". The device node > may not be around at the time you receive the "usb" event. You need to > match on sysfs vendor/product values to indentify your device then. > The device-node path is available in the event environment of the > "usb_device" event so you can pass it to the called tool. Thanks for your help. For the records, the working solution (at least for me) is: ACTION=3D"add", SUBSYSTEM=3D"usb_device", SYSFS{idVendor}=3D"0763", SYSFS{i= dProduct}=3D"2806", RUN+=3D"/usr/local/sbin/madfuload -l -3 -f /usr/local/s= hare/usb/maudio/ma006100.bin -D $env{DEVNAME}" Kind regards Berthold --=20 berthold@xn--hllmanns-n4a.de / bhoel@web.de / ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel