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

chdkptp - alternative ptp client

  • 1106 Replies
  • 559539 Views
Re: alternative ptp client
« Reply #140 on: 27 / March / 2012, 06:43:17 »
Advertisements
OK, it does switch to Record and Play from the gui.

I now how to find-out why the same commands do not work for the S95 with my code but do for other cameras.


what happen with S95 ?
Do the camera crash after

switch_mode_usb(1)

after the lens is move out ?.Ixus 1000 call for this is test and is correct.

Are there other cameras with this problem known, or is IXus 1000 the only ?

Code: [Select]
ASSERT!! KerQueue.c Line 86
Occured Time  2012:03:27 12:32:14
Task ID: 16711713
Task name: CtrlSrv
SP: 0x00389958
StackDump:
0x00000000
0xFF83AF44
0x00000056
0x00000001
0x001E4050
0x00000000
0x0000F6EA
0x00000000
0x00000000
0x19980218
0x19980218
0xFF83AD84
0x0000438C
0x00000001
0x0000201D
0xFF83B670
0x0000438C
0xFF8AABA8
0x00000000
0x0000410C
0x00000001
0xFF8A5B58
0x00003DAC
0x00000001
0x0000201D
0xFF89F93C
0x00003DAC
0xFF89EB04
0x001F3168
0x0000391C
0x0000201D
0xFF899B08
0x001F3168
0x00000001
0x0000391C
0x0000201D
0x0000F6EA
0xFF89A014
0x0003D54C
0x00003904
0x19980218
0x19980218
0x19980218
0x19980218
0x19980218
0xFF8994D4
0x0003D54C
0x00372B10
0x19980218
0xFF816B74
0x19980218
0x19980218
0x00002008
ShootConDump:
0f 0f 0f 0f 0f 0f 0f 0f 0f 0f
CameraConDump:
07 0a 02 0d 09 0f 0f 0f 0f 0f
00060540: UI:Reduce ScreenUnLock

00060540: UI:ScreenLock

00060540: UI:Reduce ScreenUnLock

00060540: UI:ScreenLock

00060540: UI:Reduce ScreenUnLock

00060540: UI:ScreenLock

00060540: UI:Reduce ScreenUnLock

00060540: UI:ScreenLock

00060540: UI:ScreenUnLock

00060540: UI:ScreenLock

00060540: UI:Reduce ScreenUnLock

00060550: UI:ScreenLock

00060550: UI:Reduce ScreenUnLock

00060550: UI:ScreenLock

00060550: UI:Reduce ScreenUnLock

00060550: UI:ScreenLock

00060550: UI:Reduce ScreenUnLock

00060550: UI:ScreenLock

00060550: UI:Reduce ScreenUnLock

00060550: UI:ScreenLock

00060550: UI:Reduce ScreenUnLock

00060550: UI:ScreenLock

00060550: UI:Reduce ScreenUnLock

00060550: SS:InitPTM

00060550: SS: 004b->8004

00060550: SS: Asp 0000->0000

00060560: UI:ScreenLock

00060560: UI:ScreenUnLock

00060620: UI:AC:TstEVF:Ok

00060620: SS:ToRec

00060620: SS:Lens1stP

00060620: SS: Evf=1

00060620: M:FIRST_S

00060660: M:ZM_RST_S

00060710: M:IS_RST_S

00060710: SS:InitPTM

00060710: SS: 004b->8004

00060710: SS: Asp 0000->0000

00060710: SS:ImgSys

00060710: UI:LogicalEvent:0x5004:adr:0,Para:0

00060710: UI:DisplayPhysicalScreenCBR

00060710: UI:DisplayPhysicalScreenCBR

00060710: UI:DisplayPhysicalScreenCBR

00060710: UI:AC:ShwCaptI

00060710: UI:DSIC:53,0

00060710: UI:ScreenLock

00060710: UI:DSIC:49,1

00060720: UI:Display_CaptInfo

