Override 1000 files limit when connecting usb - General Discussion and Assistance - CHDK Forum

Override 1000 files limit when connecting usb

  • 7 Replies
  • 7033 Views
*

Offline c10ud

  • ***
  • 245
Override 1000 files limit when connecting usb
« on: 06 / August / 2012, 10:08:38 »
Advertisements
to get the job done
Job?
Challenge!  :)
BTW, read the link I posted here
You like challenges? i have one, but it's OT here :p

(short story: "Communication Error" when n-pics>1024 or something like that and USB is plugged to a PC.
Ask Google for more users whining about it, it's a Canon firmware "feature" that leaves users happy (?) of their pricey purchase. The camera simply doesn't show up as a device as if the firmware is locking usb, i'm currently trying to dig this in a DryOS camera (a495) but so far no result -- )

btw, i'm reading your posts, even the old one about preventing writing

*

Offline srsa_4c

  • ******
  • 4451
Re: Override 1000 files limit when connecting usb
« Reply #1 on: 06 / August / 2012, 10:26:05 »
(short story: "Communication Error" when n-pics>1024 or something like that and USB is plugged to a PC.
Ask Google for more users whining about it, it's a Canon firmware "feature" that leaves users happy (?) of their pricey purchase.
Windows and/or Mac? Canon utility or default OS PTP support?
Excerpt from their manual for the A495:
Quote
Communication error
• Images could not be transferred to the computer or printed due to the large
amount of images (approx. 1000) stored on the memory card. Use a
commercially available USB card reader to transfer the images. Insert the
memory card into the printer’s card slot to print.
On Linux, I patched some part (a constant) of libgphoto to remove a similar limit in libgphoto itself.
Quote
The camera simply doesn't show up as a device as if the firmware is locking usb, i'm currently trying to dig this in a DryOS camera (a495) but so far no result -- )
May be a client issue. Or the camera runs out of RAM (it can only use a dedicated amount for this).
You can find/create another topic if you feel so.

*

Offline c10ud

  • ***
  • 245
Re: Override 1000 files limit when connecting usb
« Reply #2 on: 06 / August / 2012, 11:10:00 »
(short story: "Communication Error" when n-pics>1024 or something like that and USB is plugged to a PC.
Ask Google for more users whining about it, it's a Canon firmware "feature" that leaves users happy (?) of their pricey purchase.
Windows and/or Mac? Canon utility or default OS PTP support?
Excerpt from their manual for the A495:
Quote
Communication error
• Images could not be transferred to the computer or printed due to the large
amount of images (approx. 1000) stored on the memory card. Use a
commercially available USB card reader to transfer the images. Insert the
memory card into the printer’s card slot to print.
On Linux, I patched some part (a constant) of libgphoto to remove a similar limit in libgphoto itself.
Quote
The camera simply doesn't show up as a device as if the firmware is locking usb, i'm currently trying to dig this in a DryOS camera (a495) but so far no result -- )
May be a client issue. Or the camera runs out of RAM (it can only use a dedicated amount for this).
You can find/create another topic if you feel so.
- Every platform
- i know about gphoto, but it's not at that level, the device isn't even showing up in syslog
- it's because of the camera, and happens with higher end models too, it's not limited to cheap models (see google) i'd just like to find out a way to stop this behaviour, i guess it's checking for how much pics are in the card and blocking the usb communication (probably some limitation in their ptp implementation, just like gphoto had), but so far no luck in disassembling the usb stack

if a mod could split this in a separate discussion.... :D

*

Offline srsa_4c

  • ******
  • 4451
Re: Override 1000 files limit when connecting usb
« Reply #3 on: 07 / August / 2012, 08:07:58 »
- Every platform
- i know about gphoto, but it's not at that level, the device isn't even showing up in syslog
- it's because of the camera, and happens with higher end models too, it's not limited to cheap models (see google) i'd just like to find out a way to stop this behaviour, i guess it's checking for how much pics are in the card and blocking the usb communication (probably some limitation in their ptp implementation, just like gphoto had), but so far no luck in disassembling the usb stack
The same 1000 pictures limit is stated even in the G1X manual :)

May I ask what kind of solution do you want? Does it have to work without installing anything on the PC? If that's the case, explain it to the moderator (philmoz is the active mod these days) to split this conversation into a new topic along with a new topic title. Use the "Report to moderator" link on the first offtopic post.

