# Canon PowerShot S400?

## agilen

Has anyone had success getting a Canon PowerShot S400 to work with gphoto2?  I hook it up to the USB port, but dmesg says "USB device 3 (vend/prod 0x4a9/0x3075) is not claimed by any active driver."  I tried adding that vendor and product number to usb.usermap, but still the same result.

gphoto2 can connect to the camera, but usually after one operation (ie, "gphoto2 --list-files") it gives a segmentation fault, and every subsequent gphoto2 call gives a PTP I/O Error.  According to gphoto2 --auto-detect, gphoto2 views the model as "USB PTP Class Camera".

Any help would be greatly appreciated.

----------

## Kabuto

Are you using 2.1.1?  If not use it.

It sounds like you are doing it right.  Most people just copy the 0x3055 (G2) and change the PRodID. The only things I can think of is to try more reliable CFLAGS and/or 2.1.1 (~x86) or 2.1.2dev builds (not in portage).  You could also search the Mailling lists at gphoto.com.

----------

## paranode

Hmm I also have this camera and I'm very interested in getting it to work with Linux.  I can't get my CF reader to work in Linux.  If you manage to get anywhere, keep me posted.

----------

## Punch

I've been able to view and download images from the Canon S400 using gphoto2 2.1.1.   It was a little flaky from the commandline with segfaults.   But I started gtkam and rebooted the camera and everything worked fine.  Closing gtkam and bringing back up without rebooting the camera didn't work so well.  So, it's not at 100% but I was at least able to download my pictures.

----------

## paranode

 *Punch wrote:*   

> I've been able to view and download images from the Canon S400 using gphoto2 2.1.1.   It was a little flaky from the commandline with segfaults.   But I started gtkam and rebooted the camera and everything worked fine.  Closing gtkam and bringing back up without rebooting the camera didn't work so well.  So, it's not at 100% but I was at least able to download my pictures.

 

Excellent, I'll check that out when I get home.  Thanks!

----------

## paranode

I don't have a usb.usermap file anywhere on my system.  I think it's supposed to be in /etc/hotplug but it's not anywhere, I searched the whole filesystem.  I do have hot-pluggable devices enabled though, any idea what's going on??

Also, I always get this error when I plug it in:

```
hub.c: new USB device 00:11.2-2, assigned address 18

usb-uhci.c: interrupt, status 2, frame# 1929

usb.c: USB device not accepting new address=18 (error=-110)

hub.c: new USB device 00:11.2-2, assigned address 19

usb.c: USB device not accepting new address=19 (error=-110)
```

The numbers there will keep incrementing as I keep plugging it in.

----------

## Punch

I had to do the following:

gphoto2 --print-usb-usermap >> /etc/hotplug/usb.usermap

