# Problem with Canon PowerShot A95 and gtkam

## jorrit

Hi all,

Upto now this has always worked but today I try to plug in my Canon PowerShot A95 digital camera into my laptop and then I fire up 'gtkam'. I get the following error:

 *Quote:*   

> 
> 
> Could not lst folders in '/'
> 
> An error occured in the io-library ('Bad parameters'): Could
> ...

 

When I plug in the camera in the usb port I can see the following with dmesg:

 *Quote:*   

> 
> 
> usb 2-1: new full speed USB device using ohci_hcd and address 4
> 
> usb 2-1: configuration #1 chosen from 1 choice
> ...

 

In the past all of this worked. Since then I did emerge -u some stuff but nothing that should affect this I think. I'm using Gentoo on an AMD64 btw. Any idea what could be wrong? How can I debug this stuff?

Greetings and thanks in advance,

----------

## mahdi1234

Gtkam is base on gphoto ... the best is to see what gphoto says ...

You can see for more details - http://www.gphoto.org/doc/manual/using-gphoto2.html - the most important for you gphoto2 --summary, to see whether your camera was recognized.

btw -  could it be your camera has switch between ptp and pict bridge or something similar for usb connection? Then switch it back to ptp.

----------

## jorrit

 *mahdi1234 wrote:*   

> Gtkam is base on gphoto ... the best is to see what gphoto says ...
> 
> You can see for more details - http://www.gphoto.org/doc/manual/using-gphoto2.html - the most important for you gphoto2 --summary, to see whether your camera was recognized.
> 
> btw -  could it be your camera has switch between ptp and pict bridge or something similar for usb connection? Then switch it back to ptp.

 

ghoto2 --summary says:

 *Quote:*   

> 
> 
> jorrit@acerlin ~ $ gphoto2 --summary
> 
> *** Error ***
> ...

 

And no. I didn't change anything on the camera.

Greetings,

----------

## mahdi1234

How about gphoto2 --list-ports and gphoto2 --auto-detect?

----------

## jorrit

 *mahdi1234 wrote:*   

> How about gphoto2 --list-ports and gphoto2 --auto-detect?

 

list-ports lists six connections: PTP/IP, serial port 0 through 3, and universal serial bus.

--auto-detect doesn't do anything.

Greetings,

----------

## Kabuto

First try as root to make sure you don't have a rights issue.  Also I think I saw on the Gphoto ML there was an update in the latest GPhoto for Canons that actually broke some.  You can try to emerge an older version if the root thing doesn't help.

----------

## Ray ishido

have you enable the canon useflag emerging libgphoto2?

It work well with my A95 and my laptop (toshiba)

----------

## jorrit

 *Ray ishido wrote:*   

> have you enable the canon useflag emerging libgphoto2?
> 
> It work well with my A95 and my laptop (toshiba)

 

That use flag doesn't exist for the latest stable libgphoto2 2.2.2.1-r1. These use flags were only added later. And it has also worked before.

Greetings,

----------

## Kabuto

Actually he was talking about the CAMERAS= environment setting.  This will allow libgphoto2 to only build the drivers it needs.  I just usually add in to make.conf.  If you don't specify anything, it will default to building all drivers.

Can you do a cat /proc/bus/usb/devices?

----------

## dalek

I have the same problem with the exact same camera.  Here is a boat load of info for ya:

```
root@smoker / # cat /etc/group | grep dale

tty:x:5:dale,dale2

wheel:x:10:root,dale,dale2

floppy:x:11:root,dale,dale2,haldaemon

uucp:x:14:uucp,dale,dale2,nut

audio:x:18:dale,dale2

cdrom:x:19:dale,dale2,haldaemon

dialout:x:20:root,dale,dale2

video:x:27:root,dale,dale2

games:x:35:dale,dale2

cdrw:x:80:dale,dale2,haldaemon

nut:x:84:root,dale,dale2,nut,uucp

usb:x:85:dale,dale2,haldaemon

users:x:100:games,dale,dale2

scanner:x:407:dale

messagebus:x:408:dale,dale2

haldaemon:x:409:dale,dale2,haldaemon

camera:x:450:root,dale,dale2

plugdev:x:451:haldaemon,dale,dale2

wireshark:x:1006:dale,dale2

root@smoker / # 
```

Also note, gphoto2 was NOT installed.  I had to install it for these commands to work:

```
root@smoker / # gphoto2 --list-ports

Devices found: 14

Path                             Description

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

disk:/mnt/gentoo                 Media 'Volume (ext3)'

disk:/mnt/gentoo/boot            Media 'Volume (ext3)'

disk:/data                       Media 'Volume (reiserfs)'

disk:/backup                     Media 'Volume (reiserfs)'

disk:/home                       Media 'Volume (reiserfs)'

disk:/usr/portage                Media 'Volume (reiserfs)'

disk:/                           Media 'Volume (reiserfs)'

disk:/boot                       Media 'Volume (ext2)'

ptpip:                           PTP/IP Connection

serial:/dev/ttyS0                Serial Port 0

serial:/dev/ttyS1                Serial Port 1

serial:/dev/ttyS2                Serial Port 2

serial:/dev/ttyS3                Serial Port 3

usb:                             Universal Serial Bus

root@smoker / # gphoto2 --auto-detect

Model                          Port

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

root@smoker / #   
```

```
root@smoker / # cat /etc/make.conf | grep CAMERAS

CAMERAS="canon"

root@smoker / #
```