00060740: UI:DSIC:c4,0

00060770: UI:AC:DispSht

00060770: UI:DSIC:8c,0

00060860: M:IS_RST_E

00060860: M:IR_RST_S

00060900: M:IR_RST_E

00061410: M:ZS_RST_E

00061410: M:ZM_RST

00061410: M:ZS_RST_S

00061410: M:ZS_RST_S

00061790: M:ZS_RST_E

00061970: M:ZM_RST_E

00062070: M:ZM_RST_F

00062070: M:ZS_RST_S

00062080: M:ZS_RST_E

00062080: M:ZS_RST_S

00062080: M:FC_RST_S

00062150: M:ZM_MVP_E

00062170: M:FC_RST_E

00062170: M:ZM_MVP_S

00062170: M:FC_STB_S

00062170: M:ZM_MVP_S

00062210: M:ZS_RST_E

00062210: M:ZS_RST_S

00062270: M:ZS_RST_E

00062450: M:FC_STB_E

00062500: UI:ScreenUnLock

00062530: UI:DisplayPhysicalScreenCBR

00062680: M:ZM_MVP_E

00062680: M:FIRST_E

00063210: UI:ShootSeqToUI:0x202e:adr:0x373ee8,Para:3620584

00063210: UI:ShootSeqToUI:0x201d:adr:0,Para:0

00063210: UI:DispSwCon_TurnOnBackLight

00063210: UI:DispSwCon_MuteOffPhysicalScreen

00063210: UI:AC:SUpShowI

00063210: UI:AC:EnryRecBt

00063210: UI:StartRecMode

00063220: UI:DispSwCon_MuteOffPhysicalScreen

00063220: UI:LogicalEvent:0x3110:adr:0,Para:0

00063220: UI:DispSwCon_TurnOnDisplayDevice

00063220: UI:UI_StrobeCon_Start

00063230: UI:LogicalEvent:0x301c:adr:0,Para:0
Ixus 1000 HS

Re: alternative ptp client
« Reply #141 on: 27 / March / 2012, 07:52:11 »
Code: [Select]
[quote author=Bernd R link=topic=6231.msg83439#msg83439 date=1332844997]
what happen with S95 ?

It works OK !

At the start of spytask() (before entering the endless loop), I was getting the image-resolution property-case.

However, it was carelessly positioned before init_file_modules_task() had reported 'spytask_can_start'.


David

Re: alternative ptp client
« Reply #142 on: 28 / March / 2012, 10:01:19 »
Thanks for that Reyalp. I've already read that page about Darwin (after I'd spent several hours trying (and failing) to get a simple libusb program to turn off the bright white led on my Seagate FreeAgent external drive!).

