Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
digicam usb permission problems
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
dj-tj
n00b
n00b


Joined: 21 Jul 2006
Posts: 3
Location: Germany

PostPosted: Sat Jul 22, 2006 9:31 am    Post subject: Reply with quote

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 .. :roll:) ...
I am running an ~x86 system and the latest version of udev: 096-r1
Back to top
View user's profile Send private message
C.M
Tux's lil' helper
Tux's lil' helper


Joined: 14 Mar 2003
Posts: 132
Location: Göteborg - Sweden

PostPosted: Fri Jul 28, 2006 7:11 pm    Post subject: Reply with quote

Thanks for that hotplug rule! :D Could never get those usermap things to work...

/C.M
Back to top
View user's profile Send private message
picklestix
n00b
n00b


Joined: 15 Jan 2005
Posts: 72

PostPosted: Wed Aug 02, 2006 1:02 am    Post subject: Reply with quote

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
View user's profile Send private message
picklestix
n00b
n00b


Joined: 15 Jan 2005
Posts: 72

PostPosted: Wed Aug 02, 2006 1:52 am    Post subject: Reply with quote

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
View user's profile Send private message
Sergejs.Magers
n00b
n00b


Joined: 31 May 2005
Posts: 50
Location: Latvia

PostPosted: Thu Aug 10, 2006 6:19 am    Post subject: Reply with quote

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
View user's profile Send private message
kocoorek
n00b
n00b


Joined: 05 Sep 2006
Posts: 49
Location: Brzeg, Poland

PostPosted: Tue Sep 05, 2006 10:21 am    Post subject: Reply with quote

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
View user's profile Send private message
El_Presidente_Pufferfish
Veteran
Veteran


Joined: 11 Jul 2002
Posts: 1179
Location: Seattle

PostPosted: Tue Sep 05, 2006 10:43 am    Post subject: Reply with quote

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? :D
Back to top
View user's profile Send private message
KotBehemot
n00b
n00b


Joined: 28 Feb 2005
Posts: 71
Location: Poland Gdansk

PostPosted: Sun Sep 17, 2006 10:52 am    Post subject: Reply with quote

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
View user's profile Send private message
lefou
Apprentice
Apprentice


Joined: 18 Feb 2004
Posts: 199
Location: Germany, Lusatia

PostPosted: Sat Sep 23, 2006 8:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
El_Presidente_Pufferfish
Veteran
Veteran


Joined: 11 Jul 2002
Posts: 1179
Location: Seattle

PostPosted: Mon Sep 25, 2006 8:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
sargek
Apprentice
Apprentice


Joined: 13 Mar 2005
Posts: 170
Location: Texas

PostPosted: Sat Sep 30, 2006 5:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
mamac
l33t
l33t


Joined: 29 Feb 2004
Posts: 890

PostPosted: Wed Oct 04, 2006 9:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
mamac
l33t
l33t


Joined: 29 Feb 2004
Posts: 890

PostPosted: Thu Oct 05, 2006 10:36 am    Post subject: Reply with quote

A bug already exists : https://bugs.gentoo.org/show_bug.cgi?id=131756
_________________
Powered by Gentoo Linux since 2003
Back to top
View user's profile Send private message
amon-ra
n00b
n00b


Joined: 21 Apr 2003
Posts: 59
Location: Albacete

PostPosted: Wed Oct 11, 2006 3:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
Kabuto
l33t
l33t


Joined: 01 Aug 2002
Posts: 701

PostPosted: Thu Oct 12, 2006 2:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
Clansman
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jan 2004
Posts: 140

PostPosted: Sun Oct 15, 2006 7:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
nestal
n00b
n00b


Joined: 11 Apr 2003
Posts: 34
Location: Milky Way

PostPosted: Fri Dec 15, 2006 3:20 pm    Post subject: Reply with quote

It worked for me too. Many thanks!

I use 350D also so I copied your lines verbatim. :P

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
View user's profile Send private message
Mehlano
n00b
n00b


Joined: 08 Dec 2006
Posts: 29

PostPosted: Fri Dec 15, 2006 5:27 pm    Post subject: Reply with quote

Very nice!!

..thanks a lot! :twisted:

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum