Problem with downloading videos from Canon Power Shot SX40HS

  • 8 Replies
  • 1629 Views
Problem with downloading videos from Canon Power Shot SX40HS
« on: 16 / August / 2012, 14:08:46 »
Advertisements
Hellow!
When I try download video (longer 3 min) from camera with chdkptp one crach down. When I run again chdkptp I get the following error message
Code: [Select]
___> list
open_camera_dev:usb_ptp_device_reset(): Device or resource busy
usb_ptp_get_device_status(): Device or resource busy
open_camera_dev: ptp_opensession failed 0x2ff
open_camera_dev: ptp_opensession 2 failed: 0x2ff
!1: b=001 d=005 ERROR: connection failed
After rebooting the camera everything is working.

Model of camera - Canon PowerShot SX40HS
Firmeware - 1.00I
CHDK - 1.1.0-2079

Help me!

Re: Problem with downloading videos from Canon Power Shot SX40HS
« Reply #1 on: 16 / August / 2012, 14:44:12 »
I run the Linux assembly of chdkptp and try the command for downloading videos
Code: [Select]
mdl -fmatch=%.MOV$ DCIM /root/photos

*

Offline reyalp

  • ******
  • 11515
Re: Problem with downloading videos from Canon Power Shot SX40HS
« Reply #2 on: 16 / August / 2012, 17:50:00 »
Hellow!
When I try download video (longer 3 min) from camera with chdkptp one crach down.
What kind of crash ? What platform are you running on ?

If your system doesn't have much memory, that may be a problem, chdkptp currently downloads the entire file into memory before writing it to disk. This is something I need to fix, but I haven't got around to it yet.

If this isn't the problem, you can try to get a stack trace by running chdkptp in gdb, described here http://chdk.setepontos.com/index.php?topic=6231.msg89016#msg89016

Quote
When I run again chdkptp I get the following error message

Code: [Select]
___> list
open_camera_dev:usb_ptp_device_reset(): Device or resource busy
usb_ptp_get_device_status(): Device or resource busy
open_camera_dev: ptp_opensession failed 0x2ff
open_camera_dev: ptp_opensession 2 failed: 0x2ff
!1: b=001 d=005 ERROR: connection failed
After rebooting the camera everything is working.
This is probably just caused by the connection being interrupted by the crash, leaving the camera side ptp stack in a bad state.
Don't forget what the H stands for.

Re: Problem with downloading videos from Canon Power Shot SX40HS
« Reply #3 on: 17 / August / 2012, 07:42:16 »
I run chdkptp on Beagleboard (ARM7).

Quote
If your system doesn't have much memory, that may be a problem, chdkptp currently downloads the entire file into memory before writing it to disk. This is something I need to fix, but I haven't got around to it yet.

Yes, when chdkptp downloads file the memory is busied on 92 percent. I get the following message
Code: [Select]
unexpected return code 0x2ff


*

Offline reyalp

  • ******
  • 11515
Re: Problem with downloading videos from Canon Power Shot SX40HS
« Reply #4 on: 17 / August / 2012, 16:54:13 »
I run chdkptp on Beagleboard (ARM7).
Nice.

How much RAM does your beagleboard have, and how big is the file ?
Quote
Yes, when chdkptp downloads file the memory is busied on 92 percent. I get the following message
Code: [Select]
unexpected return code 0x2ff
This isn't a crash message, it just means just means the connection was lost for some reason. I'd be looking for something like 'terminated' or 'segmentation fault', 'bus error' etc.

If you look in the system or kernel logs, you will might find something about OOM. If your system is configured with swap, it's possible that things just get so slow the connection dies.

I'll look into making the download function stream to disk this weekend.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 11515
Re: Problem with downloading videos from Canon Power Shot SX40HS
« Reply #5 on: 19 / August / 2012, 20:39:38 »
Starting with revision 274, file downloads will write 2mb at a time instead of of buffering the whole file. Please let me know if this fixes the problem.
Don't forget what the H stands for.

Re: Problem with downloading videos from Canon Power Shot SX40HS
« Reply #6 on: 20 / August / 2012, 16:02:10 »
Quote
Starting with revision 274, file downloads will write 2mb at a time instead of of buffering the whole file. Please let me know if this fixes the problem.

It work! You really helped me! Thank you very much!!!  :)

*

Offline reyalp

  • ******
  • 11515
Re: Problem with downloading videos from Canon Power Shot SX40HS
« Reply #7 on: 20 / August / 2012, 16:50:13 »
It work! You really helped me! Thank you very much!!!  :)
Thanks for confirming that. Just FYI, I wouldn't be surprised if there are problems with files larger than 2gb.
Don't forget what the H stands for.


Re: Problem with downloading videos from Canon Power Shot SX40HS
« Reply #8 on: 17 / September / 2012, 11:31:50 »
Quote
Thanks for confirming that. Just FYI, I wouldn't be surprised if there are problems with files larger than 2gb.

When I try to download video files lager than 2GB (for example, 2.7GB), the process is terminated with error:
Code: [Select]
unexpected return code 0x2ffCamera connection is lost. Then if I try to reconnect I get the message:
Code: [Select]
Device or resource busy

 

Related Topics