×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Mirror lock on Canon with serial shutter?

  • 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 4 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 4 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 4 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 4 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!!
7 years 4 months ago #11151

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

  • Posts: 105
  • 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.
7 years 4 months ago #11165

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

Yeah I don't know why this is happening, when the property "list_all_files" is defined, does it contain group="Driver" ? Not sure why Magnus 350D says "Dispatch error"
7 years 4 months ago #11166

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

  • Posts: 643
  • Thank you received: 62
Hi!
My firmware is 1.0.3. Anything I could check with it?

Magnus
7 years 4 months ago #11167

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

  • Posts: 105
  • Thank you received: 23
Hi Jasem,
This is what I find in the output generate by 'indiserver -vvv':

2016-10-28T12:38:57: Client 0: sending msg copy 1 nq 267:
<defSwitchVector device="GPhoto CCD" name="list_all_files" label="list_all_files" group="" state="Idle" perm="rw" rule="OneOfMany" timeout="60" timestamp="2016-10-28T12:38:57">
<defSwitch name="list_all_files0" label="On">
Off
</defSwitch>
<defSwitch name="list_all_files1" label="Off">
On
</defSwitch>
</defSwitchVector>

As you can see the group is an empty string.
Regards,
Camiel
7 years 4 months ago #11234

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

  • Posts: 643
  • Thank you received: 62
Hi!

Back online now after some travel. I updated both my R-Pi and laptop, and now the 350D seems to be able to captue and download an image. Stille some "unexpected message" in the log, pasted here for info. But it seems to work now!

Update:
Mirror lock seems not to work, though. No error messages, but the mirror is not flipped up. Nothing seems to happen until the exposure startes.

Bad idea to paste. Log attached instead
Last edit: 7 years 4 months ago by Magnus Larsson.
7 years 4 months ago #11807
Attachments:

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

Time to create page: 0.808 seconds