```
root@smoker / # emerge -pv gphoto2 libgphoto2 gtkam

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] media-libs/libgphoto2-2.4.1  USE="exif hal -doc -nls" CAMERAS="canon -adc65 -agfa_cl20 -aox -barbie -casio_qv -clicksmart310 -digigr8 -digita -dimagev -dimera3500 -directory -enigma13 -fuji -gsmart300 -hp215 -iclick -jamcam -jd11 -kodak_dc120 -kodak_dc210 -kodak_dc240 -kodak_dc3200 -kodak_ez200 -konica -konica_qm150 -largan -lg_gsm -mars -mustek -panasonic_coolshot -panasonic_dc1000 -panasonic_dc1580 -panasonic_l859 -pccam300 -pccam600 -polaroid_pdc320 -polaroid_pdc640 -polaroid_pdc700 -ptp2 -ricoh -ricoh_g3 -samsung -sierra -sipix_blink -sipix_blink2 -sipix_web2 -smal -sonix -sony_dscf1 -sony_dscf55 -soundvision -spca50x -sq905 -stv0674 -stv0680 -sx330z -template -toshiba_pdrm11" 0 kB

[ebuild   R   ] media-gfx/gphoto2-2.4.1  USE="exif ncurses readline -aalib -nls" 0 kB

[ebuild   R   ] media-gfx/gtkam-0.1.14  USE="gimp -debug -gnome -nls" 0 kB

Total: 3 packages (3 reinstalls), Size of downloads: 0 kB

root@smoker / #  
```

```
oot@smoker / # cat /proc/bus/usb/devices

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.23-gentoo-r8 ohci_hcd

S:  Product=OHCI Host Controller

S:  SerialNumber=0000:00:02.1

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.23-gentoo-r8 ohci_hcd

S:  Product=OHCI Host Controller

S:  SerialNumber=0000:00:02.0

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 39 Spd=12  MxCh= 0

D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=03f0 ProdID=1904 Rev= 1.00

S:  Manufacturer=Hewlett-Packard

S:  Product=DeskJet 3820

S:  SerialNumber=CN2A91D2C618

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA

I:* If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp

E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 38 Spd=12  MxCh= 0

D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs=  1

P:  Vendor=04a9 ProdID=30bb Rev= 0.01

S:  Manufacturer=Canon Inc.

S:  Product=Canon Digital Camera

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA

I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=(none)

E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=96ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 6

B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.23-gentoo-r8 ehci_hcd

S:  Product=EHCI Host Controller

S:  SerialNumber=0000:00:02.2

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

root@smoker / #  
```

Any ideas?  Need more info?

I also tried to back up one version of gtkam.  It failed to compile.  I also noticed that after I deleted the camera and tried adding it again, the Canon Powershot A95 is NOT in the list of cameras it can look for.  That matter any?  Also, digikam and Konqueror can not access the camera either.  I also tried the same as root with no difference.

Thanks

 :Very Happy:   :Very Happy:   :Very Happy: 

----------

## dalek

I got mine working.  There seems to be a bug in the udev rules for this.  I added 

```
ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="30bb", MODE="660", GROUP="plugdev"

```

to the file 

```
/etc/udev/rules.d/70-libgphoto2.rules
```

and it works fine now.

The other lines do not have the MODE part and it does not work without that line either.  Seems to me something is not working quite right.

Not sure if this is related or not but my UPS is not communicating to well either.  It can't connect to the UPS.

What does some guru think about this?

 :Very Happy:   :Very Happy:   :Very Happy: 

----------

## G2k

Same problem here when I connect my Canon PowerShot SD1000, Could not lst folders in '/' An error occured in the io-library ('Bad parameters') etc. etc.

----------

## dalek

 *G2k wrote:*   

> Same problem here when I connect my Canon PowerShot SD1000, Could not lst folders in '/' An error occured in the io-library ('Bad parameters') etc. etc.

 

Did you try my fix?  It works here so far.  It may break on my next update but . . . . .

I'm curious if this is a bug and needs some raid?  I haven't filed anything yet.

 :Very Happy:   :Very Happy: 

----------

## G2k

Fixed. All you have to do is emerge libgphoto2 without the CAMERAS="canon" flag in your /etc/make.conf which is kind of stupid if you ask me. Then you select your camera from the list and it detects it no problem.

----------

## dalek

I think I did that but it may have been gtkam that I re-emerged.  Will try that to tho.  

Does seem sort of silly don't it?

 :Very Happy:   :Very Happy: 

----------

## mambro

Same problem with a Canon PowerShot A720.

I've downgraded to libgphoto 2.2.1-r1 and gphoto 2.2.0 and now it works..

----------

## dalek

 *mambro wrote:*   

> Same problem with a Canon PowerShot A720.
> 
> I've downgraded to libgphoto 2.2.1-r1 and gphoto 2.2.0 and now it works..

 

I have the following installed:

```
root@smoker / # equery list gphoto

[ Searching for package 'gphoto' in all categories among: ]

 * installed packages

[I--] [  ] media-gfx/gphoto2-2.4.1 (0)

[I--] [  ] media-libs/libgphoto2-2.4.1 (0)

root@smoker / #    
```

After changing the file in a previous post, it works fine.  Sort of suspect a bug here.  Maybe we need to file a bug so we can get some Raid?

 :Very Happy:   :Very Happy:   :Very Happy: 

----------

## mambro

Changing the CAMERAS flag it didn't work for me..

A bug report could be a good idea   :Wink: 

----------

## Kabuto

The A720 is a PTP protocol camera so you need CAMERAS="ptp2"

----------

## mambro

 *Kabuto wrote:*   

> The A720 is a PTP protocol camera so you need CAMERAS="ptp2"

 

Same problem.. nothing change

----------

## Kabuto

Are you getting an error message?  Did you try --auto-detect as root?

----------

## mambro

EDIT: I don't know why but it works now!   :Very Happy: 

----------

