×

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

Bi-monthly release with minor bug fixes and improvements

indi_gphoto_ccd and bulb exposures

  • Posts: 26
  • Thank you received: 1
Hi, I've recently discovered Kstars, Ekos and INDI, and the software combo looks fantastic, with some great looking features :) BUT I haven't really got it all working thus far... The main issue is getting my Canon 350D to take exposures longer than 30 seconds. I've got a USB->Serial shutter release cable that I know works from using it on a windows setup (it's based around the RTS line). I cannot for the life of me get the camera to take an exposure using this remote shutter. Every attempt switches the camera from Bulb mode, as displayed on the camera LCD, to a fixed time value e.g. 5". And if the requested exposure time is greater than 30 seconds then that's the maximum value set, even though the other INDI components wait for the requested period to elapse before downloading the image. Once the image is captured the camera LCD goes back to displaying Bulb! I've googled extensively already, and everything I've read about gphoto suggests that this camera model should be supported... I'm using kstars-bleeding, INDI 0.9.7 and gphoto2 2.5.2-0ubuntu1.

** Additional Info **
When I run gphoto2 --list-ports I get over 30 entries returned. There are a load of ttyS* ones, and then 2 usb ones, one for the camera and one for the usb->serial device. The serial device is reported as usb:003,001 (or something similar, I'm going from memory atm). Now the thing I'm uncertain of is how I should set the Remote Shutter value in the indi_gphoto_ccd options tab. I've tried usb:003,001 as well as /dev/ttyUSB0, but I'm not sure that will work as it's not one of the values returned by the --list-ports query. If I can just get the camera to take long exposures I really think this software combination will be great for running my observatory :)

Any advice would be very gratefully received!!!

Thanks.
Last edit: 10 years 2 weeks ago by Guy. Reason: Corrections
10 years 2 weeks ago #731

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

  • Posts: 26
  • Thank you received: 1
Right then, so I've found the source code for this driver, and running the indi server up in a terminal window has allowed me to discover that this message is being reported:

Not what I wanted to see :( Looking at the gphoto_driver.c file it appears that this if condition is evaluating to true, and therefore means that bulb exposure isn't available.
if ((! gphoto->bulb_port[0] && ! gphoto->bulb_widget) ||
    (idx = find_bulb_exposure(gphoto, gphoto->exposure_widget)) == -1)

Perhaps I am not understanding the GPhoto CCD - Main Control tab? This tab has a "Shutter Release" property for a "Port" value. I took this to be the serial port used to externally control the shutter, as the old 350D doesn't support bulb exposures via usb, but am I wrong to think this?

Running indiserver with -vv and the driver with full debug logs doesn't appear to show the message "looking for bulb exposure.." so I don't think find_bulb_exposure() is being called, so I think the issue is due to one or both of the properties on the gphoto object. Jasem, could you explain to me how this works please? Perhaps I am just not understanding...

Thanks,

Guy.
10 years 2 weeks ago #735

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

Debug was not enabled in the low level gphoto driver, so now if you go to the Options tab in INDI Control Panel, and enable debug, all the gphoto driver debugging messages should be displayed in the terminal. Can you update and recompile the driver and test again? It does look indeed the port is used for external shutter control as indicated, so I'm not sure what the issue is exactly. Hopefully with full debugging enable, we can gain a clue.
10 years 2 weeks ago #736

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

  • Posts: 26
  • Thank you received: 1
Many thanks, I'll update the code and try to build it when I get home from work this evening. Fingers crossed it will shed some light on what is happening :)
10 years 2 weeks ago #737

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

  • Posts: 26
  • Thank you received: 1
I was just working on getting the code and figuring out how to build it when the software updater told me that the indi-gphoto package had an update available :) Thanks for that!

So, using this update does indeed output a bit more information... On connection I see the following log entries

So far so good. But when I try to initiate a long exposure I see this output to the logs

So that shows that find_bulb_exposure() is being called, but it is failing to return a valid index value. So what might cause that? Looking at the code for gphoto_start_exposure() I can see that gphoto->exposure_widget must be valid as that is checked right at the start of the method. So the issue is nested away in this block of code within find_bulb_exposure() (I think...)
for (i = 0; i < widget->choice_cnt; i++) {
	if (gphoto->exposure[i] == -1) {
	   	gp_dprintf("bulb exposure found! id:%u\n",i);
		return i;
	}
}

So that makes me think that perhaps parse_shutterspeed() isn't returning -1???
10 years 2 weeks ago #741

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

  • Posts: 26
  • Thank you received: 1
w00t! :D

Using the high-tech debugging technique of many gp_dprintf() calls I've managed to track down the issue... It was indeed in the parse_shutterspeed() method, in particular the
strncmp(choices[i], "bulb", 4)
bit. It would appear that my 350D returns the value "Bulb" as a possible value, and strncmp appears to be case sensitive. I'm not sure if there's a case insensitive option of that available or not? But for now I've changed my local build to test for "bulb" and "Bulb" in the if statement in question (line #322)
if ( (strncmp(choices[i], "Bulb", 4) == 0) || (strncmp(choices[i], "bulb", 4) == 0) || (strcmp(choices[i], "65535/65535") == 0))
The following user(s) said Thank You: Jasem Mutlaq
Last edit: 10 years 2 weeks ago by Guy. Reason: Rogue italics
10 years 2 weeks ago #744

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

Great! Thanks for finding the issue. I updated the code so that it checks for bulb in a case insensitive way. Can you please discard your changes and update and see if that works?
The following user(s) said Thank You: Guy
10 years 2 weeks ago #745

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

  • Posts: 26
  • Thank you received: 1
Funny that you should mention discarding my changes and updating... I've never done Linux development before, so I was going to ask you about reverting from a local custom build back to the packages from your repository. What's the best way to do that? Is it simply just a case of just using the software updater tool, or do I need to run a make clean or some such?

Thank you for your help with this issue, I can't wait for a clear night now to try this out in anger :D
10 years 2 weeks ago #747

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

  • Posts: 26
  • Thank you received: 1
I've reverted my code changes and updated to your latest code and the shutter release is working. Well with one slight caveat, and I noticed this behaviour with my initial code change, so it's a more general thing than specifically to do with this fix... When I first power on the camera the shutter is actuated and an exposure starts. I assume this is to do with the initial state of the RTS line when the usb->serial device is connected. I then have to press the shutter button to end that exposure. Then when I connect up to INDI/Ekos the first attempt at an exposure fails to work correctly. The software goes through the motions, but the bulb shutter release doesn't fire. To get the software to stop waiting for the image I have to manually press the shutter button on the camera. The following is output to the log output:

Once that first confused attempt is done then the shutter release starts to work as expected. So I assume it's some initial state that's confusing the driver.
10 years 2 weeks ago #749

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

  • Posts: 55
  • Thank you received: 1
Hello,
I dont know if the issue is releted to this one but I remember I tested successufully my Canon 1100D dslr as CCD on Ekos and, above all, the possibility to set a number of pics with a long exposure time and a delay time between every pic. Tonight, after some updates, I tried again but it works only if I set exposure time to 1 sec otherwise the sequence starts with a shot and never ends. I wonder if I am the only one who experienced this behaviour: I set 10 pics of 15 sec of exposure with a delay of 5 but the first shot never ends and I have to switchoff my camera.
Thanks in advance for your support.
Giovanni
10 years 2 weeks ago #750

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

  • Posts: 643
  • Thank you received: 62
Samtheeagle,

What is the status with your 350D? I just recently started trying with my old 350D, that is astro-modded, so I have a keen interest in making it work. I am waiting or a serial-usb-device to land in my postbox next week.

Magnus
8 years 3 weeks ago #7171

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

Time to create page: 1.217 seconds