# please help me configure my camera

## oldefortran

I have a canon powershot A430 and I know it works in gentoo, and it has done that before, but now I've emerged a lttle too much I think, or done something else bad.

cat /proc/bus/usb/devices

shows

S:  Manufacturer=Canon Inc.

S:  Product=Canon Digital Camera

fine, but

# gphoto2 --auto-detect

Model                          Port

----------------------------------------------------------

is not as fun. What should I do?

----------

## quark

 *oldefortran wrote:*   

> ..., but now I've emerged a lttle too much I think, or done something else bad.

 

What could that be - emerging too much?  :Wink: 

Seriously speeking, what does

```
dmesg
```

say after you've plugged in the camera? What about gphoto2 if you add the port your camera is using i.e.

```
gphoto2 --auto-detect --port=usb:
```

 (for one using usb port)?

----------

## oldefortran

dmesg says

hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0040

ehci_hcd 0000:00:02.2: GetStatus port 6 status 001803 POWER sig=j CSC CONNECT

hub 1-0:1.0: port 6, status 0501, change 0001, 480 Mb/s

hub 1-0:1.0: debounce: port 6: total 100ms stable 100ms status 0x501

ehci_hcd 0000:00:02.2: port 6 full speed --> companion

ehci_hcd 0000:00:02.2: GetStatus port 6 status 003001 POWER OWNER sig=se0 CONNECT

ohci_hcd 0000:00:02.1: auto-wakeup root hub

hub 1-0:1.0: port 6 not reset yet, waiting 50ms

ehci_hcd 0000:00:02.2: GetStatus port 6 status 003802 POWER OWNER sig=j CSC

hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0040

hub 3-0:1.0: state 7 ports 3 chg 0000 evt 0008

ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus [2] = 0x00010101 CSC PPS CCS

hub 3-0:1.0: port 3, status 0101, change 0001, 12 Mb/s

hub 3-0:1.0: debounce: port 3: total 100ms stable 100ms status 0x101

ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus [2] = 0x00100103 PRSC PPS PES CCS

usb 3-3: new full speed USB device using ohci_hcd and address 2

ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus [2] = 0x00100103 PRSC PPS PES CCS

usb 3-3: ep0 maxpacket = 8

usb 3-3: default language 0x0409

usb 3-3: new device strings: Mfr=1, Product=2, SerialNumber=0

usb 3-3: Product: Canon Digital Camera

usb 3-3: Manufacturer: Canon Inc.

usb 3-3: uevent

usb 3-3: usb_probe_device

usb 3-3: configuration #1 chosen from 1 choice

