supplierdeeply

chdkptp - alternative ptp client

  • 975 Replies
  • 128043 Views
  • Publish
    Re: alternative ptp client
    « Reply #40 on: 12 / February / 2012, 14:58:31 »
    Advertisements

    Out of curiosity, how do you measure the accuracy of sync ?

    http://stereo.jpn.org/eng/sdm/crt_synch.htm

    A friend tested the S95 a few days ago :-

    http://bit.ly/wnK2Ff

    a good result except 25% of the time other tasks interrupt the capture sequence, I assume.

    He has asked if we can disable interrupts until after capture.

    The S95 may be the last camera we can achieve decent synch with.

    The SX230HS has an error of about 50msec (!) and philmoz confirms the IXUS310 and SX40 are similar.
    Something new is happening in the capture sequence, unless porters have 'wandered down the wrong path'.

    *

    Offline philmoz

    • *****
    • 2999
      • Photos
  • Publish
    Re: alternative ptp client
    « Reply #41 on: 12 / February / 2012, 16:49:00 »

    Out of curiosity, how do you measure the accuracy of sync ?

    http://stereo.jpn.org/eng/sdm/crt_synch.htm

    A friend tested the S95 a few days ago :-

    http://bit.ly/wnK2Ff

    a good result except 25% of the time other tasks interrupt the capture sequence, I assume.

    He has asked if we can disable interrupts until after capture.

    The S95 may be the last camera we can achieve decent synch with.

    The SX230HS has an error of about 50msec (!) and philmoz confirms the IXUS310 and SX40 are similar.
    Something new is happening in the capture sequence, unless porters have 'wandered down the wrong path'.

    Although we've diverged a bit from the main topic here I just wanted to add my experience in case it is useful to anyone else.

    I've been testing slightly differently with a single camera.

    I record the current tick count at the end of 'wait_until_remote_button_is_released' and then again at the very start of 'capt_seq_hook_raw_here' and display the difference.

    Using a 1/1000th sec shutter speed and enabling remote synch I would expect to see fairly consistent results in the value displayed.

    On the G12 and SX30 this is the case - the value is consistent most of the time with an occasional difference of 1 (preumably when the shot happens just as the clock is ticking over).

    On the IXUS310 and SX40 the variance in the value can be up to 50, since the tick count is milliseconds, this is equivalent to a 1/20th second variation from the time the usb remote is released to the time the picture is taken.

    I'm experimenting with different locations for the functions; but so far I've only managed to reduce the variance to 40ms on the SX40.

    Phil.
    CHDK ports:
      sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
      g12 (1.00c, 1.00e, 1.00f & 1.00g)
      sx130is (1.01d & 1.01f)
      ixus310hs (1.00a & 1.01a)
      sx40hs (1.00d, 1.00g & 1.00i)
      g1x (1.00e, 1.00f & 1.00g)

    *

    Offline reyalp

    • ******
    • 10700
  • Publish
    Re: alternative ptp client
    « Reply #42 on: 14 / February / 2012, 01:58:20 »
    Some progress
    Don't forget what the H stands for.

    *

    Offline lyzby

    • **
    • 50
  • Publish
    Re: alternative ptp client
    « Reply #43 on: 18 / February / 2012, 23:29:00 »
    Please pardon the newbie question, but exactly how does one download the files at http://trac.assembla.com/chdkde/browser/trunk/tools/ptpcam/

    Or from https://github.com/jrabbit/libptp-chdk.git

    I want to download to a dockstar (a headless Arm device), so can I use something like "wget" or "svn"?

    I've read through many threads, on this and, on the German forum using Google Translate, but haven't found an answer.

    So if someone could tell me how to download the files, and compile the project, I would appreciate it.

    I've also downloaded, with svn, chdkptp to my /usr/src directory.  How do I now do a cli compile of the project (I've installed the following:  build-essential subversion libusb-dev lua5.1 liblua5.1 liblua5.1-dev).


    *

    Offline reyalp

    • ******
    • 10700
  • Publish
    Re: alternative ptp client
    « Reply #44 on: 19 / February / 2012, 00:21:32 »
    Please pardon the newbie question, but exactly how does one download the files at http://trac.assembla.com/chdkde/browser/trunk/tools/ptpcam/
    svn co http://subversion.assembla.com/svn/chdkde/trunk/tools/ptpcam/

    (you can find the svn url from http://www.assembla.com/spaces/chdkde/trac_subversion_tool )
    Quote
    Or from https://github.com/jrabbit/libptp-chdk.git
    git clone ....
    or down load the zip linked on that page. You can probably copy the url in your desktop browser and then wget it on your headless box (assuming you have a putty or something you can paste into)

    Quote
    I've also downloaded, with svn, chdkptp to my /usr/src directory.  How do I now do a cli compile of the project (I've installed the following:  build-essential subversion libusb-dev lua5.1 liblua5.1 liblua5.1-dev).
    copy config-sample-linux.mk to config.mk, edit to suit your configuration.
    CHDK_SRC_DIR must point to a directory such that -I$(CHDK_SRC_DIR) will allow the source to include <core/ptp.h>. You can get a copy of ptp.h from http://trac.assembla.com/chdk/browser/branches/release-1_0/core/ptp.h?format=txt

    then type make

    Beware that both chdkptp and the ptpcam in chdkde were originally made from a butchered copy of ptpcam with the autoconf stuff removed, so they might not work for you if your platform isn't close to what they were configured for. Moving chdkptp back to autoconf is on my TODO list.
    Don't forget what the H stands for.

    *

    Offline lyzby

    • **
    • 50
  • Publish
    Re: alternative ptp client
    « Reply #45 on: 19 / February / 2012, 11:07:45 »
    Thank you very much.  This could hardly have been easier for ptpcam.  I downloaded from github into /usr/src/ptpcam:
    Code: [Select]
    git clone https://github.com/jrabbit/libptp-chdk.git
    I had already downloaded into /usr/src/chdkptp with svn from /usr/src:
    Code: [Select]
    svn co http://subversion.assembla.com/svn/chdkptp/trunk chdkptp
    I copied ptp.h into both /usr/src/ptpcam and /usr/src/chdkptp with:
    Code: [Select]
    wget http://trac.assembla.com/chdk/browser/branches/release-1_0/core/ptp.h?format=txt
    I copied /usr/src/chdkptp/config-sample-linux.mk to config.mk in /usr/src/ptpcam

    In /usr/src/ptpcam, I ran "make".  This resulted in a ptpcam executable.

    I copied it to /usr/bin, plugged in and turned on the camera (an A590is), and did the following:
    Code: [Select]
    mode 1
    lua set_zoom(3)
    lua shoot()
    mode 0
    download A/DCIM/133CANON/IMG_7429.JPG IMG_7429.JPG

    This worked.  Now I can use my dockstar to take photos remotely.  Congratulations and thanks to everyone involved.

    I have not been successful yet with chdkptp, but I think I'm close.  I copied ptp.h into /usr/src/chdkptp/core and ran make.  This is the output.  Something simple is missing, I think, maybe a ".h" file, but I don't know what it is.
    Code: [Select]
    make[1]: Entering directory `/usr/src/chdkptp/lfs'
    make[1]: Leaving directory `/usr/src/chdkptp/lfs'
    gcc -MMD -DCHDKPTP_OSTYPE=\"Linux\" -g -I/usr/include/lua5.1 -I/usr/src/chdkptp -c -o ptp.o ptp.c
    ptp.c: In function 'ptp_chdk_get_memory':
    ptp.c:1650: error: 'PTP_OC_CHDK' undeclared (first use in this function)
    ptp.c:1650: error: (Each undeclared identifier is reported only once
    ptp.c:1650: error: for each function it appears in.)
    ptp.c:1652: error: 'PTP_CHDK_GetMemory' undeclared (first use in this function)
    ptp.c: In function 'ptp_chdk_set_memory_long':
    ptp.c:1672: error: 'PTP_OC_CHDK' undeclared (first use in this function)
    ptp.c:1674: error: 'PTP_CHDK_SetMemory' undeclared (first use in this function)
    ptp.c: In function 'ptp_chdk_call':
    ptp.c:1692: error: 'PTP_OC_CHDK' undeclared (first use in this function)
    ptp.c:1694: error: 'PTP_CHDK_CallFunction' undeclared (first use in this function)
    ptp.c: In function 'ptp_chdk_upload':
    ptp.c:1717: error: 'PTP_OC_CHDK' undeclared (first use in this function)
    ptp.c:1719: error: 'PTP_CHDK_UploadFile' undeclared (first use in this function)
    ptp.c: In function 'ptp_chdk_download':
    ptp.c:1761: error: 'PTP_OC_CHDK' undeclared (first use in this function)
    ptp.c:1763: error: 'PTP_CHDK_TempData' undeclared (first use in this function)
    ptp.c:1775: error: 'PTP_CHDK_DownloadFile' undeclared (first use in this function)
    ptp.c: In function 'ptp_chdk_exec_lua':
    ptp.c:1806: error: 'PTP_OC_CHDK' undeclared (first use in this function)
    ptp.c:1808: error: 'PTP_CHDK_ExecuteScript' undeclared (first use in this function)
    ptp.c:1809: error: 'PTP_CHDK_SL_LUA' undeclared (first use in this function)
    ptp.c:1821: error: 'PTP_CHDK_S_ERRTYPE_NONE' undeclared (first use in this function)
    ptp.c: In function 'ptp_chdk_get_version':
    ptp.c:1830: error: 'PTP_OC_CHDK' undeclared (first use in this function)
    ptp.c:1832: error: 'PTP_CHDK_Version' undeclared (first use in this function)
    ptp.c: In function 'ptp_chdk_get_script_status':
    ptp.c:1849: error: 'PTP_OC_CHDK' undeclared (first use in this function)
    ptp.c:1851: error: 'PTP_CHDK_ScriptStatus' undeclared (first use in this function)
    ptp.c: In function 'ptp_chdk_get_script_support':
    ptp.c:1867: error: 'PTP_OC_CHDK' undeclared (first use in this function)
    ptp.c:1869: error: 'PTP_CHDK_ScriptSupport' undeclared (first use in this function)
    ptp.c: In function 'ptp_chdk_write_script_msg':
    ptp.c:1891: error: 'PTP_OC_CHDK' undeclared (first use in this function)
    ptp.c:1893: error: 'PTP_CHDK_WriteScriptMsg' undeclared (first use in this function)
    ptp.c: In function 'ptp_chdk_read_script_msg':
    ptp.c:1912: error: 'PTP_OC_CHDK' undeclared (first use in this function)
    ptp.c:1914: error: 'PTP_CHDK_ReadScriptMsg' undeclared (first use in this function)
    make: *** [ptp.o] Error 1

  • Publish
    Re: alternative ptp client
    « Reply #46 on: 19 / February / 2012, 11:34:07 »
    Something simple is missing, I think, maybe a ".h" file, but I don't know what it is.

    See line 870 here http://www.assembla.com/code/chdkptp/subversion/nodes/trunk/ptp.h?rev=158#

     // include CHDK ptp protocol definitions from a CHDK source tree
    #include <core/ptp.h>
    « Last Edit: 19 / February / 2012, 11:45:04 by Microfunguy »

    *

    Offline lyzby

    • **
    • 50
  • Publish
    Re: alternative ptp client
    « Reply #47 on: 19 / February / 2012, 12:43:26 »
    I'm afraid I don't understand.  I downloaded ptp.h rev 158, but could not find a reference in it to PTP_OC_CHDK or PTP_CHDK.  Where are those defined?


  • Publish
    Re: alternative ptp client
    « Reply #48 on: 19 / February / 2012, 12:52:57 »

    *

    Offline lyzby

    • **
    • 50
  • Publish
    Re: alternative ptp client
    « Reply #49 on: 19 / February / 2012, 14:41:01 »
    Ok, now I get a ton of errors from properties.c--2,500 lines worth.  But they're all similar, so again it's probably something simple that I'm lacking.  What would that be?
    Code: [Select]
    properties.c:65: error: expected specifier-qualifier-list before 'uint16_t'
    properties.c:68: error: 'PTP_DPC_Undefined' undeclared here (not in a function)
    properties.c:68: warning: excess elements in struct initializer
    properties.c:68: warning: (near initialization for 'ptp_device_properties[0]')
    properties.c:68: warning: excess elements in struct initializer
    properties.c:68: warning: (near initialization for 'ptp_device_properties[0]')
    properties.c:69: error: 'PTP_DPC_BatteryLevel' undeclared here (not in a functi$
    properties.c:69: warning: excess elements in struct initializer
    properties.c:69: warning: (near initialization for 'ptp_device_properties[1]')
    properties.c:69: warning: excess elements in struct initializer
    properties.c:69: warning: (near initialization for 'ptp_device_properties[1]')
    properties.c:70: error: 'PTP_DPC_FunctionalMode' undeclared here (not in a func$
    properties.c:70: warning: excess elements in struct initializer
    properties.c:70: warning: (near initialization for 'ptp_device_properties[2]')
    properties.c:70: warning: excess elements in struct initializer
    properties.c:70: warning: (near initialization for 'ptp_device_properties[2]')
    properties.c:71: error: 'PTP_DPC_ImageSize' undeclared here (not in a function)
    properties.c:71: warning: excess elements in struct initializer
    properties.c:71: warning: (near initialization for 'ptp_device_properties[3]')
    properties.c:71: warning: excess elements in struct initializer
    properties.c:71: warning: (near initialization for 'ptp_device_properties[3]')
    properties.c:72: error: 'PTP_DPC_CompressionSetting' undeclared here (not in a $
    properties.c:72: warning: excess elements in struct initializer
    properties.c:72: warning: (near initialization for 'ptp_device_properties[4]')
    properties.c:72: warning: excess elements in struct initializer
    properties.c:72: warning: (near initialization for 'ptp_device_properties[4]')
    properties.c:73: error: 'PTP_DPC_WhiteBalance' undeclared here (not in a functi$
    properties.c:73: warning: excess elements in struct initializer
    properties.c:73: warning: (near initialization for 'ptp_device_properties[5]')
    properties.c:73: warning: excess elements in struct initializer
    properties.c:73: warning: (near initialization for 'ptp_device_properties[5]')
    ... and so on.

     

    Related Topics