Bug in PTP File Upload ? - General Discussion and Assistance - CHDK Forum
supplierdeeply

Bug in PTP File Upload ?

  • 21 Replies
  • 8302 Views
Bug in PTP File Upload ?
« on: 06 / August / 2011, 12:24:50 »
Advertisements
A new topic to avoid drowning in the general PTP discussion.

I have confirmed that when uploading a file beyond a certain size, it is corrupted in two locations.
This has been checked on an A460 using ptpCamGui, mweerden's original ptpcam version and my own ptpcam version.

It will also affect the executing of Lua scripts if the data length of the USB packet exceeds 36 bytes.

Try uploading the attached file using ptpCamGui or ptpcam.exe.

To check it, either remove the card from the camera or download back to the PC.

On my camera after the second 'J', the characters 'K' and 'L' are missing.

Two 0xFF bytes have been inserted at the end of the file pushing the existing data left two places but not intruding into byte 36.


Does the problem exist on other cameras ?


David

*

Offline blackhole

  • *****
  • 942
  • A590IS 101b
    • Planetary astrophotography
Re: Bug in PTP File Upload ?
« Reply #1 on: 06 / August / 2011, 13:02:47 »
On the A590 is all normal, nothing is missing.
I used to transfer ptpCamGui.

Re: Bug in PTP File Upload ?
« Reply #2 on: 06 / August / 2011, 13:30:14 »
Thanks, but I should have given more information.

Use this command :-

upload sc6.bas A/sc6.bas.

You need to check locations 37 and 38 using a hex editor.

In terms of the A to Z position, it depends on path length to target file.

It is only after the second 'J' for path A/sc6.bas.

Also, there are two 0x00 bytes between the final X and YZ.


*

Offline blackhole

  • *****
  • 942
  • A590IS 101b
    • Planetary astrophotography
Re: Bug in PTP File Upload ?
« Reply #3 on: 06 / August / 2011, 13:51:30 »
It appears to me everything is normal.



Re: Bug in PTP File Upload ?
« Reply #4 on: 06 / August / 2011, 14:38:53 »
Thanks.

What a horrible problem if it does not affect other cameras.

I do have a second A460, I will test that in case it is a hardware fault.

I will also test an A620.

The format of the USB data packet is :-

Four bytes for file length, ten bytes for zero-terminated filepath A/sc6.bas and no problems for thirty six bytes of file data.

In other words, the first 50 bytes are 'protected', the rest of data is shifted left two positions.


*

Offline funnel

  • ****
  • 349
Re: Bug in PTP File Upload ?
« Reply #5 on: 06 / August / 2011, 15:16:48 »
Uploads fine to me too, no corruption.

Re: Bug in PTP File Upload ?
« Reply #6 on: 06 / August / 2011, 15:46:30 »
Uploads fine to me too, no corruption.

Thanks.
Which camera did you test ?

I tried on a second A460 and the problem was exactly the same.

I tried on my A620 and it worked perfectly.


*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Bug in PTP File Upload ?
« Reply #7 on: 06 / August / 2011, 15:50:09 »
During the development of ptpCamGui we also had some problems with the upload of script files. Some uploaded test files had  extra characters like described (tested with the A720).

At the moment works all fine.

msl
CHDK-DE:  CHDK-DE links


*

Offline funnel

  • ****
  • 349
Re: Bug in PTP File Upload ?
« Reply #8 on: 06 / August / 2011, 15:55:09 »
Uploads fine to me too, no corruption.

Thanks.
Which camera did you test ?

I tried on a second A460 and the problem was exactly the same.

I tried on my A620 and it worked perfectly.


sx220 with ptpCamGui2.0.95

Re: Bug in PTP File Upload ?
« Reply #9 on: 06 / August / 2011, 16:27:25 »
Can you remember the cause and solution ?

Even though I cannot read German, was it discussed in the forum ?


 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal