×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Mirror lock on Canon with serial shutter?

I'm trying to incorporate a solution that would work for all cameras (at least all Canon). So questions:

1. Is this supported by all Canon cameras?
2. Is an external remote serial shutter always required?
3. Any differences between EOS and other camera types?
4. What is mechanism to hold mirror in place exactly? I see you open a port and then sleep
5. You disabled regular exposure for less < 1 and used bulb, is there a lower limit to using bulb? aren't camera timings better for < 1 second resolution?
7 years 5 months ago #10971

Please Log in or Create an account to join the conversation.

  • Posts: 105
  • Thank you received: 23
Hi Jasem,

I'll try to answer your questions as far as I can because I only have one Canon camera.
1. As fas as I know this should work with all cameras that support an external shutter cable.
2. In the case of 350D and older cameras it is always required.
3. I don't know the answer to this.
4. When the mirror lockup mode is selected in the camera's menus, the first time the serial port is opened the mirror moves to the "up" position and is locked. When the serial port is closed, the mirror stays there. The exposure itself is started the second time the serial port is opened. When the exposure time is set to a specific value (e.g., 1, 2 or 1/20 of a second) the serial port can be closed at any time. But when the exposure time is set to 'bulb' closing the serial port will end the exposure. When mirror lock is not enabled on the camera, the first step can be skipped and the mirror and shutter are opened simultaneously when the serial port is opened.
Before I started using INDI and Ekos, I used a small Windows program that controlled the shutter in this way while standard Canon software loaded the RAW images from the camera automatically after each exposure.
5. Yes, I did because I noticed that the INDI driver set exposure time to 1s after the first bulb exposure. As far as I know at this moment it is not possible to set the exposure time to 'bulb' via the USB connection (on this camera) so this prevents taking any further long exposures. I think that both for short and long exposures timing should be accurate. For short exposures it is indeed easier to implement by using the standard exposure times.

Best regards,
Camiel
The following user(s) said Thank You: Jasem Mutlaq
7 years 5 months ago #10992

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 3
Hello Jasem,

I've a couple month ago proposed a patch for the gphoto drv implementing the mirror lock feature for Canon without serial shutter.
For all recent Canon there is no pre-requisite on a serial cable so you must avoid this additional cable.

FYI, Since then, i've tested my code for Canon 7D, 7DmkII, 6D with succes.

Regards,
HoxCa
The following user(s) said Thank You: Jasem Mutlaq
7 years 5 months ago #10994

Please Log in or Create an account to join the conversation.


I've disabled mirror locking since I wanted a _clear_ defined way to do it in all cases and not break functionality of some cameras. If you can resubmit a Pull Request including including all cases (with and without serial port) then I'd really appreciate it especially since you can test it and so can Camiel and then we know it works for all.
7 years 5 months ago #10995

Please Log in or Create an account to join the conversation.

  • Posts: 105
  • Thank you received: 23
Hi Jasem,

I have been experimenting a bit with gphoto 2.5.10 and my 350D. The following gphoto2 commands work for me.
Whithout mirror lock and an exposure time that is not 'bulb', e.g., 2 seconds:

gphoto2 --set-config shutterspeed=2 --capture-image-and-download

In the case of mirror lock for any exposure time including bulb (using the camera's button to trigger the mirror lock and exposure)

gphoto2 --set-config shutterspeed=Bulb --wait-event-and-download=10s

In this case the waiting time should be larger than the exposure time of course!

I have noticed that in the latest source of gphoto_ccd.cpp you have changed the test to check for
the availability of a mirror lock. You do this now using the "cameramodel" widget. However, my
350D only has the "model" widget.

Regards,
Camiel
7 years 5 months ago #11058

Please Log in or Create an account to join the conversation.

I'm actually looking only at "manufacturer" now, but I forgot to replace of the conditions and just did it now. Does this mirror locking in the current GPhoto driver work for you?
7 years 5 months ago #11059

Please Log in or Create an account to join the conversation.

  • Posts: 105
  • Thank you received: 23
Sorry, that's actually what I meant: my 350D does not have either manufacturer or model widgets.
My solution is the following patch in gphoto_driver.cpp:

@@ -1024,6 +1050,15 @@ gphoto_driver *gphoto_open(const char *shutter_release_port)
gphoto->model = widget->value.text;
}

