View previous topic :: View next topic |
Author |
Message |
menschmeier l33t
Joined: 15 Dec 2004 Posts: 727
|
Posted: Fri Aug 18, 2006 8:51 am Post subject: can use camera only as root [solved] |
|
|
Hi,
I own a Canon Ixus II digital camera. I can use this camera only as root, as normal user there is a problem detecting the camera:
/var/log/messages show the right stuff:
Quote: | usb 2-1: new full speed USB device using uhci_hcd and address 3
usb 2-1: ep0 maxpacket = 32
usb 2-1: default language 0x0409
usb 2-1: new device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1: Product: Canon Digital Camera
usb 2-1: Manufacturer: Canon Inc.
usb 2-1: uevent
usb 2-1: configuration #1 chosen from 1 choice
usb 2-1: adding 2-1:1.0 (config #1, interface 0)
usb 2-1:1.0: uevent
drivers/usb/core/inode.c: creating file '003'
hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0002 |
As root I can use gphoto2 for example:
Quote: | gphoto2 -P
Detected a 'Canon:PowerShot S200'.
Downloading 'IMG_4470.JPG' from folder '/DCIM/144CANON'...
Receiving data... |------------------------------ \ 70.5% 1s |
But as normal user:
Quote: | env LANG=C gphoto2 --debug -P --debug
0.000020 main(2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES TO THE MAILING LIST:
0.000220 main(2): gphoto2 2.1.5
0.000326 main(2): gphoto2 has been compiled with the following options:
0.000439 main(2): + i686-pc-linux-gnu-gcc (C compiler used)
0.000548 main(2): + popt (for handling command-line parameters)
0.000658 main(2): + exif (for displaying EXIF information)
0.000776 main(2): + cdk (for accessing configuration options)
0.000883 main(2): + no aa (for displaying live previews)
0.000990 main(2): + no jpeg (for displaying live previews in JPEG format)
0.001100 main(2): + readline (for easy navigation in the shell)
0.001215 main(2): libgphoto2 2.1.6
0.001319 main(2): libgphoto2 has been compiled with the following options:
0.001430 main(2): + i686-pc-linux-gnu-gcc (C compiler used)
0.001537 main(2): + EXIF (for special handling of EXIF files)
0.001829 main(2): + no ltdl (working around buggy libltdl, eh?
0.002058 main(2): + /proc/meminfo (adapts cache size to memory available)
0.002268 main(2): libgphoto2_port 0.5.1
0.002462 main(2): libgphoto2_port has been compiled with the following options:
0.002670 main(2): + i686-pc-linux-gnu-gcc (C compiler used)
0.002865 main(2): + USB (for USB cameras)
0.003063 main(2): + serial (for serial cameras)
0.003282 main(2): + no resmgr (serial port access and locking)
0.003486 main(2): + no baudboy (serial port locking)
0.003687 main(2): + no ttylock (serial port locking)
0.003888 main(2): + no lockdev (serial port locking)
0.004089 main(2): + no ltdl (working around buggy libltdl, eh?
0.004387 main(2): The user has not specified both a model and a port. Try to figure them out.
0.004620 gphoto2-port-info-list(2): Loading io-drivers from '/usr/lib/gphoto2_port/0.5.1' without ltdl...
0.005029 gphoto2-port-serial(2): Trying to lock '/dev/tts/0'...
0.005410 gphoto2-port-serial(2): Trying to lock '/dev/tts/1'...
0.005719 gphoto2-port-serial(2): Trying to lock '/dev/tts/2'...
0.005949 gphoto2-port-serial(2): Trying to lock '/dev/tts/3'...
0.006176 gphoto2-port-serial(2): Trying to lock '/dev/tts/4'...
0.006390 gphoto2-port-serial(2): Trying to lock '/dev/tts/5'...
0.006598 gphoto2-port-serial(2): Trying to lock '/dev/tts/6'...
0.006805 gphoto2-port-serial(2): Trying to lock '/dev/tts/7'...
0.007014 gphoto2-port-serial(2): Trying to lock '/dev/tts/8'...
0.007221 gphoto2-port-serial(2): Trying to lock '/dev/tts/9'...
0.007454 gphoto2-port-serial(2): Trying to lock '/dev/tts/10'...
0.007661 gphoto2-port-serial(2): Trying to lock '/dev/tts/11'...
0.007867 gphoto2-port-serial(2): Trying to lock '/dev/tts/12'...
0.008073 gphoto2-port-serial(2): Trying to lock '/dev/tts/13'...
0.008281 gphoto2-port-serial(2): Trying to lock '/dev/tts/14'...
0.008486 gphoto2-port-serial(2): Trying to lock '/dev/tts/15'...
0.008694 gphoto2-port-serial(2): Trying to lock '/dev/tts/16'...
0.008903 gphoto2-port-serial(2): Trying to lock '/dev/tts/17'...
0.009443 gphoto2-port-serial(2): Trying to lock '/dev/tts/18'...
0.009654 gphoto2-port-serial(2): Trying to lock '/dev/tts/19'...
0.009861 gphoto2-port-serial(2): Trying to lock '/dev/tts/20'...
0.010069 gphoto2-port-serial(2): Trying to lock '/dev/tts/21'...
0.010276 gphoto2-port-serial(2): Trying to lock '/dev/tts/22'...
0.010481 gphoto2-port-serial(2): Trying to lock '/dev/tts/23'...
0.010687 gphoto2-port-serial(2): Trying to lock '/dev/tts/24'...
0.010893 gphoto2-port-serial(2): Trying to lock '/dev/tts/25'...
0.011102 gphoto2-port-serial(2): Trying to lock '/dev/tts/26'...
0.011334 gphoto2-port-serial(2): Trying to lock '/dev/tts/27'...
0.011541 gphoto2-port-serial(2): Trying to lock '/dev/tts/28'...
0.011748 gphoto2-port-serial(2): Trying to lock '/dev/tts/29'...
0.011954 gphoto2-port-serial(2): Trying to lock '/dev/tts/30'...
0.012162 gphoto2-port-serial(2): Trying to lock '/dev/tts/31'...
0.012368 gphoto2-port-serial(2): Trying to lock '/dev/tts/32'...
0.012580 gphoto2-port-info-list(2): Loaded 'Serial Port 0' (serial:/dev/tts/0) from 'libgphoto2_port_serial.so'
0.012808 gphoto2-port-info-list(2): Loaded 'Serial Port 1' (serial:/dev/tts/1) from 'libgphoto2_port_serial.so'
0.013022 gphoto2-port-info-list(2): Loaded 'Serial Port 2' (serial:/dev/tts/2) from 'libgphoto2_port_serial.so'
0.013235 gphoto2-port-info-list(2): Loaded 'Serial Port 3' (serial:/dev/tts/3) from 'libgphoto2_port_serial.so'
0.013448 gphoto2-port-info-list(2): Loaded '' (^serial) from 'libgphoto2_port_serial.so'
0.014283 gphoto2-port-info-list(2): Loaded 'Universal Serial Bus' (usb:) from 'libgphoto2_port_usb.so'
0.014854 gphoto2-port-info-list(2): Counting entries (6 available)...
0.015851 gphoto2-port-info-list(2): 5 regular entries available.
0.016143 gphoto2-port(2): Creating new device...
0.016358 gphoto2-port-info-list(2): Getting info of entry 0 (6 available)...
0.016706 gphoto2-port(2): Setting timeout to 500 millisecond(s)...
0.016939 gphoto2-port(2): Setting settings...
0.017149 gphoto2-port-info-list(2): Getting info of entry 1 (6 available)...
0.017441 gphoto2-port(2): Setting timeout to 500 millisecond(s)...
0.017659 gphoto2-port(2): Setting settings...
0.017866 gphoto2-port-info-list(2): Getting info of entry 2 (6 available)...
0.018140 gphoto2-port(2): Setting timeout to 500 millisecond(s)...
0.018356 gphoto2-port(2): Setting settings...
0.018575 gphoto2-port-info-list(2): Getting info of entry 3 (6 available)...
0.018851 gphoto2-port(2): Setting timeout to 500 millisecond(s)...
0.019067 gphoto2-port(2): Setting settings...
0.019621 gphoto2-port-info-list(2): Getting info of entry 4 (6 available)...
0.020420 gphoto2-port(2): Setting timeout to 5000 millisecond(s)...
0.020676 gphoto2-port(2): Setting settings...
0.020880 gphoto2-abilities-list.c(1): Auto-detecting USB cameras...
0.021112 gphoto2-port(0): Could not find USB device (vendor 0x553, product 0x202). Make sure this device is connected to the computer.
...
0.328762 gphoto2-port(0): Could not find USB device (vendor 0x93a, product 0x10f). Make sure this device is connected to the computer.
0.328993 gphoto2-port(2): Freeing port...
0.329196 gphoto2-port(2): Closing port...
0.329461 setting/gphoto2-setting.c(2): Creating $HOME/.gphoto
0.329816 setting/gphoto2-setting.c(2): Loading settings from file "/home/steffen/.gphoto/settings"
0.330357 gphoto2-camera(2): Listing files in '/'...
0.330625 gphoto2-camera(2): Initializing camera...
0.331092 gphoto2-camera(2): Neither port nor model set. Trying auto-detection...
0.331448 gphoto2-abilities-list(2): Loading camera libraries in '/usr/lib/gphoto2/2.1.6' without ltdl...
0.331680 gphoto2-abilities-list(2): Note that failing to load *.a and *.la is NOT an error!
0.332227 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_adc65.so'...
0.332700 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_adc65.la'...
0.332999 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_adc65.a'...
0.333285 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_agfa_cl20.so'...
0.333570 /agfa_cl20.c(2): * camera_abilities()
0.333879 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_agfa_cl20.la'...
0.334180 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_agfa_cl20.a'...
0.334465 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_aox.so'...
0.335149 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_aox.la'...
0.335542 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_aox.a'...
0.335825 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_barbie.so'...
0.336223 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_barbie.la'...
0.336514 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_barbie.a'...
0.336797 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_canon.so'...
0.337126 canon/library.c(2): camera_id()
0.337343 canon/library.c(2): camera_abilities()
0.338938 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_canon.la'...
0.339378 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_canon.a'...
...
0.420105 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_enigma13.la'...
0.420400 gphoto2-abilities-list(2): Trying to load '/usr/lib/gphoto2/2.1.6/libgphoto2_enigma13.a'...
0.555026 gphoto2-port-info-list(2): Loading io-drivers from '/usr/lib/gphoto2_port/0.5.1' without ltdl...
0.555740 gphoto2-port-serial(2): Trying to lock '/dev/tts/0'...
...
0.562679 gphoto2-port-serial(2): Trying to lock '/dev/tts/32'...
0.562889 gphoto2-port-info-list(2): Loaded 'Serial Port 0' (serial:/dev/tts/0) from 'libgphoto2_port_serial.so'
0.563104 gphoto2-port-info-list(2): Loaded 'Serial Port 1' (serial:/dev/tts/1) from 'libgphoto2_port_serial.so'
0.564465 gphoto2-port-info-list(2): Loaded 'Serial Port 2' (serial:/dev/tts/2) from 'libgphoto2_port_serial.so'
0.564769 gphoto2-port-info-list(2): Loaded 'Serial Port 3' (serial:/dev/tts/3) from 'libgphoto2_port_serial.so'
0.564984 gphoto2-port-info-list(2): Loaded '' (^serial) from 'libgphoto2_port_serial.so'
0.565894 gphoto2-port-info-list(2): Loaded 'Universal Serial Bus' (usb:) from 'libgphoto2_port_usb.so'
0.566220 gphoto2-port-info-list(2): Counting entries (6 available)...
0.566434 gphoto2-port-info-list(2): 5 regular entries available.
0.566641 gphoto2-port(2): Creating new device...
0.566860 gphoto2-port-info-list(2): Getting info of entry 0 (6 available)...
0.567139 gphoto2-port(2): Setting timeout to 500 millisecond(s)...
0.567399 gphoto2-port(2): Setting settings...
0.567606 gphoto2-port-info-list(2): Getting info of entry 1 (6 available)...
0.567882 gphoto2-port(2): Setting timeout to 500 millisecond(s)...
0.568097 gphoto2-port(2): Setting settings...
0.568300 gphoto2-port-info-list(2): Getting info of entry 2 (6 available)...
0.568572 gphoto2-port(2): Setting timeout to 500 millisecond(s)...
0.568786 gphoto2-port(2): Setting settings...
0.568990 gphoto2-port-info-list(2): Getting info of entry 3 (6 available)...
0.569258 gphoto2-port(2): Setting timeout to 500 millisecond(s)...
0.569470 gphoto2-port(2): Setting settings...
0.569672 gphoto2-port-info-list(2): Getting info of entry 4 (6 available)...
0.570325 gphoto2-port(2): Setting timeout to 5000 millisecond(s)...
0.570562 gphoto2-port(2): Setting settings...
0.570764 gphoto2-abilities-list.c(1): Auto-detecting USB cameras...
0.570986 gphoto2-port(0): Could not find USB device (vendor 0x553, product 0x202). Make sure this device is connected to the computer.
...
0.716902 gphoto2-port(0): Could not find USB device (vendor 0x93a, product 0x10f). Make sure this device is connected to the computer.
0.717118 gphoto2-port(2): Freeing port...
0.717312 gphoto2-port(2): Closing port...
0.717730 context(0): Could not detect any camera
*** Error ***
Could not detect any camera
*** Error (-105: 'Unknown model') ***
For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list <gphoto-devel@lists.sourceforge.net>, please run
gphoto2 as follows:
env LANG=C gphoto2 --debug --debug -P --debug
Please make sure there is sufficient quoting around the arguments.
0.720401 gp-camera(2): Freeing camera...
0.720611 gphoto2-port(2): Freeing port...
0.720814 libgphoto2/gphoto2-filesys.c(2): Clearing fscache LRU list...
0.721014 libgphoto2/gphoto2-filesys.c(2): fscache LRU list already empty
0.721214 gphoto2-filesystem(2): Internally deleting all folders from '/'...
|
BTW: this are the groups I am in:
Quote: | $ groups
tty lp wheel cron audio cdrom dialout at video games cdrw usb users |
Does anyone have an idea?
Thanx
menschmeier _________________ Please notice the back of this message.
Last edited by menschmeier on Fri Aug 18, 2006 2:41 pm; edited 1 time in total |
|
Back to top |
|
|
tSp Apprentice
Joined: 19 Jan 2004 Posts: 214 Location: Maysville, KY
|
|
Back to top |
|
|
menschmeier l33t
Joined: 15 Dec 2004 Posts: 727
|
Posted: Fri Aug 18, 2006 1:33 pm Post subject: |
|
|
Hi,
I am sure you are right, before I have been using udev (it was devfs if I remeber correctly) it worked ...
My problem now is to find the correct device.
/var/log/message doesn't show it to me:
Quote: |
Aug 18 15:27:36 moon hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0004
Aug 18 15:27:36 moon ehci_hcd 0000:00:1d.7: GetStatus port 2 status 001803 POWER sig=j CSC CONNECT
Aug 18 15:27:36 moon hub 1-0:1.0: port 2, status 0501, change 0001, 480 Mb/s
Aug 18 15:27:36 moon hub 1-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x501
Aug 18 15:27:36 moon ehci_hcd 0000:00:1d.7: port 2 full speed --> companion
Aug 18 15:27:36 moon ehci_hcd 0000:00:1d.7: GetStatus port 2 status 003801 POWER OWNER sig=j CONNECT
Aug 18 15:27:36 moon uhci_hcd 0000:00:1d.0: wakeup_rh (auto-start)
Aug 18 15:27:36 moon hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0004
Aug 18 15:27:36 moon uhci_hcd 0000:00:1d.0: port 2 portsc 0093,00
Aug 18 15:27:36 moon hub 2-0:1.0: port 2, status 0101, change 0001, 12 Mb/s
Aug 18 15:27:36 moon hub 2-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x101
Aug 18 15:27:37 moon usb 2-2: new full speed USB device using uhci_hcd and address 12
Aug 18 15:27:37 moon usb 2-2: ep0 maxpacket = 32
Aug 18 15:27:37 moon usb 2-2: default language 0x0409
Aug 18 15:27:37 moon usb 2-2: new device strings: Mfr=1, Product=2, SerialNumber=0
Aug 18 15:27:37 moon usb 2-2: Product: Canon Digital Camera
Aug 18 15:27:37 moon usb 2-2: Manufacturer: Canon Inc.
Aug 18 15:27:37 moon usb 2-2: uevent
Aug 18 15:27:37 moon usb 2-2: configuration #1 chosen from 1 choice
Aug 18 15:27:37 moon usb 2-2: adding 2-2:1.0 (config #1, interface 0)
Aug 18 15:27:37 moon usb 2-2:1.0: uevent
Aug 18 15:27:37 moon drivers/usb/core/inode.c: creating file '012'
Aug 18 15:27:37 moon hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0004
|
I can't see which device is used ...
I did an
twice an redirected the output in separate file. A diff showed me the following:
Quote: | # diff /tmp/dev1 /tmp/dev2
324c324
< crw------- 1 root root 4, 12 Aug 18 15:07 tty12
---
> crw------- 1 root root 4, 12 Aug 18 15:10 tty12
672c672
< drwxr-xr-x 2 root root 80 Aug 18 15:07 002
---
> drwxr-xr-x 2 root root 60 Aug 18 15:10 002
683d682
< crw-r--r-- 1 root root 189, 136 Aug 18 15:07 009
760c759
< crw------- 1 steffen tty 136, 2 Aug 18 15:07 2
---
> crw------- 1 steffen tty 136, 2 Aug 18 15:10 2
|
Looking into the files I saw the differences:
Quote: |
./bus/usb/002:
total 0
crw-r--r-- 1 root root 189, 128 Aug 18 08:53 001
crw-r--r-- 1 root root 189, 136 Aug 18 15:07 009
|
and
Quote: |
./bus/usb/002:
total 0
crw-r--r-- 1 root root 189, 128 Aug 18 08:53 001
|
Looking inside /etc/udev/rules.d/50-udev.rules:
Quote: |
# tty devices
KERNEL=="ttyS[0-9]*", NAME="%k", SYMLINK="tts/%n", GROUP="tty"
KERNEL=="ttyUSB[0-9]*", NAME="%k", SYMLINK="tts/USB%n", GROUP="tty", MODE="0660"
KERNEL=="ippp0", NAME="%k", GROUP="tty"
KERNEL=="isdn*" NAME="%k", GROUP="tty"
KERNEL=="dcbri*", NAME="%k", GROUP="tty"
KERNEL=="ircomm*", NAME="%k", GROUP="tty"
# usb devices
KERNEL=="hiddev*", NAME="usb/%k", GROUP="usb"
KERNEL=="auer*", NAME="usb/%k", GROUP="usb"
KERNEL=="legousbtower*", NAME="usb/%k", GROUP="usb"
KERNEL=="dabusb*", NAME="usb/%k", GROUP="usb"
BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k", GROUP="lp"
|
I set all usb device to group "usb", but this didn't help.
menschmeier _________________ Please notice the back of this message. |
|
Back to top |
|
|
Kabuto l33t
Joined: 01 Aug 2002 Posts: 701
|
|
Back to top |
|
|
menschmeier l33t
Joined: 15 Dec 2004 Posts: 727
|
Posted: Fri Aug 18, 2006 2:41 pm Post subject: |
|
|
Thanks Kabuto,
adding plugdev group solved the problem, so simple can it be if you know it ...
menschmeier _________________ Please notice the back of this message. |
|
Back to top |
|
|
|
|
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
|
|