CHDK PTP interface - page 32 - General Discussion and Assistance - CHDK Forum supplierdeeply

CHDK PTP interface

  • 1244 Replies
  • 529495 Views
*

Offline reyalp

  • ******
  • 14121
Re: CHDK PTP interface
« Reply #310 on: 21 / December / 2010, 00:49:45 »
Advertisements
One reason to use ubasic is cameras with very little memory. Once your scripting optional stuff is done, people will have the option of ubasic only, and might still want ptp.
But this argumentation is only valid if OPT_LUA_CALL_NATIVE is not made a requirement for OPT_PTP.
There is no reason CALL_NATIVE should be required for OPT_PTP. At most you'd need to disable PTP_CHDK_CallFunction (although I'm not sure that's really needed)

Or we could retire PTP_CHDK_CallFunction completely, since you can do it from lua anyway.
Quote
The way things are now, the "supported" bit will be (1<< (executescript number)).
What is "executescript number"?
PTP_CHDK_SL_LUA
PTP_CHDK_SL_UBASIC

Param2 of PTP_CHDK_ExecuteScript
« Last Edit: 21 / December / 2010, 00:54:14 by reyalp »
Don't forget what the H stands for.

Re: CHDK PTP interface
« Reply #311 on: 22 / December / 2010, 08:16:02 »
Is there a wiki or a text explain how ptpcam work ?
I want transfer the chdk files to camera so i need not put SD-Card in Card reader always.

I search in google and see the option --get-all-files for testusage of ptpcam

seem my camera work with ptp.

when i type this in, LCD display get dark, and the LED blink for about 1 sec.
then come the output.

I can redo this command and work always same.

C:\Users\pc>E:\chdk\ptpcam.exe --get-all-files
Camera: Canon IXUS 1000HS

C:\Users\pc>

but some new files are not in c:\users\pc written

I dont like using the shell special windows shell, and i always forget how can in windows change the drive, maybe there is also a GUI for newest ptpcam, that allow the transfer of camera binary zip files to Camera easy ?
« Last Edit: 22 / December / 2010, 08:23:49 by Bernd R »
Ixus 1000 HS

*

Offline reyalp

  • ******
  • 14121
Re: CHDK PTP interface
« Reply #312 on: 22 / December / 2010, 23:20:31 »
Is there a wiki or a text explain how ptpcam work ?
I want transfer the chdk files to camera so i need not put SD-Card in Card reader always.

I search in google and see the option --get-all-files for testusage of ptpcam

seem my camera work with ptp.

when i type this in, LCD display get dark, and the LED blink for about 1 sec.
then come the output.

I can redo this command and work always same.

C:\Users\pc>E:\chdk\ptpcam.exe --get-all-files
Camera: Canon IXUS 1000HS

C:\Users\pc>

but some new files are not in c:\users\pc written

I dont like using the shell special windows shell, and i always forget how can in windows change the drive, maybe there is also a GUI for newest ptpcam, that allow the transfer of camera binary zip files to Camera easy ?
I have not had much luck with non-chdk commands in ptpcam. To upload/download files, use
ptp --chdk
this will give you an interactive prompt where you can use CHDK ptp commands, like
download A/DISKBOOT.BIN DISKBOOT.BIN
or
upload DISKBOOT.BIN A/DISKBOOT.BIn

The A/ is important when specifying filenames on the camera, it will probably crash if you leave it out.
Don't forget what the H stands for.

Re: CHDK PTP interface
« Reply #313 on: 23 / December / 2010, 05:28:40 »
I try several things out and here is the shell log of that.
upload a file test.txt(which have content of changelog.txt) give

unexpected return code 0x2ff
upload failed!

what are this error numbers ?
I test also without chdk start, there come same numbers, so it look as on IXus 1000 some functions are miss in chdk

I have use the 1004 trunk build, without your script patches.or is this wrong ?


I see too, that after i install usb dll for my Ixus 1000 for use with ptpcam, i can not use the IE explorer to read files from Camera.

before when i plug in the USB cable display get dark.when i start ptpcam with --chdk display get not dark.
when i start with --get-all-files display get dark and stay dark.


C:\Users\pc>e:\chdk\ptpcam.exe --chdk
error: camera has unsupported camera version 0.1; some functionality may be miss
ing or cause unintented consequences
<conn> download a/diskboot.bin diskboot.bin
unexpected return code 0x2fe
download failed!
<conn> download a/diskboot.bin diskboot.bin
unexpected return code 0x2fe
download failed!
<conn> upload diskbot.bin a/diskboot.bin
could not open file 'diskbot.bin'
upload failed!
<conn> upload test.txt a/test.txt
unexpected return code 0x2ff
upload failed!
<conn> upload test.txt a/test.txt
unexpected return code 0x2ff
upload failed!
<conn>

