×

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

Bi-monthly release with minor bug fixes and improvements

CCD driver problems

Replied by Jasem Mutlaq on topic CCD driver problems

Sounds like "429496.7295s" is too specific, I don't suppose this is all for Nikon cameras that supports bulb mode? At any rate, I applied the patch now, so if you can 'svn up' and test again I'd appreciate it.

I'll add vertical scroll support to KStars INDI Control Panel.
10 years 3 months ago #389

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

  • Posts: 21
  • Thank you received: 2

Replied by beyond on topic CCD driver problems

I have tested bulb mode a bit more and it now looks more complicated. The patch recognizes bulb mode is supported but I have now found the camera is not being put in bulb mode.

The camera does not accept setting shutterspeed to 429496.7295s, ie
gphoto2 --set-config shutterspeed=52 returns an error (looks like a camera or ghoto2 issue)

I found a second shutterspeed2 config entry that does work
gphoto2 --set-config shutterspeed2=52
$ gphoto2 --get-config shutterspeed2
Label: Shutter Speed 2                                                         
Type: RADIO
Current: 6
Choice: 0 1/4000
Choice: 1 1/3200
Choice: 2 1/2500
...
Choice: 49 20
Choice: 50 25
Choice: 51 30
Choice: 52 65535/65535

Suspect you may want to revert the update to gphoto_driver.c. I will do some more testing and post the results...
10 years 3 months ago #390

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

Replied by Jasem Mutlaq on topic CCD driver problems


So turns out that 1196444237 is V4L2_PIX_FMT_MJPEG, so I added support for that to libindi just now. I'm not sure if it works obviously without anyway to test it here, but in principle it should, can be please test and let me know how it goes?

This added a new dependency for libindi which is libjpeg-dev. I avoid adding any dependencies as much as I can, but there is no way to avoid this, plus libjpeg-dev is quite common.
The following user(s) said Thank You: beyond
10 years 3 months ago #407

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

  • Posts: 21
  • Thank you received: 2

Replied by beyond on topic CCD driver problems

Thanks knro, video streaming and still capture are both working with my webcam in vbox now. It seems vbox is also restricting the available controls from host webcam. From vbox:
$ v4l2-ctl --list-ctrls-menus
                     brightness (int)    : min=0 max=100 step=1 default=50 value=50
From physical:
$ v4l2-ctl --list-ctrls-menus
                     brightness (int)    : min=30 max=255 step=1 default=133 value=133
                       contrast (int)    : min=0 max=10 step=1 default=5 value=5
                     saturation (int)    : min=0 max=200 step=1 default=83 value=83
 white_balance_temperature_auto (bool)   : default=1 value=1
           power_line_frequency (menu)   : min=0 max=2 default=2 value=2
                                0: Disabled
                                1: 50 Hz
                                2: 60 Hz
      white_balance_temperature (int)    : min=2800 max=10000 step=1 default=4500 value=4500 flags=inactive
                      sharpness (int)    : min=0 max=50 step=1 default=25 value=25
         backlight_compensation (int)    : min=0 max=10 step=1 default=0 value=0
                  exposure_auto (menu)   : min=0 max=3 default=1 value=3
                                1: Manual Mode
                                3: Aperture Priority Mode
              exposure_absolute (int)    : min=5 max=20000 step=1 default=156 value=156 flags=inactive
                   pan_absolute (int)    : min=-201600 max=201600 step=3600 default=0 value=0
                  tilt_absolute (int)    : min=-201600 max=201600 step=3600 default=0 value=0
                 focus_absolute (int)    : min=0 max=40 step=1 default=0 value=0 flags=inactive
                     focus_auto (bool)   : default=0 value=1
                  zoom_absolute (int)    : min=0 max=10 step=1 default=0 value=0
I will give it a try on vmware player...

I managed to get my dslr working with libgphoto2 stand-alone for bulb and non-bulb mode, now attempting to patch into the gphoto_driver code.
I am not sure how well I can integrate it... is it best to do it more as an add-on for the experts to look at or have a go myself?
10 years 3 months ago #413

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

Replied by Jasem Mutlaq on topic CCD driver problems

If you can supply the stand-alone libgphoto2, I can try integrating it into the driver code and then I'll have to ask to you test it out to verify.
10 years 3 months ago #417

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

  • Posts: 21
  • Thank you received: 2

Replied by beyond on topic CCD driver problems

Attached patch for gphoto_driver.c seems reasonably stable for bulb and non-bulb mode with my DSLR
The updates were not as major as I expected...
1. errordumper signature does not match spec in my <gphoto2/gphoto2-port-log.h> and was causing seg flts with debug flag enabled
2. new gphoto_set_config method that retries five times (with 500mS sleep) if camera busy response for widget set
-this resolves a lot of the "Driver indi_gphoto_ccd: restart #<n>" errors I was having
3. bulb mode exposure setting for my DSLR is "65535/65535" and needs to be set with "shutterspeed2" widget
4. timeleft < 0 check in stop_bulb causes a tight loop for a millisecond or so at 0 when timeout expires
5. replaced loop adding bulb_end overflow seconds to div/remainder calc
6. don't print "eosremoterelease" message if widget not found
I am still getting the occasional "Driver indi_gphoto_ccd: restart #<n>" which requires restart of INDI to resolve.
10 years 3 months ago #426
Attachments:

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

Replied by Jasem Mutlaq on topic CCD driver problems

Thanks, patch applied. I tested it and can't get any restarts (crashes). If you're willing to take this one step further, you can debug the driver and send me the backtrace so we know where the problem is.
$ gdb
$ file indiserver
$ set folllow-fork-mode child
$ start -v -m 100 indi_gphoto_ccd

You can then connect to it as client from KStars. If you get "temporary break point" in GDB, just press C and it will continue. If it catches a crash, just type bt to get the backtrace.
Last edit: 10 years 3 months ago by Jasem Mutlaq.
10 years 3 months ago #429

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

  • Posts: 21
  • Thank you received: 2

Replied by beyond on topic CCD driver problems

Thanks knro, I connected to debugger via Device Manager Client and did some test exposures from the INDI Control Panel with no restarts. Is there a way to access it from Ekos?

I also realized that I set 500 microsecs rather than 500 millisecs for the camera busy delay, which may be the reason for the occasional restarted I had seen previously.
10 years 3 months ago #435

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

Replied by Jasem Mutlaq on topic CCD driver problems

To test debugging, it is best to do it as suggested above. I also changed to delay to 500 ms now. I guess you can use the camera in Ekos now normally until you face a problem :-)
10 years 3 months ago #437

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

Time to create page: 0.792 seconds