Hey all. I've modified ptpcam some more to fit my own purposes (remote control from an embedded computer basically). I've been using it without any real problems until just recently.
I realize that the ptpcam version with chdk extensions was never meant to be a long-term solution, but it's come in pretty handy for me. However, with the new Linux 3.0 kernel, things aren't working quite right.
The problem seems to be that ptpcam cannot open a session to the camera:
# ./ptpcam -l
bus/dev vendorID/prodID device model
ERROR: Could not open session!
Try to reset the camera.
I'm using an S95 and ptpcam is running in the Angstrom distro with the 3.0.0 kernel. However, I don't think it's specific to the camera or distro because everything works fine with the same camera and distro but a 2.6.* kernel.
Also, the system can see the camera just fine:
Bus 001 Device 003: ID 04a9:3212 Canon, Inc.
Doing some quicking Googling, it appears that the culprit may be the libusb-0 library:
A project called Digikam was having a similar problem with the new kernel and talking to ptp cameras: https://bugs.launchpad.net/ubuntu/+source/digikam/+bug/865032
In that post, someone linked to this guy's code where he explains about some namespace errors he corrected for that particular project: http://sourceforge.net/tracker/?func=detail&atid=308157&aid=3361405&group_id=8157
I've investigated a crash with digikam (www.digikam.org), that eventually boiled down to a linker namespace conflict. digikam can be compiled with OpenCV support (which in turn can have libdc1394 support) and gphoto2 support (which uses libusb-0). When both are enabled, the 'usb_init' function of libdc1394 will get into namespace before usb_init of libusb.
AFAIK usb_init in libdc1394 is only required internally, so the attached patch alters visibility of methods of libdc1394. I have made public all methods starting with dc1394 prefix. However, an earlier patch is availble on request that enables only methods specified in the API description on the libdc1394 (which will break compilation of OpenCV).
Does ptpcam use libdc1394 (for firewire support)? I didn't think that library was being used, but could it be something else along those lines?
Basically I'm looking for at least a point in the right direction here. I stumbled across this yesterday and I'm just starting to figure this out. If someone knows how I can go about determining what the problem is, I'd be all ears. And if by some chance someone knows how to fix it, that would be great, too!