I've also used the OSX IOKit framework to write a simple app to transfer photos. That worked, but it requires extensive delving into the Objective-C libraries to do anything like PTP and so far I've resisted making the effort to get to grips with that. I guess I'll either have to bite the bullet or live with Windows.
I don't know if this has been solved, I haven't finished reading the thread, but I know that you can make a "fake" kernel extension stub to override this behavior...  I had done this before for some other devices, and I also know that the libomron (http://qdot.github.com/libomron/) project did a similar thing. Look in the platform directory in the source tree.

Hope this helps, I'd like to see this available on OSX.  I may even give it a look when I actually can finish the projects I'm in the middle of. LoL

*

Offline tpont

  • **
  • 81
Re: alternative ptp client
« Reply #143 on: 29 / March / 2012, 17:07:47 »
Hi, I want to use chdkptp to take a photo with two connected cameras at the same time. Is that possible?

If I run two commands in immediate sequence then only one of them is triggered. Example:
C:\chdkptp -n -c"A480" -e"luar shoot()"
C:\chdkptp -n -c"A495" -e"luar shoot()"

The problem is, I suspect, that the second process is aborted because it detects that chdkptp is still running because the first photo takes almost two seconds to complete.

I tried making a copy of the chdkptp folder so that two different processes are started. But that didn't help.

Any suggestions on how to solve this? If I add a two second delay then the first photo has time to complete. But as I said I want shots at the same time, or at least no more than half a second apart.
« Last Edit: 29 / March / 2012, 17:11:43 by tpont »

Re: alternative ptp client
« Reply #144 on: 29 / March / 2012, 17:28:08 »
Reyalp can answer that but for now see this :-

http://trac.assembla.com/chdkptp/browser/trunk/lua/multicam.lua

*

Offline tpont

  • **
  • 81
Re: alternative ptp client
« Reply #145 on: 29 / March / 2012, 17:55:41 »
Thanks. Works if I run all the commands in that file one by one. This may be a silly question but, how do I run the multicam.lua i.e. is there a single command line argument that does all the steps listed in the usage instruction in multicam.lua?

edit: never mind, got it.
Code: [Select]
chdkptp -n -e"!mc=require('multicam')" -e"!mc:connect()" -e"!mc:start()" -e"!return mc:cmdwait('rec')" -e"!return mc:cmdwait('preshoot')" -e"!return mc:cmdwait('shoot')" -e"!return mc:cmdwait('play')" -e"!mc:cmd('exit')"
« Last Edit: 29 / March / 2012, 18:03:45 by tpont »

Re: alternative ptp client
« Reply #146 on: 29 / March / 2012, 18:32:50 »
I don't use CHDK or Lua, so what happens when you run your command ?

*

Offline tpont

  • **
  • 81
Re: alternative ptp client
« Reply #147 on: 29 / March / 2012, 19:07:36 »
The combined command I pasted does these things on two (or more I guess) connected CHDK-cameras: activates photo mode, autofocuses the camera, takes a photo and then shows the photo on the camera display. Nice!  :)

But I'd also like to download photos from the cameras in parallell. I see no command for that in multicam.lua . Does anyone know another way to do that?

*

Offline reyalp

  • ******
  • 14125
Re: alternative ptp client
« Reply #148 on: 31 / March / 2012, 00:31:21 »
The combined command I pasted does these things on two (or more I guess) connected CHDK-cameras: activates photo mode, autofocuses the camera, takes a photo and then shows the photo on the camera display. Nice!  :)
Please be aware that multicam is quite unfinished at this point. Of course you are welcome to use it, but some hacking might be required to get all the functionality you want.
Quote
But I'd also like to download photos from the cameras in parallell. I see no command for that in multicam.lua . Does anyone know another way to do that?
Not implemented yet in multicam. It should be pretty straightforward, just iterate over the cameras like the other multicam functions and call one of the download functions. This is on my list of things to do.

If you use con:mdownload(), you will need to exit and restart the camera side multicam script,eg.
Code: [Select]
mc:cmd('exit')
--  download stuff here...
mc:start()

If you use the low level con:download(), you could leave the script running, but it doesn't support pattern matching, multiple files, or preserving timestamps.

Rather than passing loads of -e commands, you would write your own lua file, and then do something like
chdkptp -e"!dofile('myfile.lua')"

Or add your own function to multicam, mc:testshots may be a useful example.

I haven't tested, but I suspect the reason multiple independent processes don't work is because
1) Connect by model name or serial number requires making a connection to obtain the info
2) Obtaining a connection requires kicking off anything else that already has a connection

If you connect by product id, (-p=<pid>) it might work. Bus/device should also work, but beware they do not correspond to the physical interface the camera is connected on. The numbers are assigned by libusb and can change across camera resets, reconnects etc. even if the physical connection is never unplugged or moved.
Don't forget what the H stands for.

*

Offline tpont

  • **
  • 81
Re: alternative ptp client
« Reply #149 on: 31 / March / 2012, 04:57:04 »
If you connect by product id, (-p=<pid>) it might work.
Confirmed working, thank you!

 

Related Topics


SimplePortal © 2008-2014, SimplePortal