usb 3-3: adding 3-3:1.0 (config #1, interface 0)

usb 3-3:1.0: uevent

drivers/usb/core/inode.c: creating file '002'

hub 3-0:1.0: state 7 ports 3 chg 0000 evt 0008

and if I did this right, this is what I get

 gphoto2 --auto-detect --port=usb:3-3

Model                          Port

----------------------------------------------------------

Nothing.  :Sad: 

----------

## quark

 *oldefortran wrote:*   

> gphoto2 --auto-detect --port=usb:3-3

 

I would've tried without '3-3' but don't know if it makes a difference.

A strange problem... Do you remember if you have edited the device files in /etc/hotplug/ by yourself? Maybe something got overwritten there. IMHO the best is to use as new libgphoto2 and gphoto2 as possible (i.e. ~x86 or ~amd64), especially if your device is newish.

----------

## oldefortran

without the 3-3 it's the same result

Model                          Port

----------------------------------------------------------

nothing.

I use  the latest (~x86)

gphoto2-2.3.1

libgphoto2-2.3.1-r4

----------

## quark

What about the other the other question? Do you remember modifying the hotplug files?

----------

## oldefortran

 *quark wrote:*   

> What about the other the other question? Do you remember modifying the hotplug files?

 

Oh, sorry, I can't remember that.

----------

## oldefortran

What should they look like?

----------

## yewsif

Try running gphoto2 as root and see if it sees the camera. I've had similar permission problems...

----------

## oldefortran

I'm currently running everything as root  but no success.

----------

## tomk

Did you set the CAMERAS variable in your /etc/make.conf?

----------

## oldefortran

I've re-emerged with CAMERAS="canon" 

but I get the same result. I do hear some ratteling in the harddrive when I plug it in (and it shows up in devices), so somethign happens, but root can still not use it.

http://gentoo-wiki.com/Gphoto2 is quite light on troubleshooting   :Sad: 

and

http://www.gphoto.org/doc/manual/permissions-usb.html

makes very little sense since I have no clue about what applies to me.

----------

## oldefortran

gphoto2 -P

gives me

*** Error ***

Could not detect any camera

*** Error (-105: 'Unknown model') ***

And 

env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt -P

gives me all the text below (sorry for the lot of text, I did cut out some similar lines and replace wth ...........)

0.000008 main(2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES TO THE MAILING LIST:

0.000071 main(2): gphoto2 2.3.1

0.000080 main(2): gphoto2 has been compiled with the following options:

0.000087 main(2):  + i686-pc-linux-gnu-gcc (C compiler used)

0.000093 main(2):  + popt (mandatory, for handling command-line parameters)

0.000099 main(2):  + exif (for displaying EXIF information)

0.000105 main(2):  + cdk (for accessing configuration options)

0.000111 main(2):  + no aa (for displaying live previews)

0.000117 main(2):  + no jpeg (for displaying live previews in JPEG format)

0.000122 main(2):  + readline (for easy navigation in the shell)

0.000132 main(2): libgphoto2 2.3.1

0.000140 main(2): libgphoto2 has been compiled with the following options:

0.000146 main(2):  + i686-pc-linux-gnu-gcc (C compiler used)

0.000154 main(2):  + ltdl (for portable loading of camlibs)

0.000160 main(2):  + EXIF (for special handling of EXIF files)

0.000167 main(2): libgphoto2_port 0.7.1

0.000175 main(2): libgphoto2_port has been compiled with the following options:

0.000181 main(2):  + i686-pc-linux-gnu-gcc (C compiler used)

0.000187 main(2):  + ltdl (for portable loading of camlibs)

0.000193 main(2):  + USB (libusb, for USB cameras)

0.000199 main(2):  + serial (for serial cameras)

0.000205 main(2):  + no resmgr (serial port access and locking)

0.000211 main(2):  + no baudboy (serial port locking)

0.000217 main(2):  + no ttylock (serial port locking)

0.000222 main(2):  + no lockdev (serial port locking)

0.000229 main(2): CAMLIBS env var not set, using compile-time default instead

0.000235 main(2): IOLIBS env var not set, using compile-time default instead

0.001091 main(2): The user has not specified both a model and a port. Try to figure them out.

0.001125 gphoto2-port-info-list(2): Using ltdl to load io-drivers from '/usr/lib/libgphoto2_port/0.7.1'...

0.001255 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_port/0.7.1/disk'.

0.001982 gphoto2-port/disk(2): hal_initialize failed: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

0.002051 gphoto2-port-info-list(2): Could not load port driver list: 'libhal error'.

0.002063 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_port/0.7.1/ptpip'.

0.002266 gphoto2-port-info-list(2): Loaded 'PTP/IP Connection' ('ptpip:') from '/usr/lib/libgphoto2_port/0.7.1/ptpip'.

0.002281 gphoto2-port-info-list(2): Loaded '' ('^ptpip') from '/usr/lib/libgphoto2_port/0.7.1/ptpip'.

0.002290 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_port/0.7.1/serial'.

0.002468 gphoto2-port-serial(2): Trying to lock '/dev/tts/0'...

0.002537 gphoto2-port-serial(2): Trying to lock '/dev/tts/1'...

0.002572 gphoto2-port-serial(2): Trying to lock '/dev/tts/2'...

0.002606 gphoto2-port-serial(2): Trying to lock '/dev/tts/3'...

0.002738 gphoto2-port-info-list(2): Loaded 'Serial Port 0' ('serial:/dev/tts/0') from '/usr/lib/libgphoto2_port/0.7.1/serial'.

0.002750 gphoto2-port-info-list(2): Loaded 'Serial Port 1' ('serial:/dev/tts/1') from '/usr/lib/libgphoto2_port/0.7.1/serial'.

0.002758 gphoto2-port-info-list(2): Loaded 'Serial Port 2' ('serial:/dev/tts/2') from '/usr/lib/libgphoto2_port/0.7.1/serial'.

0.002765 gphoto2-port-info-list(2): Loaded 'Serial Port 3' ('serial:/dev/tts/3') from '/usr/lib/libgphoto2_port/0.7.1/serial'.

0.002773 gphoto2-port-info-list(2): Loaded '' ('^serial') from '/usr/lib/libgphoto2_port/0.7.1/serial'.

0.002781 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_port/0.7.1/usb'.

0.003356 gphoto2-port-info-list(2): Loaded 'Universal Serial Bus' ('usb:') from '/usr/lib/libgphoto2_port/0.7.1/usb'.

0.003369 gphoto2-port-info-list(2): Loaded '' ('^usb:') from '/usr/lib/libgphoto2_port/0.7.1/usb'.

0.003387 gphoto2-port-info-list(2): Counting entries (9 available)...

0.003395 gphoto2-port-info-list(2): 6 regular entries available.

0.003857 gphoto2-abilities-list(2): Using ltdl to load camera libraries from '/usr/lib/libgphoto2/2.3.1'...

0.004462 gphoto2-abilities-list(2): Found '/usr/lib/libgphoto2/2.3.1/canon'.

0.004518 gp-abilities-list(2): Found 1 camera drivers.

0.018560 gphoto2-port-info-list(2): Counting entries (9 available)...

0.018588 gphoto2-port-info-list(2): 6 regular entries available.

0.018596 gphoto2-port(2): Creating new device...

0.018615 gphoto2-port-info-list(2): Getting info of entry 0 (9 available)...

0.018929 gphoto2-port(2): Setting settings...

0.018941 gphoto2-port-info-list(2): Getting info of entry 1 (9 available)...

0.019148 gphoto2-port(2): Setting timeout to 500 millisecond(s)...

0.019159 gphoto2-port(2): Setting settings...

0.019174 gphoto2-port-info-list(2): Getting info of entry 2 (9 available)...

0.019345 gphoto2-port(2): Setting timeout to 500 millisecond(s)...

0.019357 gphoto2-port(2): Setting settings...

0.019368 gphoto2-port-info-list(2): Getting info of entry 3 (9 available)...

0.019537 gphoto2-port(2): Setting timeout to 500 millisecond(s)...

0.019549 gphoto2-port(2): Setting settings...

0.019559 gphoto2-port-info-list(2): Getting info of entry 4 (9 available)...

0.019728 gphoto2-port(2): Setting timeout to 500 millisecond(s)...

0.019740 gphoto2-port(2): Setting settings...

0.019750 gphoto2-port-info-list(2): Getting info of entry 5 (9 available)...

0.020144 gphoto2-port(2): Setting timeout to 5000 millisecond(s)...

0.020155 gphoto2-port(2): Setting settings...

0.020163 gphoto2-abilities-list.c(1): Auto-detecting USB cameras...

0.020199 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x3047). Make sure this device is connected to the computer.

0.020211 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30c0). Make sure this device is connected to the computer.

