View previous topic :: View next topic |
Author |
Message |
dj-tj n00b
Joined: 21 Jul 2006 Posts: 3 Location: Germany
|
Posted: Sat Jul 22, 2006 9:31 am Post subject: |
|
|
El_Presidente_Pufferfish wrote: | try to use ==(double equals) for idVendor and idProduct |
That was it!
Thanks, with the double equals it now works perfectly (could have thought of that on my own .. ) ...
I am running an ~x86 system and the latest version of udev: 096-r1 |
|
Back to top |
|
|
C.M Tux's lil' helper
Joined: 14 Mar 2003 Posts: 132 Location: Göteborg - Sweden
|
Posted: Fri Jul 28, 2006 7:11 pm Post subject: |
|
|
Thanks for that hotplug rule! Could never get those usermap things to work...
/C.M |
|
Back to top |
|
|
picklestix n00b
Joined: 15 Jan 2005 Posts: 72
|
Posted: Wed Aug 02, 2006 1:02 am Post subject: |
|
|
The rule doesn't seem to work for me, even with double equal signs...
Manually changing permissions of /dev/bus/usb/xxx does however.
Even with the rule working though, is this not a bug? Seems a little insane for the average user to have to write a udev rule to access their camera...not to mention writing another one for each camera you may decide to use in the future.. |
|
Back to top |
|
|
picklestix n00b
Joined: 15 Jan 2005 Posts: 72
|
Posted: Wed Aug 02, 2006 1:52 am Post subject: |
|
|
Digging deeper...I made a generic rule for any cannon device with
Code: | BUS=="usb", SYSFS{idVendor}="04a9", MODE="0660", GROUP="plugdev"
|
The device is created with group=plugdev, but permissions are set to 644!.
1) I _know_ udev is processing my rule. If I change the plugdev group to something else and restart udev, it then creates the node with whatever group I assign the rule.
2) Any changes to MODE= do not change the created permissions.
3) editing 50-udev.rules and changing the default USB device from 644 to 664 then correctly gives the device the permissions I want......but now I'm not just changing camera permissions anymore.
This seems to be an issue with udev and not with the camera...
Has anyone else seen this?
[I--] [ ~] sys-fs/udev-096-r1 |
|
Back to top |
|
|
Sergejs.Magers n00b
Joined: 31 May 2005 Posts: 50 Location: Latvia
|
Posted: Thu Aug 10, 2006 6:19 am Post subject: |
|
|
El_Presidente_Pufferfish wrote: | Code: | SUBSYSTEM=="usb_device", SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="3072", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0660", GROUP="plugdev" |
works for me
try to use ==(double equals) for idVendor and idProduct |
Thanks all of you, I got everything working. |
|
Back to top |
|
|
kocoorek n00b
Joined: 05 Sep 2006 Posts: 49 Location: Brzeg, Poland
|
Posted: Tue Sep 05, 2006 10:21 am Post subject: |
|
|
hello
check if USB_DEVFS_PATH is set
Code: | env | grep USB_DEVFS_PATH |
if it is not or it is set to /dev/bus/usb you need to change it to /proc/bus/usb
Code: | export USB_DEVFS_PATH=/proc/bus/usb |
you can write this into yours .bash_profile or /etc/profile to set USB_DEVFS_PATH on login or boot
Code: | echo "export USB_DEVFS_PATH=/proc/bus/usb" >> ~/.bash_profile |
|
|
Back to top |
|
|
El_Presidente_Pufferfish Veteran
Joined: 11 Jul 2002 Posts: 1179 Location: Seattle
|
Posted: Tue Sep 05, 2006 10:43 am Post subject: |
|
|
kocoorek wrote: | hello
check if USB_DEVFS_PATH is set
Code: | env | grep USB_DEVFS_PATH |
if it is not or it is set to /dev/bus/usb you need to change it to /proc/bus/usb
Code: | export USB_DEVFS_PATH=/proc/bus/usb |
you can write this into yours .bash_profile or /etc/profile to set USB_DEVFS_PATH on login or boot
Code: | echo "export USB_DEVFS_PATH=/proc/bus/usb" >> ~/.bash_profile |
|
this works perfectly for me if i put it in my users ~/.bashrc
any idea why this is necessary and who's to blame? |
|
Back to top |
|
|
KotBehemot n00b
Joined: 28 Feb 2005 Posts: 71 Location: Poland Gdansk
|
Posted: Sun Sep 17, 2006 10:52 am Post subject: |
|
|
is there no other way but to give this rule? last time i only added myself to usb group and it helped but now after upgrading udev and hotplug i made this rule and it is working.... this is somehow strange for me |
|
Back to top |
|
|
lefou Apprentice
Joined: 18 Feb 2004 Posts: 202 Location: Germany, Lusatia
|
Posted: Sat Sep 23, 2006 8:41 pm Post subject: |
|
|
I had the same problem with my Canon EOS 400D (my laptop recognized the camera, but digikam could not download any image), and downgrading to libusb-0.11 (from version 0.12) solved the issues.
Now, digikam works as aspected. |
|
Back to top |
|
|
El_Presidente_Pufferfish Veteran
Joined: 11 Jul 2002 Posts: 1179 Location: Seattle
|
Posted: Mon Sep 25, 2006 8:03 pm Post subject: |
|
|
lefou wrote: | I had the same problem with my Canon EOS 400D (my laptop recognized the camera, but digikam could not download any image), and downgrading to libusb-0.11 (from version 0.12) solved the issues.
Now, digikam works as aspected. |
ooh, libusb-0.1.11 also works for me. any idea why 0.1.12 requires the export USB_DEVFS_PATH=/proc/bus/usb or a udev rule? |
|
Back to top |
|
|
sargek Apprentice
Joined: 13 Mar 2005 Posts: 170 Location: Texas
|
Posted: Sat Sep 30, 2006 5:10 pm Post subject: |
|
|
pgrdsl wrote: | pgrdsl wrote: | I'm having a play with udev rules to try and sort it out, but my udev is a bit rusty |
This is the best I can come up with - create /etc/udev/rules.d/10-local-camera.rules containing something like:
Code: | SUBSYSTEM=="usb_device", SYSFS{idVendor}="04a9", SYSFS{idProduct}="30ef", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0660", GROUP="plugdev"
|
The exact idVendor and idProduct can be got from /proc/bus/usb/devices (or under /sys). This is shamelessly stolen from 50-udev.rules, with just updates for selection on vendor and product, and setting the "correct" mode and group for the latest (~x86) udev/hotplug/gphoto2/libgphoto2. These values are correct for the Canon EOS350D.
It's rather better than the solution that sets these permissions for all usb devices |
Your udev rule worked for me with a Kodak C340 - I just substituted my vendor and product ids - thanks! _________________ "Amongst all things, knowledge is truly the best thing: from it's not being liable ever to be stolen, from it's not being purchasable, and from it's being imperishable." |
|
Back to top |
|
|
mamac l33t
Joined: 29 Feb 2004 Posts: 890
|
Posted: Wed Oct 04, 2006 9:57 pm Post subject: |
|
|
Hi there,
I had the same problem with digikam (user can detect the camera but can't download) and it was fixed with environment work around.
Maybe we should create a bug, as solutions we have here are only work arounds, shouldn't we? _________________ Powered by Gentoo Linux since 2003 |
|
Back to top |
|
|
mamac l33t
Joined: 29 Feb 2004 Posts: 890
|
|
Back to top |
|
|
amon-ra n00b
Joined: 21 Apr 2003 Posts: 59 Location: Albacete
|
Posted: Wed Oct 11, 2006 3:21 pm Post subject: |
|
|
I solved it by changing:
/etc/udev/rules.d/50-udev.rules
# usbfs-like device nodes
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"
by:
# usbfs-like device nodes
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0664", GROUP="usb" |
|
Back to top |
|
|
Kabuto l33t
Joined: 01 Aug 2002 Posts: 701
|
Posted: Thu Oct 12, 2006 2:56 pm Post subject: |
|
|
That will work but 50-udev.rules does get overwritten on udev updates. That is why creating a 10-udev.rules is recommended. If you put the Vendor and ID you can code the rule just to the camera and other USB devices won't inherit that rule. Either way works. |
|
Back to top |
|
|
Clansman Tux's lil' helper
Joined: 10 Jan 2004 Posts: 140
|
Posted: Sun Oct 15, 2006 7:00 pm Post subject: |
|
|
Hi,
I had exactly the same problem. My canon eos 350d stopped talking with digikam...
The USB_DEVFS_PATH environment variable sorted things out. Also, from the bug report, I see that it isn't the final fix... it will do for now, however.
Thanks everyone.
[] _________________ http://www.pjvenda.org |
|
Back to top |
|
|
nestal n00b
Joined: 11 Apr 2003 Posts: 34 Location: Milky Way
|
Posted: Fri Dec 15, 2006 3:20 pm Post subject: |
|
|
It worked for me too. Many thanks!
I use 350D also so I copied your lines verbatim.
pgrdsl wrote: |
This is the best I can come up with - create /etc/udev/rules.d/10-local-camera.rules containing something like:
Code: | SUBSYSTEM=="usb_device", SYSFS{idVendor}="04a9", SYSFS{idProduct}="30ef", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0660", GROUP="plugdev"
|
The exact idVendor and idProduct can be got from /proc/bus/usb/devices (or under /sys). This is shamelessly stolen from 50-udev.rules, with just updates for selection on vendor and product, and setting the "correct" mode and group for the latest (~x86) udev/hotplug/gphoto2/libgphoto2. These values are correct for the Canon EOS350D.
It's rather better than the solution that sets these permissions for all usb devices |
|
|
Back to top |
|
|
Mehlano n00b
Joined: 08 Dec 2006 Posts: 29
|
Posted: Fri Dec 15, 2006 5:27 pm Post subject: |
|
|
Very nice!!
..thanks a lot!
Got it to work with my Canon Digital IXUS 500 - emerge'd digikam, added the udev-rule and exciting the nice and working digikam! _________________ myWorkstation::
1x Intel Pentium Core 2 Duo E6600 @ 2.4 GHz, 2048 MB RAM, 640 MB XFX 8800 GTS, Gnome w/ Beryl 0.1.4, Kernel: 2.6.19-r5
Registered Linux User #437626 |
|
Back to top |
|
|
|