×

INDI Library v2.0.0 Released (01 Feb 2023)

Bi-monthly release with major changes to INDI properties and client API in addition to new drivers and improvements.

Mirror lock on Canon with serial shutter?

  • 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
6 years 3 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.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
6 years 3 months ago #10995

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

  • Posts: 104
  • 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
6 years 3 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?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
6 years 3 months ago #11059

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

  • Posts: 104
  • 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?
6 years 3 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.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
6 years 3 months ago #11087

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

  • Posts: 104
  • Thank you received: 23
Hi Jasem, I just submitted the pull request.
6 years 3 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
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
6 years 3 months ago #11147

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

  • Posts: 104
  • 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.
6 years 3 months ago #11148

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

  • Posts: 104
  • Thank you received: 23
Okay found the mistake: a pull request is visible now.
6 years 3 months ago #11150

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

Thanks, I merged the patch. Magnus also has 350D but there is an odd problem where the driver hangs because there is something breaking the XML. Do you have a property called "list_all_files", it's under what group/tab in the GUI? If you both have the same camera, I don't see how it is broken for one but not another!!
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
6 years 3 months ago #11151

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

  • Posts: 104
  • Thank you received: 23
With gphoto2 this property exists:

~$ gphoto2 --list-config
Detected a 'Canon:EOS 350D (normal mode)'.
/main/settings/ownername
/main/settings/capturesizeclass
/main/settings/iso
/main/settings/shootingmode
/main/settings/shutterspeed
/main/settings/aperture
/main/settings/exposurecompensation
/main/settings/imageformat
/main/settings/focusmode
/main/settings/flashmode
/main/settings/beep
/main/actions/syncdatetime
/main/status/model
/main/status/datetime
/main/status/firmwareversion
/main/status/driver
/main/Driver/list_all_files

It also shows up in Ekos' GUI under '(I18N_EMPTY_MESSAGE)'.

My experience is that firmware versions can behave differently despite the fact that
it is sold as the same camera model. My camera's firmware version is 1.0.1.0.
6 years 3 months ago #11165

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

Time to create page: 0.724 seconds