......................................

0.021516 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x3078). Make sure this device is connected to the computer.

0.021531 gphoto2-port(2): Freeing port...

0.021544 gphoto2-port(2): Closing port...

0.021586 setting/gphoto2-setting.c(2): Creating $HOME/.gphoto

0.021673 setting/gphoto2-setting.c(2): Loading settings from file "/root/.gphoto/settings"

0.021749 gphoto2-abilities-list(0): Could not find any driver for 'Canon PowerShot A430 (PTP mode)'

0.021776 gphoto2-port-info-list(2): Looking for path 'usb:' (9 entries available)...

0.021791 gphoto2-port-info-list(2): Getting info of entry 5 (9 available)...

0.021806 gphoto2-camera(2): Setting port info for port 'Universal Serial Bus' at 'usb:'...

0.022154 gphoto2-port(2): Setting timeout to 5000 millisecond(s)...

0.022166 gphoto2-port(2): Setting settings...

0.022175 gphoto2-setting(2): Setting key 'port' to value 'usb:' (gphoto2)

0.022184 gphoto2-setting(2): Saving 3 setting(s) to file "/root/.gphoto/settings"

0.022660 gphoto2-camera(2): Listing files in '/'...

0.022676 gphoto2-camera(2): Initializing camera...

0.023114 gphoto2-camera(2): Neither port nor model set. Trying auto-detection...

0.023143 gphoto2-abilities-list(2): Using ltdl to load camera libraries from '/usr/lib/libgphoto2/2.3.1'...

0.023686 gphoto2-abilities-list(2): Found '/usr/lib/libgphoto2/2.3.1/canon'.

0.023701 gp-abilities-list(2): Found 1 camera drivers.

0.041462 gphoto2-port-info-list(2): Using ltdl to load io-drivers from '/usr/lib/libgphoto2_port/0.7.1'...

0.041552 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_port/0.7.1/disk'.

0.042304 gphoto2-port/disk(2): hal_initialize failed: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

0.042370 gphoto2-port-info-list(2): Could not load port driver list: 'libhal error'.

0.042381 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_port/0.7.1/ptpip'.

0.042588 gphoto2-port-info-list(2): Loaded 'PTP/IP Connection' ('ptpip:') from '/usr/lib/libgphoto2_port/0.7.1/ptpip'.

0.042600 gphoto2-port-info-list(2): Loaded '' ('^ptpip') from '/usr/lib/libgphoto2_port/0.7.1/ptpip'.