An idea:
You could rename files (or better, their folder, if that works reliably) to something the Canon OS doesn't expect, then restart the camera. Do this so, that there are less than 1000 recognizable pictures for the camera at a time. Of course you'll need to use a file to track this, and a sophisticated script. Downside: requires some user interaction on the camera. Beware, needs to be tested on every possible camera before real use, the rename function may be broken on some ports.

*

Offline c10ud

  • ***
  • 245
Re: Override 1000 files limit when connecting usb
« Reply #4 on: 07 / August / 2012, 09:05:27 »
- Every platform
- i know about gphoto, but it's not at that level, the device isn't even showing up in syslog
- it's because of the camera, and happens with higher end models too, it's not limited to cheap models (see google) i'd just like to find out a way to stop this behaviour, i guess it's checking for how much pics are in the card and blocking the usb communication (probably some limitation in their ptp implementation, just like gphoto had), but so far no luck in disassembling the usb stack
The same 1000 pictures limit is stated even in the G1X manual :)

May I ask what kind of solution do you want? Does it have to work without installing anything on the PC? If that's the case, explain it to the moderator (philmoz is the active mod these days) to split this conversation into a new topic along with a new topic title. Use the "Report to moderator" link on the first offtopic post.

An idea:
You could rename files (or better, their folder, if that works reliably) to something the Canon OS doesn't expect, then restart the camera. Do this so, that there are less than 1000 recognizable pictures for the camera at a time. Of course you'll need to use a file to track this, and a sophisticated script. Downside: requires some user interaction on the camera. Beware, needs to be tested on every possible camera before real use, the rename function may be broken on some ports.
i know the limits are stated in the respective manuals, but i find them at least funny in 2012.

report to mod: done.

the idea is start making the camera show up correctly in the PC (no "communication error" on the camera) and see what happens next (if it's still usable, if it shows some weird error, etc.).
the idea would be: isolating the code that makes the camera fail and replace it with a simple hack - or - override the jpg counter value (?) that makes the camera fail - or - ?
so far i've identified a few functions that check things when the usb cable is connected and i see they are somehow linked with spitting errors - unfortunately i'm going really slow since my disasm skills are not so great ;)

*

Offline srsa_4c

  • ******
  • 4451
Re: Override 1000 files limit when connecting usb
« Reply #5 on: 07 / August / 2012, 10:10:06 »
i know the limits are stated in the respective manuals, but i find them at least funny in 2012.
Yeah, like the magical 4GB limit for movies.
Quote
the idea is start making the camera show up correctly in the PC (no "communication error" on the camera) and see what happens next (if it's still usable, if it shows some weird error, etc.).
the idea would be: isolating the code that makes the camera fail and replace it with a simple hack - or - override the jpg counter value (?) that makes the camera fail - or - ?
so far i've identified a few functions that check things when the usb cable is connected and i see they are somehow linked with spitting errors - unfortunately i'm going really slow since my disasm skills are not so great ;)
Try to work on a low memory model and use RAM dumps (like: one dump where no comm. error shows (999 files or so), and another where USB connection becomes problematic, then compare them :) ).
The object list will be stored in a chunk of data (in an exmem area, I think, EXMEM_FILESTORE may be related or not).
You can try to trace back "communication error", but this might be troublesome, if it's a localized string. I would suspect PTP related tasks, the "camera doesn't show up" may be a side effect of a failure in one of those.
What's wrong with my previous idea  ??? ?

Another possibility:
try to see whether the failure shows up in the camera log somehow.
« Last Edit: 07 / August / 2012, 10:12:29 by srsa_4c »

*

Offline c10ud

  • ***
  • 245
Re: Override 1000 files limit when connecting usb
« Reply #6 on: 07 / August / 2012, 10:56:35 »
Your previous idea should probably work, but it's not ideal imho.

Now i need to find a power supply and start shooting!

And yes, the string unfortunately looks localized.

*

Offline reyalp

  • ******
  • 14125
Re: Override 1000 files limit when connecting usb
« Reply #7 on: 07 / August / 2012, 17:20:49 »
You could rename files (or better, their folder, if that works reliably)
As far as I know, renaming non-empty directories does not work... unless by "work", you mean "corrupt the filesystem", in which case it may sometimes work ;)

If anyone fancies some low level filesystem hacking, a FAT level "move" would be handy.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal