chdkptp - alternative ptp client - page 44 - General Discussion and Assistance - CHDK Forum
supplierdeeply

chdkptp - alternative ptp client

  • 1106 Replies
  • 515610 Views
*

Offline reyalp

  • ******
  • 14080
Re: alternative ptp client
« Reply #430 on: 22 / October / 2013, 13:00:10 »
Advertisements
Seems to work "Better" than previous version in "REC":-
see attached ...... Ixus 125 125-101a_Rec_+_125-100d_Rec

Also see this post for more "Syntax Error" details:-
http://chdk.setepontos.com/index.php?topic=8085.msg106401#msg106401
http://chdk.setepontos.com/index.php?action=dlattach;topic=8085.0;attach=9164
I'm sorry, I don't understand what the problem is. If you can explain what you did, what you expected to happen, and what actually happened, that might be more useful than screenshots.

I don't understand the point of the usb device stuff in the screen shots. Either libusb is set up correctly or not, it doesn't matter to me what hubs you have or what the devices are called in windows...

You can get "error syntax" if the lua module on the camera isn't able to load.

Quote
In "Play" there is a problem with 1 to 1 Aspect ratio, may be due to Ixus 115/125 cameras :-
see attached Ixus 125 ....... 125-101a_Play_&_Aspect 1-1
I don't really understand this either.

Is the fisheye a real fisheye lens, or the cameras "fisheye effect"?  If it's the fisheye effect, I've seen something like this on elph130 as well, the canon firmware does something special in this mode and the live view is not correct. It would need to be fixed on the CHDK side on the camera. If it's a physical lens, then it doesn't matter, the live data is either wrong or right but the fisheye is irrelevant.

If the live display is not correct, a "quick dump" from the the debug tab may help me understand the problem.

I don't understand what the problem is with "play"?
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Libusb on Windows 8.1 x64
« Reply #431 on: 22 / October / 2013, 15:46:50 »
Microsoft have made using unsigned drivers even harder in Windows 8.1 x64.

Although you can still jump through hoops to install the libusb-win32 drivers, they don't survive a reboot of the system.

I found the program linked here (http://zadig.akeo.ie/) will fix the problem by creating and installing self-signed libusb drivers for x64 Windows 8.1.

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)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline openuas

  • **
  • 58
  • OpenUAS
    • OpenUAS
Re: alternative ptp client
« Reply #432 on: 25 / October / 2013, 11:09:36 »
Just for all, some info; Successfully ran chdkptp on Ubuntu 12.04 64bit. I've compiled from source. Used CLI as well interactive and via a script.  Tested with IXUS 200 IS camera v1.01c. Remoteshoot worked well with RAW n DNG. Sadly not for JPG. but shoot  -dl worked for JPG. Will use that until I get around remoteshoot jpg for this camera.

Only hickup is the speed per picture. It is likely not the transfer speed, but something else. In the past remote shoot without using PTP was quit a little faster 2.2sec per shot, now ~6sec per shot. Will look an sourcecode of CHDK and CHDKPTP now to see if it is somehow possible to add remoteshoot with JPG on this camera. I'll hope that will speed up the pics per second issue. Would like to get to <4sec per picture a full resolution.

So, Big thanks to all nifty coders working on CHDK and everyone else that made it possible.

*

Offline reyalp

  • ******
  • 14080
Re: alternative ptp client
« Reply #433 on: 25 / October / 2013, 16:17:10 »
Just for all, some info; Successfully ran chdkptp on Ubuntu 12.04 64bit. I've compiled from source. Used CLI as well interactive and via a script.  Tested with IXUS 200 IS camera v1.01c. Remoteshoot worked well with RAW n DNG. Sadly not for JPG. but shoot  -dl worked for JPG. Will use that until I get around remoteshoot jpg for this camera.
jpeg remote shoot requires camera side support (filewrite task). It should be possible to implement on any camera, but it's quite a bit of code.

Quote
Only hickup is the speed per picture. It is likely not the transfer speed, but something else. In the past remote shoot without using PTP was quit a little faster 2.2sec per shot, now ~6sec per shot.
Can you clarify what what setup you were using in the past that gave the faster speed? If you were doing this with a previous version of chdkptp with the same camera, please give the specific versions and commands used.

Camera settings can also have a significant impact on shooting speed (though 2.2 - 6 would be excessive for camera settings alone, unless you are taking a multi-second exposure). If you are transferring raw/DNG, that obviously adds a very significant amount of actual transfer time compared to jpeg.