0.042609 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_port/0.7.1/serial'.

0.042794 gphoto2-port-serial(2): Trying to lock '/dev/tts/0'...

0.042967 gphoto2-port-serial(2): Trying to lock '/dev/tts/1'...

0.043003 gphoto2-port-serial(2): Trying to lock '/dev/tts/2'...

0.043037 gphoto2-port-serial(2): Trying to lock '/dev/tts/3'...

0.043172 gphoto2-port-info-list(2): Loaded 'Serial Port 0' ('serial:/dev/tts/0') from '/usr/lib/libgphoto2_port/0.7.1/serial'.

0.043184 gphoto2-port-info-list(2): Loaded 'Serial Port 1' ('serial:/dev/tts/1') from '/usr/lib/libgphoto2_port/0.7.1/serial'.

0.043193 gphoto2-port-info-list(2): Loaded 'Serial Port 2' ('serial:/dev/tts/2') from '/usr/lib/libgphoto2_port/0.7.1/serial'.

0.043201 gphoto2-port-info-list(2): Loaded 'Serial Port 3' ('serial:/dev/tts/3') from '/usr/lib/libgphoto2_port/0.7.1/serial'.

0.043209 gphoto2-port-info-list(2): Loaded '' ('^serial') from '/usr/lib/libgphoto2_port/0.7.1/serial'.

0.043218 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_port/0.7.1/usb'.

0.043512 gphoto2-port-info-list(2): Loaded 'Universal Serial Bus' ('usb:') from '/usr/lib/libgphoto2_port/0.7.1/usb'.

0.043524 gphoto2-port-info-list(2): Loaded '' ('^usb:') from '/usr/lib/libgphoto2_port/0.7.1/usb'.

0.043538 gphoto2-port-info-list(2): Counting entries (9 available)...

0.043548 gphoto2-port-info-list(2): 6 regular entries available.

0.043556 gphoto2-port(2): Creating new device...

0.043569 gphoto2-port-info-list(2): Getting info of entry 0 (9 available)...

0.043740 gphoto2-port(2): Setting settings...

0.043752 gphoto2-port-info-list(2): Getting info of entry 1 (9 available)...

0.043927 gphoto2-port(2): Setting timeout to 500 millisecond(s)...

0.043939 gphoto2-port(2): Setting settings...

0.043952 gphoto2-port-info-list(2): Getting info of entry 2 (9 available)...

0.044125 gphoto2-port(2): Setting timeout to 500 millisecond(s)...

0.044136 gphoto2-port(2): Setting settings...

0.044147 gphoto2-port-info-list(2): Getting info of entry 3 (9 available)...

0.046632 gphoto2-port(2): Setting timeout to 500 millisecond(s)...

0.046663 gphoto2-port(2): Setting settings...

0.046681 gphoto2-port-info-list(2): Getting info of entry 4 (9 available)...

0.046949 gphoto2-port(2): Setting timeout to 500 millisecond(s)...

0.046961 gphoto2-port(2): Setting settings...

0.046972 gphoto2-port-info-list(2): Getting info of entry 5 (9 available)...

0.047277 gphoto2-port(2): Setting timeout to 5000 millisecond(s)...

0.047289 gphoto2-port(2): Setting settings...

0.047297 gphoto2-abilities-list.c(1): Auto-detecting USB cameras...

0.047327 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x3047). Make sure this device is connected to the computer.

0.047338 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x30c0). Make sure this device is connected to the computer.

.......................................................

0.048488 gphoto2-port(0): Could not find USB device (vendor 0x4a9, product 0x3078). Make sure this device is connected to the computer.

0.048497 gphoto2-port(2): Freeing port...

0.048506 gphoto2-port(2): Closing port...

0.048568 context(0): Could not detect any camera

0.050248 gp-camera(2): Freeing camera...

0.050262 gphoto2-port(2): Freeing port...

0.050270 gphoto2-port(2): Closing port...

0.050314 libgphoto2/gphoto2-filesys.c(2): Clearing fscache LRU list...

0.050324 libgphoto2/gphoto2-filesys.c(2): fscache LRU list already empty

0.050331 gphoto2-filesystem(2): Internally deleting all folders from '/'...

----------

## tomk

 *oldefortran wrote:*   

> I've re-emerged with CAMERAS="canon" 
> 
> but I get the same result.

 

You need to include ptp2 for many of the powershot models, but if you didn't have CAMERAS set before then it would have built all the drivers so that won't be what the problem is.

----------

## oldefortran

The perhaps I should look at the config files in /etc ?

Which files and what should they look like? Aren't there any config tool for this? As

I said, I do not understand much of the mumbojumbo in the gphoto documentation.

