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

chdkptp - alternative ptp client

  • 1106 Replies
  • 534045 Views
*

Offline lyzby

  • **
  • 52
Re: alternative ptp client
« Reply #530 on: 08 / February / 2014, 19:39:12 »
Advertisements
I have a very recent chdk running on my camera (I think--3349) and I'm running what I think is the latest version of chdkptp on my headless dockstar running debian.

I can connect, zoom, shoot, and download, but I'm having a problem with remoteshoot (rs)--I get "WARNING: capture_get_data error timed out". 

Here is a session:

/usr/src/chdkptp/lua# /usr/src/chdkptp/chdkptp -i -c
connected: Canon PowerShot A590 IS, max packet size 512
con> rec
con 1> rs /var/www
WARNING: capture_get_data error timed out
ERROR: timed out
con 4> q
bye

I also get this if no path is provided, just "rs"

A question separate from chdkptp:  If I'm running the camera always powered (no batteries) is there a way to keep it from turning itself off?

*

Offline reyalp

  • ******
  • 14098
Re: alternative ptp client
« Reply #531 on: 08 / February / 2014, 20:12:44 »
/usr/src/chdkptp/lua# /usr/src/chdkptp/chdkptp -i -c
connected: Canon PowerShot A590 IS, max packet size 512
con> rec
con 1> rs /var/www
WARNING: capture_get_data error timed out
ERROR: timed out
This means it timed out waiting for data to become available. Does the camera shoot? If not, there may be something on the camera that is preventing the shot from the starting, e.g. in automode the camera might refuse to shoot if it can't focus.

What version of chdkptp are you using? ver -p should tell you.  If you are using chdkptp before r426, there are some bugs that can cause this behavior.

