chdkptp can't switch to record mode - page 2 - General Help and Assistance on using CHDK stable releases - CHDK Forum  

chdkptp can't switch to record mode

  • 28 Replies
  • 19568 Views
*

Offline reyalp

  • ******
  • 14000
Re: chdkptp can't switch to record mode
« Reply #10 on: 10 / September / 2013, 13:06:07 »
Advertisements
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...
Thanks for testing, I didn't realize that S80 was also affected by this. It seems to me there is a pattern that the cameras supporting Canon remote capture are the ones affected. So maybe there is a different function we can call to unlock rec mode on these cameras.

I suspected the set_levent_script_mode(1) is required, because on my a540 the return value of IsControlEventActive() doesn't change unless I set it.

You could try calling the PB2Rec and Rec2PB functions (found by the corresponding strings directly) but on my a540, this did not work.

If you do get it to work, you could try =set_levent_active(0x1085,1) before switching to play mode, which would more closely follow the dryos switch_mode_usb() code.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14000
Re: chdkptp can't switch to record mode
« Reply #11 on: 10 / September / 2013, 13:10:57 »
switching back to play mode and back again works also fine. time to play around  :)
Great, glad to hear it works on your camera. I'll add some form of it to svn later so you can use the regular controls.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: chdkptp can't switch to record mode
« Reply #12 on: 10 / September / 2013, 18:56:40 »
Thanks for testing, I didn't realize that S80 was also affected by this. It seems to me there is a pattern that the cameras supporting Canon remote capture are the ones affected.
Looks like it, but probably only the older (Vx) ones. Would be good to know how the s2is (a620, a640) behaves.

FWIW, you can add the first two Ixus models (30,40) to the list too.

Thx for the advice, I'll keep trying.

*

Offline reyalp

  • ******
  • 14000
Re: chdkptp can't switch to record mode
« Reply #13 on: 10 / September / 2013, 21:21:51 »
FWIW, you can add the first two Ixus models (30,40) to the list too.
Support canon remote capture, mode switching doesn't work, or the workaround works?

edit:
One more note, the event IDs may be different on some vxworks cameras.
« Last Edit: 10 / September / 2013, 21:35:05 by reyalp »
Don't forget what the H stands for.


*

Offline reyalp

  • ******
  • 14000
Re: chdkptp can't switch to record mode
« Reply #14 on: 10 / September / 2013, 22:17:26 »
I checked this in, trunk changeset 3100 release changeset 3101.

After these show up in the autobuilds, it should support mode switching on s3is using regular commands in chdkptp or switch_mode_usb() without the additional hack.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: chdkptp can't switch to record mode
« Reply #15 on: 11 / September / 2013, 11:46:48 »
FWIW, you can add the first two Ixus models (30,40) to the list too.
Support canon remote capture, mode switching doesn't work, or the workaround works?
Mode switching doesn't work, sorry for the ambiguity. Haven't tried the workaround yet.
Quote
One more note, the event IDs may be different on some vxworks cameras.
ConnectUSBCable is 0x1085 on the ixus30/40, s80.

*

Offline reyalp

  • ******
  • 14000
Re: chdkptp can't switch to record mode
« Reply #16 on: 29 / September / 2013, 20:59:52 »
Based on a report in PM, I added this workaround for G7. However, it reportedly doesn't allow switching back to play mode.

The Rec2PB function is slightly different from S3, but I don't really see anything obvious to try.
Don't forget what the H stands for.

Re: chdkptp can't switch to record mode
« Reply #17 on: 23 / November / 2013, 06:28:00 »
I have the same problem, but on A530.

CHDK 1.2.0 (r3238)
chdkptp r436 (self-compiled on x86 Ubuntu with default options in makefile)

Automount is disabled.
Camera boots to chdk.
When the cable is inserted, the screen goes black...

Code: [Select]
___> list
-1:Canon PowerShot A530 b=001 d=005 v=0x4a9 p=0x3126 s=nil
___> c
connected: Canon PowerShot A530, max packet size 512
con> =return 1+1
3:return:2
con 3> rec
ERROR: switch failed
con 4>

... but apparently the connection is live and talks to chdk.

What would I do here? I tried to find addresses of the functions and events mentioned here in firmware dump, but failed to match the file offsets with what the camera's memory would be... :(


*

Offline srsa_4c

  • ******
  • 4451
Re: chdkptp can't switch to record mode
« Reply #18 on: 23 / November / 2013, 07:36:42 »
When the cable is inserted, the screen goes black...
That shouldn't happen: the problem is on the PC side. Try disabling any OS services/daemons that "talk" to connected cameras. Unfortunately I have no idea what these are (they may/may not be gphoto related). Try a lower runlevel where X is not running: if the camera's LCD remains lit, the software component in question is not running.

*

Offline ahull

  • *****
  • 634
Re: chdkptp can't switch to record mode
« Reply #19 on: 03 / December / 2013, 08:48:06 »
On Ubuntu 13.10 I recently started to see a similar problem (I suspect related to some recent updates).

In my case the issue is indeed gphoto related.

The quick and hacky workaround is to kill the gphoto daemon that is causing the issue, something like this..

Code: [Select]
ps -ef |grep gph
ahull     3566  3099  0 19:05 ?        00:00:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor

kill -9 3566

to make this a permanent change.. this should do the trick (till the next dpkg update puts it back).

Code: [Select]
sudo mv /usr/lib/gvfs/gvfs-gphoto2-volume-monitor /usr/lib/gvfs/gvfs-gphoto2-volume-monitor.old

Of course this will break the auto-mounting of "photo volumes", so you might be better just scripting a killall  /usr/lib/gvfs/gvfs-gphoto2-volume-monitor into your chdkptp startup script.

The above applies only to Ubuntu, but may point you in the right direction.

The exact method for other flavours of Linux will depend on your OS (Windoze users, look away), and you may well be able to think of a neater long term solution to the issue than mine.
« Last Edit: 03 / December / 2013, 10:06:30 by ahull »

 

Related Topics