Quote
Will look an sourcecode of CHDK and CHDKPTP now to see if it is somehow possible to add remoteshoot with JPG on this camera. I'll hope that will speed up the pics per second issue. Would like to get to <4sec per picture a full resolution.
As above, you just need to implement filewrite task. You can use a camera with the same dryos version that already has support as an example, and use code-gen for the asm code.
Don't forget what the H stands for.


Re: alternative ptp client
« Reply #434 on: 31 / October / 2013, 04:19:42 »
Quote
I'm sorry, I don't understand what the problem is. If you can explain what you did, what you expected to happen, and what actually happened, that might be more useful than screenshots.

Quote
In "Play" there is a problem with 1 to 1 Aspect ratio, may be due to Ixus 115/125 cameras :-
see attached Ixus 125 ....... 125-101a_Play_&_Aspect 1-1

The FishEye is an attached Lense and not the "FishEye effect"


A Edit #1; see here http://chdk.setepontos.com/index.php?topic=8085.msg106723#msg106723
« Last Edit: 31 / October / 2013, 04:24:04 by Hardware_Hacker »

Re: alternative ptp client
« Reply #435 on: 10 / November / 2013, 13:54:27 »
Based on tpont's post http://chdk.setepontos.com/index.php?topic=6231.msg90959#msg90959, I decided to use AutoHotKey [http://www.autohotkey.com/] to start some CLI testing with my SX150IS. The PC is Win 7, 64 bit.

My CHDK was built using CHDK-Shell:

***Build Info***, CHDK Ver: CHDK 1.3.0-3187, Revision: 0, Date: Oct 28 2013, Time: 11:21:49, Camera: sx150is, FW Vers: 100a, Compiler: GCC 4.4.0

For chdkptp, I used [the easy way out]:

chdkptp-r438-win32 from here https://www.assembla.com/spaces/chdkptp/documents

Here's the first AutoHotKey script I used:

Code: [Select]
;***a semicolon denotes comment in AutoHotKey

IfWinExist C:\CHDK\chdkptp\chdkptp-r438-win32\chdkptp.exe
{
    WinActivate
}
else
{
    Run C:\CHDK\chdkptp\chdkptp-r438-win32\chdkptp.exe -i
    WinWait C:\CHDK\chdkptp\chdkptp-r438-win32\chdkptp.exe
    WinActivate
}

Send connect{Enter}
Send rec{Enter}

; notes:

;(i)camera changes to record & goes black after exactly 1 minute and camera shuts down after exactly 3 mins
;(ii) if , between 1 and 3 mins [i.e camera not shutdown], "Send shoot(){Enter}" --> then picture is taken.

So,

with usb already connected between PC and camera, I power-on camera which starts in playback. I then run the script and the

  • camera changes to record. The LCD then goes black after exactly 1 minute and subsequently shuts down after exactly 3 mins
  • if , between 1 and 3 mins [i.e camera not shutdown], "Send shoot(){Enter}" --> then picture is taken

Am I doing something silly ? [hope so] or is this a similar problem to that reported by ant_thomas, described here:
http://chdk.setepontos.com/index.php?topic=6231.msg95142#msg95142

Please find romlog attached.

Further:

Based on this post http://chdk.setepontos.com/index.php?topic=6231.msg90966#msg90966 I created the following AutoHotKey script to test the chdkptp "-r" option:

Code: [Select]
;***semicolon denotes comment in AutoHotKey

IfWinExist C:\CHDK\chdkptp\chdkptp-r438-win32\chdkptp.exe
{
    WinActivate
}
else
{
;    Run C:\CHDK\chdkptp\chdkptp-r438-win32\chdkptp.exe -i -rmcinit.chdkptp
;    WinWait C:\CHDK\chdkptp\chdkptp-r438-win32\chdkptp.exe
;    WinActivate

;***had to include the complete Win7 64bit path name for the '-r' option to work:-

Run C:\CHDK\chdkptp\chdkptp-r438-win32\chdkptp.exe -i -rC:\CHDK\chdkptp\chdkptp-r438-win32\mcinit.chdkptp
    WinWait C:\CHDK\chdkptp\chdkptp-r438-win32\chdkptp.exe
    WinActivate
}

;Send source mcshoot.chdkptp{Enter}

;***again, had to include the complete Win7 64bit path name for this to work:-

Send source C:\CHDK\chdkptp\chdkptp-r438-win32\mcshoot.chdkptp{Enter}

Send {!}mc:cmdwait('exit'){Enter}

;------------------------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------------------------

