chdkptp can't switch to record mode

  • 28 Replies
  • 3839 Views
  • Publish
    chdkptp can't switch to record mode
    « on: 08 / September / 2013, 08:09:50 »
    Advertisements
    Hello,

    i just installed chdk on a canon powershot s3 and chdkptp on windows 7 64bit.
    I can connect to the camera (testet with the gui version)  and a test of a few lua remote calls works fine (led on, off, etc.).
    But i can't switch to record mode. I try "lua switch_mode_usb(1)" and "rec" but nothing happens.
    If i call "shoot" i get the error message "error: not in rec mode". The display always went in play mode.

    I don't now what the problem is. I didn't find any solution in the forum. I tried different versions of chdk. chdkptp is the actual release.

    Any suggestions?


    Thank You
    « Last Edit: 08 / September / 2013, 08:12:07 by uni7 »

  • Publish
    Re: chdkptp can't switch to record mode
    « Reply #1 on: 08 / September / 2013, 11:19:55 »
    I am not sure, wheter it helps, but maybe you can try press("shoot_half")?
    if (2*b || !2*b) {
        cout<<question
    }

    Compile error: poor Yorick

  • Publish
    Re: chdkptp can't switch to record mode
    « Reply #2 on: 08 / September / 2013, 13:30:36 »
    Thanks for fast reply. But unfortunately nothing happens. Play mode still remains.

    *

    Online reyalp

    • ******
    • 9805
  • Publish
    Re: chdkptp can't switch to record mode
    « Reply #3 on: 08 / September / 2013, 13:59:30 »
    There's two possible issues I can think of:

    1) Other software interfering with the camera. If the camera receives a regular, non CHDK ptp command (like listing the files for download) it can go into a state where switching to rec is no longer possible. In this case the screen also usually goes black, though this may vary. On windows, I've only seen this happen if using the "filter" driver rather than "inf" driver, but again, YMMV. If you are using the filter driver, try switching.

    2) On a few cameras, mode switching on USB flat out doesn't work. G7 was recently reported as having issues, and IIRC maybe a580 as well? edit: A560 http://chdk.setepontos.com/index.php?topic=7744.msg81994#msg81994

    edit:
    One way to find out whether this is just an issue affecting you is to skim through the PTP development thread and see if anyone else has reported it working http://chdk.setepontos.com/index.php?topic=4338.0 (yes, it's over a hundred pages, sorry :( and there's also the chdkptp development thread: http://chdk.setepontos.com/index.php?topic=6231.0 )

    I'd be somewhat surprised if no one had tried it on s3 before, as it was a pretty popular chdk camera at one time. On the other hand, I see no one has implemented the more advanced live view functions.
    « Last Edit: 09 / September / 2013, 23:45:59 by reyalp »
    Don't forget what the H stands for.


  • Publish
    Re: chdkptp can't switch to record mode
    « Reply #4 on: 09 / September / 2013, 01:11:36 »
    I exclude issue 2. I remeber, I used the cam with canon remote capture in past. Furthermore the S3 is listed at several pages as "full remoteable" (http://capture.sourceforge.net/, http://www.gphoto.org/doc/remote/).

    So I will have to concentrate on issue 1, though on PaspberryPi I also can't switch to rec mode.
    On windows I tried both, the filter and the inf driver.

    I will try to connect with a non chdk ptp tool first and reading the huge chdkptp thread in forum.

    ps: live view in play mode works fine (ui overlay too)
    « Last Edit: 09 / September / 2013, 01:16:46 by uni7 »

    *

    Online reyalp

    • ******
    • 9805
  • Publish
    Re: chdkptp can't switch to record mode
    « Reply #5 on: 09 / September / 2013, 13:25:30 »
    I exclude issue 2. I remeber, I used the cam with canon remote capture in past. Furthermore the S3 is listed at several pages as "full remoteable" (http://capture.sourceforge.net/, http://www.gphoto.org/doc/remote/).
    Canon remote capture is completely different, the fact that canon remote capture works doesn't tell you anything about CHDK (it does give you an alternative though...) In fact, I think the G7 also has canon remote capture, so there might be a pattern.

    For #2, I meant "the CHDK mode switching method."

    If I get some time and no one else beats me to it, I'll see if it's possible to implement the mode switching method we use on dryos cameras for this camera.

    It sounds like you've eliminated #1 fairly thoroughly.
    Don't forget what the H stands for.

  • Publish
    Re: chdkptp can't switch to record mode
    « Reply #6 on: 09 / September / 2013, 14:48:57 »
    You are right. I finally tried the procedure on a xp machine, as expected with no success...
    So #2 would be the right one.

    I think a have to go further into the question (is this a correct expression???).


    *

    Online reyalp

    • ******
    • 9805
  • Publish
    Re: chdkptp can't switch to record mode
    « Reply #7 on: 09 / September / 2013, 23:07:58 »
    You are right. I finally tried the procedure on a xp machine, as expected with no success...
    So #2 would be the right one.

    I think a have to go further into the question (is this a correct expression???).
    I had a look at the firmware dump, and the obvious difference between PB2Rec on A540 (a similar era Vxworks camera where mode switching works) and S3 is that the S3 code checks IsControlEventActive(0x1085)

    0x1085 is ConnectUSBCable

    G7 appears to do the same.

    edit: a560 has the same check, the but event ID is 0x10A5


    So you can try the following in chdkptp:
    Code: [Select]
    =set_levent_active(0x1085,0)
    =switch_mode_usb(1)
    On my a540, this didn't seem to harm the PTP connection (unlike posting the disconnect event)

    If it works, we can add this to the mode switching code for the affected cameras. If it doesn't, there might be some other things to try.

    edit:
    If the above doesn't work, try
    Code: [Select]
    =set_levent_script_mode(1)
    =set_levent_active(0x1085,0)
    =switch_mode_usb(1)
    « Last Edit: 09 / September / 2013, 23:45:18 by reyalp »
    Don't forget what the H stands for.


    *

    Offline srsa_4c

    • ******
    • 3103
  • Publish
    Re: chdkptp can't switch to record mode
    « Reply #8 on: 10 / September / 2013, 12:15:54 »
    So you can try the following in chdkptp:
    Code: [Select]
    =set_levent_active(0x1085,0)
    =switch_mode_usb(1)
    If the above doesn't work, try
    Code: [Select]
    =set_levent_script_mode(1)
    =set_levent_active(0x1085,0)
    =switch_mode_usb(1)
    I tried both, in the above order, and it did work once on my s80 (script mode was needed apparently). It crashed later when I issued switch_mode_usb(0). Unfortunately, the romlog won't help too much - I don't have a main.dump and I erased that diskboot.bin too later :-[ . It's a "regular" data abort exception - I see exceptions quite often in connection with ptp...
    I haven't been able to repeat the mode switch ever since. Cam just turns off on switch_mode_usb(1)... No romlog is written.

    Thanks for doing the research, btw.

  • Publish
    Re: chdkptp can't switch to record mode
    « Reply #9 on: 10 / September / 2013, 12:57:16 »
    Yeah  :)

    it works with:

    If the above doesn't work, try
    Code: [Select]
    =set_levent_script_mode(1)
    =set_levent_active(0x1085,0)
    =switch_mode_usb(1)

    thank you for this phantastic support!!!

    switching back to play mode and back again works also fine. time to play around  :)

     

    Related Topics