if you tell me what i should test on my Camera or add testcode in source i can do that.
« Last Edit: 23 / December / 2010, 05:33:56 by Bernd R »
Ixus 1000 HS


*

Offline rudi

  • ***
  • 129
  • A590IS_101B, SX260HS_100B
Re: CHDK PTP interface
« Reply #314 on: 23 / December / 2010, 07:52:16 »
<conn> upload test.txt a/test.txt

Write the camera driveletter uppercase e.g. upload test.txt A/test.txt

*

Offline rudi

  • ***
  • 129
  • A590IS_101B, SX260HS_100B
Re: CHDK PTP interface
« Reply #315 on: 23 / December / 2010, 08:09:16 »
I don't understand why native call is required, you can use without levent native call.
That's right. For mode-switching we don't need OPT_LUA_CALL_NATIVE. Thanks for your hint.

It looks like the code you are using is identical to lua set_record, which doesn't work on (most ?) dryos cameras when USB is connected. I know I tried a bunch of things on D10 and couldn't get it to switch using levent.
Yes, it was my idea. It's a pity. It would be so easy to switch mode on DryOS cameras. Now, I will find the entrypoints for DryOS reference BINs.

rudi

Re: CHDK PTP interface
« Reply #316 on: 23 / December / 2010, 10:05:42 »
<conn> upload test.txt a/test.txt

Write the camera driveletter uppercase e.g. upload test.txt A/test.txt

I try that but not work.
I also see, when remove USB cable error is same.so seem ptpcam do just nothing in --chdk

<conn> upload test.txt A/TEST.TXT
unexpected return code 0x2ff
upload failed!
<conn> upload test.txt A/TEST.TXT
unexpected return code 0x2ff
upload failed!
<conn> upload test.txt A/TEST.TXT
unexpected return code 0x2ff
upload failed!
<conn>

when i try this and have USB cable not connect i get this message.


C:\Users\pc>e:\chdk\ptpcam.exe --get-all-files
could not find any device matching given bus/dev numbers

C:\Users\pc>

I test when chdk not run, i get same message as when chdk run

C:\Users\pc>e:\chdk\ptpcam.exe --get-all-files
Camera: Canon IXUS 1000HS

C:\Users\pc>
« Last Edit: 23 / December / 2010, 10:08:18 by Bernd R »
Ixus 1000 HS

*

Offline reyalp

  • ******
  • 14121
Re: CHDK PTP interface
« Reply #317 on: 23 / December / 2010, 16:05:14 »
I try that but not work.
I also see, when remove USB cable error is same.so seem ptpcam do just nothing in --chdk

<conn> upload test.txt A/TEST.TXT
unexpected return code 0x2ff
upload failed!
My guess either you have not correctly implemented and enabled CHDK PTP, or your libusb driver is not set up correctly. There is some discussion of the latter in this thread.

Quote
C:\Users\pc>e:\chdk\ptpcam.exe --get-all-files
Camera: Canon IXUS 1000HS
C:\Users\pc>
CHDK only uses ptpcam as a convenient place to put some code.  As I said earlier, I wasn't able to get many of the non-chdk ptpcam functions to work. It appears to me that ptpcam development was abandoned a long time ago.
Don't forget what the H stands for.


Re: CHDK PTP interface
« Reply #318 on: 24 / December / 2010, 07:53:13 »
>CHDK only uses ptpcam as a convenient place to put some code.  As I said earlier, I wasn't able to get >many of the non-chdk ptpcam functions to work. It appears to me that ptpcam development was >abandoned a long time ago.

I dont know, ptpcam is not know in the wiki, there is only chdkcam which you tell not work on newer trunk.
what have change here, and what trunk begin not work on chdkcam ?
and what need change in chdkcam to get it working ?

there is for Ixus 1000 trunk 958 trunk 969 and trunk 1004 working

I can revert to an old trunk,

Do you get not such a message on ptpcam --chdk ?

"""""
error: camera has unsupported camera version 0.1; some functionality may be miss
ing or cause unintented consequences
""""""

I read some posts, but find no source of ptpcam

merry christmas too all
« Last Edit: 24 / December / 2010, 08:15:12 by Bernd R »
Ixus 1000 HS

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK PTP interface
« Reply #319 on: 24 / December / 2010, 10:15:33 »
I read some posts, but find no source of ptpcam

Here is the original source code by mweerden: https://github.com/mweerden/CHDK/tree/ptp (in tools/ptpcam)

And here you can find the code with reyalp's modifications: http://my-trac.assembla.com/chdkde/browser/trunk/tools/ptpcam

The last source also contains the necessary things (libUSB components) to compile ptpcam in CHDK-Shell: CHDK-Shell -> console -> make -C tools/ptpcam -f makefile.chdkshell



I wish also merry christmas all
CHDK-DE:  CHDK-DE links

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal