CHDK PTP interface - page 88 - General Discussion and Assistance - CHDK Forum

CHDK PTP interface

  • 1244 Replies
  • 528379 Views
Re: CHDK PTP interface
« Reply #870 on: 25 / September / 2012, 09:38:14 »
Advertisements
Thanx for the reply
yes I had my review mode set to "hold", disabling this got things working :)

Quote
This bug is fixed in the latest chdkptp svn. If you replace lua/chdku.lua with the one found here http://trac.assembla.com/chdkptp/browser/trunk/lua/chdku.lua?rev=293 it should be fixed
I replaced the file, but it didn't solve the problem. Now I get this error message:
"error: A/ں뫧ں§~1.PPT: error"
Beauty is in the eye of the beholder

my eye: Canon PowerShot SX40 HS :)

*

Offline reyalp

  • ******
  • 14121
Re: CHDK PTP interface
« Reply #871 on: 27 / September / 2012, 16:12:11 »
Thanx for the reply
yes I had my review mode set to "hold", disabling this got things working :)

Quote
This bug is fixed in the latest chdkptp svn. If you replace lua/chdku.lua with the one found here http://trac.assembla.com/chdkptp/browser/trunk/lua/chdku.lua?rev=293 it should be fixed
I replaced the file, but it didn't solve the problem. Now I get this error message:
"error: A/ں뫧ں§~1.PPT: error"
That is very strange. Are you using non-latin character set on the camera or PC ?

If you enter
ls -l
in the console, what does it do ?
Don't forget what the H stands for.

Re: CHDK PTP interface
« Reply #872 on: 28 / September / 2012, 14:32:32 »
sorry for the delay
I have non-latin character on my laptop *only* as typing language.
Both my camera and my laptop's OS (Windows 7 x64 Home Premium) have English UI

I tried entering
ls -l
in the console. Nothing happened
Beauty is in the eye of the beholder

my eye: Canon PowerShot SX40 HS :)

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDK PTP interface
« Reply #873 on: 28 / September / 2012, 14:39:08 »
I tried entering
ls -l
in the console. Nothing happened
You need to enter that line in the text box beside the Execute button, and of course hit enter afterwards (or click Execute).

Quote
Now I get this error message:
"error: A/ں뫧ں§~1.PPT: error"
Are you sure you don't have a PowerPoint file on that card (copied there with a card reader)?
« Last Edit: 28 / September / 2012, 14:45:25 by srsa_4c »


Re: CHDK PTP interface
« Reply #874 on: 28 / September / 2012, 14:43:48 »
yea that's what I did... nothing happened
Beauty is in the eye of the beholder

my eye: Canon PowerShot SX40 HS :)

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDK PTP interface
« Reply #875 on: 28 / September / 2012, 14:55:14 »
My experience with a different camera
http://chdk.setepontos.com/index.php?topic=8600.msg90086#msg90086
The camera was not prepared to correctly handle a long filename.
What happens if you execute this:
Code: [Select]
=return os.listdir('A/')?
In your case the problem might be caused by a filename with non-latin characters.

Re: CHDK PTP interface
« Reply #876 on: 28 / September / 2012, 15:05:20 »
I entered the code
=return os.listdir('A/')
and it displayed the list of files on the card root... and indeed there were2 files with non-latin names which I forgot about... and even if I remembered them I wouldn't have thought they can cause total failure of the whole thing

Thanx for taking the time to solve the problem :)
Beauty is in the eye of the beholder

my eye: Canon PowerShot SX40 HS :)

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDK PTP interface
« Reply #877 on: 05 / October / 2012, 12:42:52 »
As a result of the recent filewritetask investigation on the S90 (thx to SticK) and A810 (thx to nafraf), it looks like many of my previous assumptions were wrong.
It looks like that
- filewritetask only writes jpeg files (!), native raw is written elsewhere
- earlier cameras (including the S90) usually write the files in two chunks, first one is the exif part, second one is the main jpeg. On the A810 this is different, the whole file appears in one or two chunks, the exif is presumably embedded in the first chunk.
- another oddity on the A810: the chunks of the jpeg seem to come from non-contiguous buffers
edit:
... and of course there's no such thing as multiple filewritetask invocations for a single file, according to the collected data.
edit, A810: Now it looks like that Canon has started doing some parallel processing. Sometimes, the jpeg file is starting to get written when only a part of the (L sized) compressed image is present. When an additional part of the image becomes available, it gets appended to the partial file on card!
« Last Edit: 14 / October / 2012, 17:32:51 by srsa_4c »


*

Offline srsa_4c

  • ******
  • 4451
Re: CHDK PTP interface
« Reply #878 on: 08 / October / 2012, 23:06:21 »
@reyalp

Changeset 2203:
My (uncommitted) version was like this:
Code: [Select]
int register_pt_hooks() {
#if (!CAM_DRYOS) || defined(CAMERA_s5is)
    /*
     * System.Create -> SystemEventInit
     * SS.Create -> ?
     * PT_CompleteFileWrite -> no equivalent?
     */
    return -1;
#else
    if(_ExecuteEventProcedure("System.Create") == -1) {
        return 1;
    }
    if(_ExecuteEventProcedure("SS.Create") == -1) {
        return 2;
    }
    if(_ExecuteEventProcedure("ExportToEventProcedure","PT_CompleteFileWrite",overridden_PT_CompleteFileWrite) == -1) {
        return 3;
    }
    //_LogPrintf(0x120,"pt hook(s) registered");
    return 0;
#endif
}
All DryOS >= r23 cameras seem to have System.Create, SS.Create, PT_CompleteFileWrite. This is based on searching through a few dozen firmware files I have on my HDD.

Which (kind of) functions are not supposed to be called from thumb?

*

Offline reyalp

  • ******
  • 14121
Re: CHDK PTP interface
« Reply #879 on: 08 / October / 2012, 23:26:43 »
All DryOS >= r23 cameras seem to have System.Create, SS.Create, PT_CompleteFileWrite. This is based on searching through a few dozen firmware files I have on my HDD.
Calling the eventprocs in the sequence I used and checking for -1 should be OK, the romlog code does the same thing.

Edit:
Oops, I didn't realize (or forgot, since I listed them before) until now that the older cams didn't have PT_CompleteFileWrite. That explains why this code didn't work right on a540 ;)

So in this case, we don't need to fall back to the older registration functions, unless we decide to use other eventproc "hooks".
Quote
Which (kind of) functions are not supposed to be called from thumb?
The firmware code doesn't always return with a BX LR, so it might return to your thumb code without switching back to thumb mode. This is most common on vxworks cameras, but happens in some cases newer cameras do it too. So generally you shouldn't call a firmware function directly without a wrapper.
« Last Edit: 08 / October / 2012, 23:29:27 by reyalp »
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal