View RSS Feed


adding a new PTP camera to udev

Rate this Entry
Quote Originally Posted by ken_yap View Post
I just got a new toy. However when I plugged it in and tried to display the photos in digikam, it said that it could not open the device.

The reason is that the udev rules do not contain an entry for your camera. It may be too new to be in libgphoto2. If you can, update to a more recent version of gphoto2 and libgphoto2. If you can't or prefer not to, here's how you fix it:

Plug the camera into the USB port and then look at the last few lines of the output from dmesg to get the mfr and model IDs. In my case it was 04a9 and 322b.

As root, edit /etc/udev/rules.d/60-camera.rules. You might want to add your new entry near the existing rules for the mfr. Here's the line I added:

ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="322b", MODE="0666"
You shouldn't have to do this step since udevd is supposed to reload the rules automatically when changed, but for reference, the command is:

udevadm control --reload-rules
Now plug the camera in again and it should be detected and the USB device's mode changed to 666 so that you can access it as a normal user. You don't need a card reader if your camera supports PTP mode, and most do these days.

Remember that your change to the rules file will not carry over to a new install so make a note of what you did.

Have fun.

Submit "adding a new PTP camera to udev" to Digg Submit "adding a new PTP camera to udev" to Submit "adding a new PTP camera to udev" to StumbleUpon Submit "adding a new PTP camera to udev" to Google Submit "adding a new PTP camera to udev" to Facebook Submit "adding a new PTP camera to udev" to Twitter

Tags: gphoto2, ptp


  1. oldcpu's Avatar
    A good helpful/blog entry. I'll be book marking this to point new users to. Thanks for posting this.