;File content of mcinit.chdkptp:-

;# load the multicam module
;!mc=require('multicam')
;# connect to all cameras
;!mc:connect()
;# initialize script on the cameras
;!mc:start()
;# initialize timing
;!mc:init_sync()
;# switch cameras to rec mode
;!mc:cmdwait('rec')

;------------------------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------------------------

;File content of mcshoot.chdkptp:-

;# half press the shutter to focus
;!mc:cmdwait('preshoot')
;# shoot, 100ms after cmd issued
;!mc:cmdwait('shoot',{syncat=100})

;------------------------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------------------------

;***Build Info***
;CHDK Ver: CHDK 1.3.0-3187
;Revision: 0
;Date: Oct 28 2013
;Time: 11:21:49
;Camera: sx150is
;FW Vers: 100a
;Compiler: GCC 4.4.0

This works.

I was surprised that I had to use the full Win7 path name in the code -

should I have been [surprised] ?
is there an entry in "some" config file that the path name can be written to ?

[I have briefly reviewed USAGE.TXT for an answer. Under Windows [for me] - the answer isn't patently obvious  :(]

Any comment appreciated.

PS: both "mcinit.chdkptp" & "mcshoot.chdkptp" were copied to the same directory as chdkptp.exe

PPS: working from front to back, I still haven't got past [this] thread page 28 - so if there's later answers, apologies !

     

*

Offline reyalp

  • ******
  • 14080
Re: alternative ptp client
« Reply #436 on: 10 / November / 2013, 15:01:20 »
Based on tpont's post http://chdk.setepontos.com/index.php?topic=6231.msg90959#msg90959, I decided to use AutoHotKey [http://www.autohotkey.com/] to start some CLI testing with my SX150IS. The PC is Win 7, 64 bit.
First of all, I would suggest you get things working using chdkptp directly, rather than involving autohotkey. Not saying that is directly related to your current problem, but adding more layers only going to cause more confusion.

Quote
;(i)camera changes to record & goes black after exactly 1 minute and camera shuts down after exactly 3 mins
Have you set "disable LCD off" in the CHDK settings? If not, it will behave something like you describe. This shouldn't trigger a romlog however, it will just turn the display off, and then if a key isn't pressed for a while, turn the camera off.

To check this, you should verify that the timestamp on the romlog matches the time the problem actually occurred. romlogs are stored indefinitely, so you get whatever old one. The one you posted appears to be from Nov 1.
Don't forget what the H stands for.

Re: alternative ptp client
« Reply #437 on: 10 / November / 2013, 16:38:21 »
First of all, I would suggest you get things working using chdkptp directly, rather than involving autohotkey. Not saying that is directly related to your current problem, but adding more layers only going to cause more confusion.

Understood - I had done it manually as well but found it easier copying the autohotkey code into the post. Yes, sprinkling's of "sleep, '??'" are required with it.

Have you set "disable LCD off" in the CHDK settings? If not, it will behave something like you describe. This shouldn't trigger a romlog however, it will just turn the display off, and then if a key isn't pressed for a while, turn the camera off.

No, as feared - i'm [very] embarassed  :-[.

Sorry for taking your time [but at least I can still be kind to this decent little camera  :)].

To check this, you should verify that the timestamp on the romlog matches the time the problem actually occurred. romlogs are stored indefinitely, so you get whatever old one. The one you posted appears to be from Nov 1.

Another lesson learnt ! [but I can't ever remember an event that would have previously triggered romlog creation  :blink:].


I'm pushing it now but rather than including the complete Windows path name in the -r option is there somewhere else this can be 'stored' ?


*

Offline reyalp

  • ******
  • 14080
Re: alternative ptp client
« Reply #438 on: 10 / November / 2013, 17:20:43 »
I'm pushing it now but rather than including the complete Windows path name in the -r option is there somewhere else this can be 'stored' ?
As described in usage.txt, chdkptp will look for _chdkptprc at startup, and execute it if found.

Additionally, most of chdkptp is written in Lua. The code can be found in the lua directory. This is loaded at run time, so you can customize it any way you want, or write your own Lua modules to implement new functionality. To make maintenance easier, I would suggest putting your own code in a separate file whenever possible. You can load the file either by putting a require in one of the standard lua files, or by executing a require in your startup file, as you did with multicam. You could also make a copy of multicam.lua and customize it to do whatever you want.
Don't forget what the H stands for.

Re: alternative ptp client
« Reply #439 on: 10 / November / 2013, 17:32:11 »
Thanks [as usual].

 

Related Topics