Assuming you are building it yourself (I'm guessing so for dockstar) you may want to try the latest svn.

Does "shoot" work?

Quote
A question separate from chdkptp:  If I'm running the camera always powered (no batteries) is there a way to keep it from turning itself off?
Setting "disable LCD off" to always in the chdk menu should do this. You can also set this setting with set_config_value()
Don't forget what the H stands for.

Re: alternative ptp client
« Reply #532 on: 08 / February / 2014, 20:56:19 »
A question separate from chdkptp:  If I'm running the camera always powered (no batteries) is there a way to keep it from turning itself off?
Try : set_config_value(67, 3)
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline lyzby

  • **
  • 52
Re: alternative ptp client
« Reply #533 on: 09 / February / 2014, 10:15:22 »
This is the file I downloaded and unzipped to the SD to put chdk on the camera:
a590-100e-1.3.0-3349-full.zip

To get chdkptp on the dockstar I moved to the directory /usr/src and did this:
 svn co http://subversion.assembla.com/svn/chdkptp/trunk chdkptp

I moved to the chdkptp directory and looked at config-sample-linux.mk, which seemed ok, so I copied it to config.mk

I ran make, and all appeared ok.

I looked in USAGE.TXT, but didn't do anything

I can turn the camera on in play mode and connect with
cd lua
/usr/src/chdkptp/chdkptp -i -c
(I tried setting LUA_PATH="/usr/src/chdkptp/lua/cli.lua" but still got lua errors unless I switched to /usr/src/chdkptp/lua)
I did not set LD_LIBRARY_PATH because I didn't understand what it did and couldn't find any "uip" on the dockstar.

Once connected, I can zoom, shoot, and download the image.  "rs" appears to shoot, including flash, but the download fails with "WARNING: capture_get_data error timed out"

ver -p gives this
con> ver -p
chdkptp 0.4.0-alpha built Feb  6 2014 21:40:08
host:2.6 cam:2.6


*

Offline reyalp

  • ******
  • 14098
Re: alternative ptp client
« Reply #534 on: 09 / February / 2014, 16:23:52 »
/usr/src/chdkptp/chdkptp -i -c
(I tried setting LUA_PATH="/usr/src/chdkptp/lua/cli.lua" but still got lua errors unless I switched to /usr/src/chdkptp/lua)
LUA_PATH should be something like /usr/src/chdkptp/lua/?.lua The suggested way to do this is to use a shell script, see chdkptp-sample.sh but I don't think this is related to your problem.

Quote
I did not set LD_LIBRARY_PATH because I didn't understand what it did and couldn't find any "uip" on the dockstar.
It's IUP, but this is only required for the GUI. Since your system is headless, you don't need it.

Quote
Once connected, I can zoom, shoot, and download the image.  "rs" appears to shoot, including flash, but the download fails with "WARNING: capture_get_data error timed out"
What is the review setting in the Canon menu? If it is "hold" the shot won't complete until you press the shutter again, which will cause a timeout like you are seeing.

If that isn't it, using
set cli_verbose=2
may provide a little more info on where it stops.
Don't forget what the H stands for.

*

Offline lyzby

  • **
  • 52
Re: alternative ptp client
« Reply #535 on: 10 / February / 2014, 10:14:46 »
I set the lua path as follows:

LUA_PATH='/usr/src/chdkptp/lua/?.lua'

I still get lua errors running "/usr/src/chdkptp/chdkptp -i -c", but all works fine if I switch to the /usr/src/chdkptp/lua directory and run.

The review setting in the Canon menu was "2 sec".  I changed it to "0".

Same error with more text after "set cli_verbose=2":

root@dock84:/usr/src/chdkptp/lua# /usr/src/chdkptp/chdkptp -i -c
connected: Canon PowerShot A590 IS, max packet size 512
con> rec
con 1> set cli_verbose=2
con 1> rs
rs_init
rs_shoot
get data 1
WARNING: capture_get_data error timed out
script wait time 0.0024
ERROR: timed out
con 4> q
bye

*

Offline openuas

  • **
  • 58
  • OpenUAS
    • OpenUAS
Re: alternative ptp client
« Reply #536 on: 10 / February / 2014, 15:19:26 »
Just for all CHDKPTP enhousiasts, I've made a Wikipage on how to get headless CHDKPTP running on a Beagle Bone Black ARM board  :haha

*

Offline reyalp

  • ******
  • 14098
Re: alternative ptp client
« Reply #537 on: 10 / February / 2014, 23:14:59 »
I set the lua path as follows:

LUA_PATH='/usr/src/chdkptp/lua/?.lua'

I still get lua errors running "/usr/src/chdkptp/chdkptp -i -c", but all works fine if I switch to the /usr/src/chdkptp/lua directory and run.
That's very strange. It's a really simple thing that should not be platform dependent, but I guess it probably isn't related to your other problem.

Quote
The review setting in the Canon menu was "2 sec".  I changed it to "0".
2 shouldn't have caused the problem anyway, although it would probably add 2 sec delay to each shot.

Quote
Same error with more text after "set cli_verbose=2":
con 1> rs
rs_init
rs_shoot
get data 1
WARNING: capture_get_data error timed out
script wait time 0.0024
This is also very strange, I don't have any explanation.

How much time passes between the rs command, the get data 1, and the WARNING? It should take something like 30 seconds to time out. If you are using exposures are longer than about 30  sec (or 15  if dark frame is enabled) you would get timeouts.

I am pretty sure other people who have used remoteshoot successfully on a590. It's possible some camera setting is interfering, but I can't think of any other than recreview that would.

Can you try it using a different computer?
Don't forget what the H stands for.


*

Offline blackhole

  • *****
  • 942
  • A590IS 101b
    • Planetary astrophotography
Re: alternative ptp client
« Reply #538 on: 11 / February / 2014, 03:06:20 »
Quote
How much time passes between the rs command, the get data 1, and the WARNING? It should take something like 30 seconds to time out. If you are using exposures are longer than about 30  sec (or 15  if dark frame is enabled) you would get timeouts.
Any exposure longer than 18 seconds or 9 seconds plus dark frame causes a timeout problem.
On the shorter exposures everything works perfectly.

Re: alternative ptp client
« Reply #539 on: 11 / February / 2014, 16:13:34 »
Hi everyone,
I've got CHDK PTP working beautifully with my camera, and now I want to automate it to take photos on a regular interval, and save them onto the computer without filling up the sd card. Unfortunately, I'm not familiar with the coding, so I'd really appreciate any help. I've spent some time looking over this forum, but I think I'm missing some of the basics, but can't figure out where to start. I'm probably doing it all wrong, but here's what I have done so far. Using the GUI, after connecting and setting up the camera in record mode, I enter in the console:
Code: [Select]
source D:\path\to\intervalometer.txt
intervalometer.txt is simply:
Code: [Select]
rs D:\path\to\downloaded\pics -dng
! sys.sleep(5000)
rm DCIM -skip_topdirs
! sys.sleep(2000)
source D:\path\to\intervalometer.txt

Problems with this are 1) eventually I get ERROR: too many nested source calls, and 2) once the script runs, there's no nice way to stop it. I guess a script that calls itself is not the best idea. I imagine an intervalometer script with remote shooting should be fairly straight forward, but I just don't know where to start. Would someone please show me how to do it properly?
Thanks

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal