×

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

Bi-monthly release with minor bug fixes and improvements

CCD driver problems

  • Posts: 21
  • Thank you received: 2

CCD driver problems was created by beyond

I have been using PHD guiding with Microsoft webcam and gphoto2 with Nikon DSLR but am not able to get either working with INDI.
The webcam works with mplayer tv://. With INDI the FITS viewer shows a few lines at the top of image and a shaded bar through middle. Same static image for video stream. Format selection issue?
The DSLR works with gphoto2 --capture-image-and-download. With INDI the only apparent action is the Ekos log shows "Failed to set binning." with no shutter release from DSLR. The DSLR details are being populated in the status tab of the INDI control panel
I have tried indi-full apt packages on fresh kubuntu 13.10. I was not able to install kstars-bleeding as apt-get reports an unmet dependency with libqjson, but I have tried the Ekos VM image with same result.
I have also tried a few INDI device settings options but not seeing any changes.
Any suggestions to debug where the problem is?
Thanks, Mark
10 years 3 months ago #348

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

Replied by Jasem Mutlaq on topic CCD driver problems


Possibly, I have Logitech & Creative webcams and both work with INDI. Do you get any error messages in the INDI Control Panel?

Again, any error messages displayed at all? Please check INDI Control Panel and also the Server Log (in the Devices Manager)

Yes there was a problem with the kstars-bleeding package and is now fixed. Please do a 'sudo apt-get update' and then 'sudo apt-get install kstars-bleeding'
10 years 3 months ago #349

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,

Have now successfully installed kstars-bleeding, but same issues with my webcam and DSLR.

For the webcam the v4l device manager server log (attached) shows "pixel format; 1196444237 UNSUPPORTED".
But fswebcam reports same format is supported:
src_v4l2_set_pix_format,541: Device offers the following V4L2 pixel formats:
src_v4l2_set_pix_format,554: 0: [0x47504A4D] 'MJPG' (MJPEG)

For the DSLR the gphoto log shows "XML error: Line 16: Bogus leading attr name char: '" and "XML read: terylevel'>" - is this a config error? Log also seems to show driver restarting several times...

I am not seeing any errors on the INDI Control Panel.
For v4l driver there is an entry each time I click Preview from Ekos
2013-12-24T08:55:42: Capture of ONE frame (1 stacked frames) took 0.428793 seconds.

For gphoto driver there is no entry when I click Preview from Ekos. Ekos give "2013-12-24T19:55:08 Capturing image..." and Progress spinner runs indefinitely.

Please let me know if there are any further suggestions...

Cheers, Mark
10 years 3 months ago #350
Attachments:

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

Replied by Jasem Mutlaq on topic CCD driver problems

There might be quite a few pixel formats supported by V4L2, but INDI V4L2 driver supports 4 most common:
V4L2_PIX_FMT_YUV420
V4L2_PIX_FMT_YUYV
V4L2_PIX_FMT_RGB24
V4L2_PIX_FMT_SBGGR8

Do you know what is the V4L2 format used by your webcam?

Regarding the GPhoto driver, I have a suspicion that some of the camera text properties contains either single or double quotes and this breaks the XML. Is there any property of the camera that ends with erryLevel (perhaps batteryLevel)?
10 years 3 months ago #355

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

Replied by Jasem Mutlaq on topic CCD driver problems

Btw, I tried the GPhoto driver today as well on Cannon 30D and it works flawlessly!
10 years 3 months ago #356

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

My DSLR has an orientation property that has values like 90' and 270'.
Attached patch for indidriver.c changes quotes, etc on switch vector property label to html/xml escape sequences.
The GPhoto driver now captures and downloads images okay with patch applied to indidriver.c, but is not setting exposure time...

For V4L driver it seems VirtualBox is only allowing enabling/allowing MJPEG pix fmt from host webcam, as it works okay on a physical machine. 'v4l2-ctl --list-formats' output confirms vbox only has MJPEG, but physical server has YUYV as well)
Has anyone got the V4L driver working on VM?
Last edit: 10 years 3 months ago by beyond. Reason: Retry attachment as txt file
10 years 3 months ago #372
Attachments:

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

Replied by Jasem Mutlaq on topic CCD driver problems

can you attach the patch please?
10 years 3 months ago #373

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

Patch file now attached to previous post as .txt file.
10 years 3 months ago #374

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

Replied by Jasem Mutlaq on topic CCD driver problems

Thanks! I applied a slightly different patch and I think it should resolve the XML character issues not being escaped properly in labels at least.
10 years 2 months ago #375

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 checked out latest libindi and 3rdparty from svn and rebuilt but not working for me. I am getting same error as before:

XML error: Line 16: Bogus leading attr name char: '
2013-12-29T12:19:41: Driver indi_gphoto_ccd: XML read: terylevel'>

I don't understand the code too well, but my thinking is the xml escapes should be part of xml marshal/unmarshal rather than getting into the application data model.

Update:
Making some progress... capture and download works with small patch, and the exposure time is now being set correctly!
--- indidriver.c        2013-12-29 06:50:14.673736000 +0000
+++ indidriver.c       2013-12-29 12:41:16.340970285 +0000
@@ -1458,7 +1458,9 @@
             ISwitch *sp = &s->sp[i];
             printf ("  <defSwitch\n");
             printf ("    name='%s'\n", sp->name);
-            printf ("    label='%s'>\n", sp->label);
+            char *escapedXML = escapeXML(sp->label);
+            printf ("    label='%s'>\n", escapedXML);
+            free(escapedXML);
             printf ("      %s\n", sstateStr(sp->s));
             printf ("  </defSwitch>\n");
         }
Last edit: 10 years 2 months ago by beyond. Reason: See update
10 years 2 months ago #376

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

Replied by Jasem Mutlaq on topic CCD driver problems

Ok, let me update the code to include @ IDSetXXX instead of IUFill.

EDIT: Actually, nevermind I found the problem is that GPhoto driver was not using IUFillSwitch when new switches are created. At any rate, this is now fixed in the code. The reason I kept it in the application data is just to keep processing overhead as low as possible since this is only done once when the property is created.
Last edit: 10 years 2 months ago by Jasem Mutlaq.
10 years 2 months ago #377

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, working well for non-bulb exposures.

Bulb using external shutter release also works with following patch
--- gphoto_driver.c     2013-12-19 05:06:29.275890000 +0000
+++ gphoto_driver.c     2013-12-30 14:54:36.644634231 +0000
@@ -292,12 +292,14 @@
                return NULL;
        exposure = calloc(sizeof(double), count);
        for(i = 0; i <  count; i++) {
-               if (sscanf(choices[i], "%d/%d", &num, &denom) == 2) {
+               if (strncmp(choices[i], "bulb", 4) == 0) {
+                       exposure[i] = -1;
+               } else if (strncmp(choices[i], "429496.7295s", 4) == 0) {
+                       exposure[i] = -1;
+               } else if (sscanf(choices[i], "%d/%d", &num, &denom) == 2) {
                        exposure[i] = 1.0 * num / (double)denom;
                } else if ((val = strtod(choices[i], NULL))) {
                        exposure[i] = val;
-               } else if (strncmp(choices[i], "bulb", 4) == 0) {
-                       exposure[i] = -1;
                } else {
                        // unknown
                        exposure[i] = -2;

ghoto2 reports bulb mode for my Nikon DSLR as
$ gphoto2 --get-config shutterspeed
Label: Shutter Speed                                                           
Type: RADIO
Current: 4.0000s
Choice: 0 0.0002s
Choice: 1 0.0003s
...
Choice: 50 25.0000s
Choice: 51 30.0000s
Choice: 52 429496.7295s

One issue is the long list of capture and other settings means INDI Control Panel window gets to long/high to fit on the screen. Is it an option to add a vertical scroll bar?
10 years 2 months ago #387

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

Time to create page: 0.738 seconds