Thats not going to work in all cases, for instance imagine you had two 05d8:4002 scanners plugged in but they weren't the same model requiring different firmware and settings what do you do to sort those two devices apart?
<br><br><div><span class="gmail_quote">On 8/31/06, <b class="gmail_sendername">David Zeuthen</b> <<a href="mailto:david@fubar.dk">david@fubar.dk</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, 2006-08-29 at 07:34 +0200, Étienne Bersac wrote:<br>> Hello all,<br>><br>> I'm playing with fdi in order to write the scanner.fdi file. I don't<br>> know how to develop such files. I just read the spec and the exemples,
<br>> but nothing work.<br>><br>> How to test a .fdi ?<br><br>You simple drop the file in, for example,<br><br> /etc/hal/fdi/information/<br><br>Look here<br><br> <a href="http://gitweb.freedesktop.org/?p=hal.git;a=blob_plain;h=129c352e9f75bb33292d33c8414e022ce465fe34;f=fdi/information/10freedesktop/10-usb-music-players.fdi">
http://gitweb.freedesktop.org/?p=hal.git;a=blob_plain;h=129c352e9f75bb33292d33c8414e022ce465fe34;f=fdi/information/10freedesktop/10-usb-music-players.fdi</a><br><br>for an example of an fdi file. So if you have a USB device with
<br>vendor_id=0x1234 and product_id=0xabcd you would have this file<br><br> <?xml version="1.0" encoding="UTF-8"?><br> <deviceinfo version="0.2"><br> <device>
<br> <match key="usb.vendor_id" int="0x1234"><br> <match key="usb.product_id" int="0xabcd"><br> <merge key="info.capabilities
" type="strlist">scanner</append><br> <merge key="scanner.type" type="string">sane</merge><br> <merge key="scanner.some_other_prop
" type="string">foo</merge><br> <merge key="scanner.some_other_prop" type="int">32</merge><br> </match><br> </match>
<br> </device><br> </deviceinfo><br><br>and when you plug in a device with these properties the scanner.*<br>properties will be merged and info.capabilities will be modified. Pretty<br>easy, huh?
<br><br>> Do i have to restart hal ? dbus ? Does hal have<br>> debug message for fdi parsing ? Is there a howto ?<br><br>If the device is hotplugable, which USB devices are, you just need to<br>replug the device to make the new properties apply to the newly added
<br>device. No need to restart anything.<br><br>Useful tools for looking at the device objects exported by hal includes<br>lshal and hal-device-manager. That's really all there is to it...<br><br>HTH,<br>David<br><br><br>
_______________________________________________<br>hal mailing list<br><a href="mailto:hal@lists.freedesktop.org">hal@lists.freedesktop.org</a><br><a href="http://lists.freedesktop.org/mailman/listinfo/hal">http://lists.freedesktop.org/mailman/listinfo/hal
</a><br></blockquote></div><br>