mkdir /etc/hotplugusb (if doesn't already exist)

cp /usr/share/doc/libgphoto2/linux-hotplug/usbcam.group  /etc/hotplug/usb/usbcam

Also, make sure /etc/init.d/hotplug is running.  Mine wasn't and I had to add it with rc-update.

----------

## paranode

Yeah that stuff looks right, they also talk about it here.  However, I just keep getting the "USB device not accepting new address" error in dmesg every time I plug it in.  I wonder if perhaps my cable is bad or something because I don't think it works in Windows either.    :Sad: 

----------

## georges

Yes, this is for Debian, but I followed it when I wanted to gte my Canon A40 working. Most of the stuff applies... change it when there is an obvious difference, but most is the same.

http://www.edginet.org/techie/linux/canon.html

----------

## Altanos

Hello everyone,

I've installed digikam. Can everyone tel me, how can I work with it as noneroot?

Thanks 

Altanos

----------

## acidreign

[quote="Altanos"]Hello everyone,

I've installed digikam. Can everyone tel me, how can I work with it as noneroot?

Thanks 

Altanos[/quote]

I figured this out the other night.

Check out the answer at.

https://forums.gentoo.org/viewtopic.php?t=61599&highlight=user+gtkam

----------

## agilen

Success at last!  I have figured out how to get the Canon Powershot S400 to work, and work properly.  The development version of libgphoto2 has the drivers for this camera.  So here is what you do:

First, you need to get rid of the version of libgphoto2 that you have (there may be a better way to do this, but this is what I did.)

```
emerge unmerge libgphoto2
```

Now, you must grab the development version from CVS.  The version I got was 2.1.2dev12, but the version may be different when you do it, so YMMV.  If you don't have cvs already, you need to: 

```
emerge cvs
```

Make a new directory somewhere and cd to it.  Then, grab the tree: 

```
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/gphoto co libgphoto2
```

Next, from that directory, issue these commands:

```
./autogen.sh

./configure --prefix=/usr --with-drivers=ptp2,canon

make

make install
```

Now follow the normal setup instructions for gphoto2.  If all goes properly, gphoto2 --list-cameras will list the S400, and if you plug it in and do gphoto2 --auto-detect, your camera will come up as 'Canon Digital IXUS S400', and gphoto will work without the segfaults, and any frontend should work fine.

Note this solution is somewhat kludgy, and I would suggest that when the next version of libgphoto2 is released, you do a 'make uninstall' in the directory that you downloaded the CVS sources, then do an emerge libgphoto2.  I don't know how to make an ebuild for this, nor do I have the time to learn, however if someone has that kind of talent, I think an ebuild for libgphoto2-cvs would be a good thing.

Have fun.

----------

## Altanos

Thanks a lot,

now my Canon Powershot A70 works fine.

CU

Altanos

----------

## noze

Hmm, something is wrong with my cvs or something. When I try to compile that cvs-version I always get some ncurses-error. Please, help me. I really need to get that Ixus 400-cam work.

----------

## Caffeine

I've managed to get gphoto2 + gtkam working with my IXUS 400 ( aka S400 ) 

Has anyone mangaed to mount it as a USB filesystem? This would be my prefered way to access my camera. 

Also, has anyone got any ideas on how to use this camera as a web cam? 

```
gphoto2 --capture-image
```

 has worked once for me, but not again.

----------

## tovrstra

 *agilen wrote:*   

> 
> 
> Next, from that directory, issue these commands:
> 
> ```
> ...

 

I've tried this, but the configure script complains about libusb being to old. It needs at least 0.1.5, but I have 0.1.7 on my system. An excerpt from the ./configure output:

```

checking for libusb-config... /usr/bin/libusb-config

checking usb.h usability... yes

checking usb.h presence... yes

checking for usb.h... yes

checking for usb_busses in -lusb... no

configure: WARNING:

*** You need at least version 0.1.5 of the libusb library for USB support

*** http://sourceforge.net/projects/libusb/

*** If you cannot find the appropriate version, try CVS

 
```

Does anyone know what to do with this? Thanks

----------

## BitJam

 *Caffeine wrote:*   

> I've managed to get gphoto2 + gtkam working with my IXUS 400 ( aka S400 ) 
> 
> Has anyone mangaed to mount it as a USB filesystem? This would be my prefered way to access my camera.

 

I posted instructions yesterday on how I was able to mount my camera as a USB file system:

https://forums.gentoo.org/viewtopic.php?p=462437#462437

They should work for any camera that has a "mass-storage" option or is configured to appear as "mass-storage".

----------

## Kabuto

 *Quote:*   

> I've tried this, but the configure script complains about libusb being to old. It needs at least 0.1.5, but I have 0.1.7 on my system. An excerpt from the ./configure output:

 

Try to re-emerge libusb.  If you have usbutils installed it put an incompatible version on you computer overwriting libusb.

----------

## tovrstra

 *Kabuto wrote:*   

>  *Quote:*   I've tried this, but the configure script complains about libusb being to old. It needs at least 0.1.5, but I have 0.1.7 on my system. An excerpt from the ./configure output: 
> 
> Try to re-emerge libusb.  If you have usbutils installed it put an incompatible version on you computer overwriting libusb.

 

Hey thanks! It almost works great. I can perfectly use gphoto2 as root or as normal user. But when I try to use gtkm I encounter a problem which I didn't find exactly in the forums. When I try to select my camera in gtkam (a canon digital ixus 400 over usb) I get two dialogs entiteld with "bad parameters":

first dialog: "Could not initialize camera"'

second dialog: "Could not list folders in '/'."

The second dialog is on top of the first one. I've tried if this is a permissions problem with:

chmod -R 777 /proc/bus/usb

but this is not the case. The same dialogs still apear. This problem occurs as normal user and as root. Does someone know what could be causing these "bad parameters" dialogs? Thanks.

----------

