PDA

View Full Version : Downloading large AVI files from Canon camera on fc3


MakeMyDay
28th December 2004, 01:26 AM
I'm in the process of converting from Win2000 to fc3. Although I'm still finding my way around fc3, I just solved an issue downloading large AVI files from my Canon S50 camera that may be of benefit to others.

After installing fc3 my camera was detected OK when attached to the USB port, and gThumb would start automatically. I was able to download JPGs and small AVIs, but large AVIs would result in 0 byte files. I didn't spend time much trying to determine the exact size AVI that caused the failure, but I can say a 7MB AVI worked and a 15MB AVI failed.

After some Googling I found a suggestion to update gphoto2 to fix the Canon large file issue. At www.gphoto.org I found 2.1.5 as the latest version of gphoto2, and the change log mentioned large file fixes for Canon. Being new to linux I prefered an RPM. Only place I could find gphoto2-2.1.5 RPM was at www.nrpms.net (gphoto2-2.1.5-1.1.fc3.nr.i386.rpm). I installed the rpm using

rpm -ivhU gphoto2-2.1.5-1.1.fc3.nr.i386.rpm

Now when I attached the camera to USB port gThumb would start but with error message:

An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Operation not permitted). Make sure no other program or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.

However, if I would log in as root then no error message (and now able to download large AVIs). I suspected a permission issue and walked through steps in gphoto2 manual

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

but none of those steps helped. After much trial and error I decided to compare the usbcam scripts in 2.14 and 2.1.5.

Cut from the 2.1.4 script (extraced from gphoto2-2.1.4-7.i386.rpm on the fc3 install disk 2):
if [ -f /var/run/console/console.lock ]
then
CONSOLEOWNER=`cat /var/run/console/console.lock`
elif [ -f /var/lock/console.lock ]
then
CONSOLEOWNER=`cat /var/lock/console.lock`
else
CONSOLEOWNER=
fi
Cut from the 2.1.5 script (found at /etc/hotplug/usb/usbcam)
if [ -f /var/run/console.lock ]
then
CONSOLEOWNER=`cat /var/run/console.lock`
elif [ -f /var/lock/console.lock ]
then
CONSOLEOWNER=`cat /var/lock/console.lock`
else
CONSOLEOWNER=
fi

You can see in two places (marked in red) 2.1.4 has

/var/run/console/console.lock

where 2.1.5 has

/var/run/console.lock

I edited the 2.1.5 script to match 2.1.4 and now the USB error message is gone when logged in as user and I can download large AVIs.

I hope someone finds this useful!

Jman
28th December 2004, 11:59 PM
Moved to How To.

Thanks for sharing your solution.