+ // If neither works
+ if ( (widget = find_widget(gphoto,"model")) != NULL )
+ {
+ DEBUGFDEVICE(device, INDI::Logger::DBG_DEBUG,"Model: %s", widget->value.text);
+ gphoto->model = widget->value.text;
+ if (gphoto->manufacturer == NULL)
+ gphoto->manufacturer = widget->value.text;
+ }
+
// Check for user
if(shutter_release_port)
{

In this manner no changes in gphoto_ccd.cpp are required. I still need to apply my previous patch
to use the external shutter release. With these two modifications, bulb exposure > 1 second work.

I have found a new problem which explains why changing shutter speed and any other setting on
the camera doesn't work. It appears that calls to gp_widget_get_choice from the gphoto2 library are
returning messed up results. I have added some extra debugging print statements:

@@ -319,8 +319,9 @@ int gphoto_set_widget_num(gphoto_driver *gphoto, gphoto_widget *widget, float va
case GP_WIDGET_RADIO:
case GP_WIDGET_MENU:
ret = gp_widget_get_choice (widget->widget, ival, &ptr);
+ DEBUGFDEVICE(device, INDI::Logger::DBG_DEBUG, "Get choice %s: %d (%s), ptr=%s ret=%d (%s)", widget->name, ival, ptr, ret, gp_result_as_string(ret));
ret = gp_widget_set_value (widget->widget, ptr);
- DEBUGFDEVICE(device, INDI::Logger::DBG_DEBUG, "Setting radio/menu widget %s: %d (%s)", widget->name, ival, widget->choices[ival]);
+ DEBUGFDEVICE(device, INDI::Logger::DBG_DEBUG, "Setting radio/menu widget %s: %d (%s), ret=%d (%s)", widget->name, ival, widget->choices[ival], ret, gp_result_as_string(ret));
break;
case GP_WIDGET_RANGE:
ret = gp_widget_set_value (widget->widget, &value);

This is what I see in my log files:

INFO 11.954409 sec : Please update the camera pixel size in the Image Info section. The camera resolution will be updated after the first exposure is complete.
DEBUG 12.083854 sec : Configuration successfully loaded.
DEBUG 14.451276 sec : Starting exposure (exptime: 1 secs, mirror lock: 3)
DEBUG 14.451326 sec : Mutex locked
DEBUG 14.451360 sec : Get choice iso: 7 (400), ptr=(null) ret=47283892 (H<89><C7>H<8D>E<B0>H<83><EC>^HAV<8B>U<A4>RAUATSA<B9><D8><D8>A)
DEBUG 14.451387 sec : Setting radio/menu widget iso: 7 (400), ret=0 (No error)
DEBUG 14.451431 sec : Setting new configuration OK.
DEBUG 14.451455 sec : Get choice imageformat: 0 (RAW), ptr=(null) ret=47283892 (H<89><C7>H<8D>E<B0>H<83><EC>^HAV<8B>U<A4>RAUATSA<B9><D8><D8>A)
DEBUG 14.451478 sec : Setting radio/menu widget imageformat: 0 (RAW), ret=0 (No error)
DEBUG 14.451513 sec : Setting new configuration OK.
DEBUG 14.451533 sec : Using camera predefined exposure ranges.
DEBUG 14.451554 sec : Finding optimal exposure setting for 1 seconds...
DEBUG 14.451577 sec : Best match: 1 seconds Index: 16
DEBUG 14.451596 sec : Setting exposure widget bulb index: 16
DEBUG 14.451618 sec : Get choice shutterspeed: 16 (1), ptr=(null) ret=47283892 (H<89><C7>H<8D>E<B0>H<83><EC>^HAV<8B>U<A4>RAUATSA<B9><D8><D8>A)
DEBUG 14.451640 sec : Setting radio/menu widget shutterspeed: 16 (1), ret=0 (No error)
DEBUG 14.451676 sec : Setting new configuration OK.
DEBUG 14.451697 sec : Using predefined exposure time: 1 seconds
DEBUG 14.451718 sec : Locking mirror by opening remote serial shutter port: /dev/ttyUSB0 ...
DEBUG 17.725801 sec : Exposure started

My first thought was that there could be an alignment issue between the gphoto_driver.cpp code and the library.
But I get this both with the standard libgphoto2 from Kubuntu and the one I compile from source.
Do you have this problem too?
7 years 5 months ago #11082

Please Log in or Create an account to join the conversation.

Can you please submit this as a pull request on Github? The mirror locking is working on my 600D (without serial shutter), so we need to make sure it works across the board.
7 years 5 months ago #11087

Please Log in or Create an account to join the conversation.

  • Posts: 105
  • Thank you received: 23
Hi Jasem, I just submitted the pull request.
7 years 5 months ago #11146

Please Log in or Create an account to join the conversation.

Can't find any PR. Are you sure you forked from here? github.com/indilib/indi
7 years 5 months ago #11147

Please Log in or Create an account to join the conversation.

  • Posts: 105
  • Thank you received: 23
I think so. I followed the instructions on GitHub. After creating an account, I forked to my own account, created a branch, edited the source, and made the pull request. There were no merge conflicts and the pull request was successful. Probably, it didn't end up where I intended.
7 years 5 months ago #11148

Please Log in or Create an account to join the conversation.

  • Posts: 105
  • Thank you received: 23
Okay found the mistake: a pull request is visible now.
7 years 5 months ago #11150

Please Log in or Create an account to join the conversation.

Time to create page: 0.607 seconds