New to HAL andconfused.

Dan Nicholson dbn.lists at gmail.com
Thu Jan 4 16:33:25 PST 2007


On 1/4/07, Alan Chandler <alan at chandlerfamily.org.uk> wrote:
> I am running Debian Unstable and am trying to get my new digital camera
> properly recognised when it is plugged in as a camera by KDE (which at
> the moment thinks its an unidentified mountable storage device).
>
> I have copied the example
>
> doc/conf/match-USB-camera.fdi into the configuration directory and
> adjusted it for the vendor and product id of my camera.

I have no idea about the docs, but I would suggest instead using
libgphoto2. It contains a utility to generate a HAL fdi file
enumerating all the cameras it knows about.

The last time I did this was with libgphoto2-2.2.1 and the utility is
called print-camera-list. Here's what I have in my script:

mkdir -pv /usr/share/hal/fdi/information/10freedesktop
/usr/lib/libgphoto2/print-camera-list hal-fdi > \
        /usr/share/hal/fdi/information/10freedesktop/10-camera-libgphoto2.fdi
/usr/lib/libgphoto2/print-camera-list hal-fdi-device > \
        /usr/share/hal/fdi/information/10freedesktop/10-camera-libgphoto2-device.fdi

Here's a snippet of 10-camera-libgphoto2.fdi:

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<!-- This file was generated by libgphoto2 print-camera-list - - fdi -->
<deviceinfo version="0.2">
 <device>
  <match key="info.bus" string="usb">
   <match key="usb.vendor_id" int="1363">
    <match key="usb.product_id" int="514">
     <merge key="info.category" type="string">camera</merge>
     <append key="info.capabilities" type="strlist">camera</append>
     <merge key="camera.access_method" type="string">proprietary</merge>
     <merge key="camera.libgphoto2.name" type="string">AEG Snap 300</merge>
     <merge key="camera.libgphoto2.support" type="bool">true</merge>
    </match>
   </match>

--
Dan


More information about the hal mailing list