----------

## oldefortran

Well

putting both canon and ptp2 in make.conf made it ask to overwrite 

/etc/udev/rules.d/._cfg0000_99-libgphoto2.rules

with new configfile, and then, 

I get

gphoto2 --auto-detect

Model                          Port

----------------------------------------------------------

Canon PowerShot A430 (PTP mode) usb:

I can't believe it!

but

 gphoto2 -P

takes for ever and finaly says:

*** Error ***

PTP I/O error

*** Error ***

An error occurred in the io-library ('Unspecified error'): Could not query kernel driver of device.

*** Error (-1: 'Unspecified error') ***

----------

## quark

At least we are proceeding here... What appears in dmesg after you try gphoto2?

----------

## oldefortran

I'm thrilled!

Any configuration files that I should check?

dmesg output below

hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0040

ehci_hcd 0000:00:02.2: GetStatus port 6 status 001803 POWER sig=j CSC CONNECT

hub 1-0:1.0: port 6, status 0501, change 0001, 480 Mb/s

hub 1-0:1.0: debounce: port 6: total 100ms stable 100ms status 0x501

ehci_hcd 0000:00:02.2: port 6 full speed --> companion

ehci_hcd 0000:00:02.2: GetStatus port 6 status 003001 POWER OWNER sig=se0 CONNECT

ohci_hcd 0000:00:02.1: auto-wakeup root hub

hub 1-0:1.0: port 6 not reset yet, waiting 50ms

ehci_hcd 0000:00:02.2: GetStatus port 6 status 003802 POWER OWNER sig=j CSC

hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0040

hub 3-0:1.0: state 7 ports 3 chg 0000 evt 0008

ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus [2] = 0x00010101 CSC PPS CCS

hub 3-0:1.0: port 3, status 0101, change 0001, 12 Mb/s

hub 3-0:1.0: debounce: port 3: total 100ms stable 100ms status 0x101

ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus [2] = 0x00100103 PRSC PPS PES CCS

usb 3-3: new full speed USB device using ohci_hcd and address 2

ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus [2] = 0x00100103 PRSC PPS PES CCS

usb 3-3: ep0 maxpacket = 8

usb 3-3: default language 0x0409

usb 3-3: new device strings: Mfr=1, Product=2, SerialNumber=0

usb 3-3: Product: Canon Digital Camera

usb 3-3: Manufacturer: Canon Inc.

usb 3-3: uevent

usb 3-3: usb_probe_device

usb 3-3: configuration #1 chosen from 1 choice

usb 3-3: adding 3-3:1.0 (config #1, interface 0)

usb 3-3:1.0: uevent

drivers/usb/core/inode.c: creating file '002'

hub 3-0:1.0: state 7 ports 3 chg 0000 evt 0008

 usbdev3.2_ep01: ep_device_release called for usbdev3.2_ep01

 usbdev3.2_ep82: ep_device_release called for usbdev3.2_ep82

 usbdev3.2_ep83: ep_device_release called for usbdev3.2_ep83

----------

## quark

What about with the root priviledges? Is your user in the plugdev group?

----------

## oldefortran

I do everything here as root.

root is not explictly written as a member in plugdev group, but my "regular" userid  is in plugdev but get the same error as root.

----------

## Kabuto

Do you have USB Device Filesystem (usbfs) built in your kernel?

Also try:

"LANG=C gphoto2 --get-all-thumbnails --debug"Last edited by Kabuto on Tue Jul 17, 2007 7:34 pm; edited 1 time in total

----------

## oldefortran

I have

CONFIG_USB_DEVICEFS=y

----------

## oldefortran

WTF???? 

All of a sudden gphoto2 -P downloads  all the images.

I can't believe it.

I will not change the subject to "solved" since it's not solved, since something supernatural  has happend, no proper configuration to fix it.

I have though emerge -uDv world for a few days now, so one of them might have fixed it. But I don't know what.

Dang.

----------

## quark

Maybe you had some bad libraries or old configuration files laying around. Great it works now.

----------

## oldefortran

And today it stops working.   :Mad:   :Crying or Very sad: 

Is there a windows-emulation  option that I have to turn off to get it working a little less random?   :Wink: 

Seriously, I don't get it.

----------

## quark

 *oldefortran wrote:*   

> Is there a windows-emulation  option that I have to turn off to get it working a little less random?  

 

Hilarious  :Wink: 

Did you do anything else than reboot the machine? New kernel? Updated packages/configuration files? Anything?

----------

## oldefortran

I have done som emerge -uDv world without much consideration  :Sad: 

Perhaps I can find out which in /var/log/portage?

----------

