×

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

Bi-monthly release with minor bug fixes and improvements

Can't change ISO of indi_v4l2_ccd device in EKOS

  • Posts: 5
  • Thank you received: 0
Hi,

first of all a great thanks for making life much easier with indilib and EKOS! It's amazing how quickly one can set up telescope automation with it.

I connected an old Meade ETX90 w/ Autostar to a Raspbery Pi 2 with built in PiCamera v2 and soldered on alt/IMU chip - and everything got recognized nearly without any trouble.

Now for the testing I used a distant clocktower @daylight and everything went well, video-wise. (grayscale, full chip, but with 2x2 binning)

But at the first night test I saw that the light collection of the chip is too low, even with 10s exposure - the max value for the PiCamera.

So I tried to increase binning to the max value of 4x4, but that didn't seem to change anything.

Next step was to increase the ISO value. But - the ISO pulldown in EKOS is greyed out / disabled. (see screenshot)



In the "V4L2 Options" tab there is a "ISO Setting" [ Manual | Auto ], which was set default to "Auto". I tried "Manual" as well (with restart of indiserver inbetween). But the problem remains: The ISO-dropdown in the Capture tab is always disabled.

Does anyone has a suggestion / idea / solution, how to change the ISO setting?
(Or how to get more image signal any other way - software-/driver-wise)


Thanx in advance!
7 years 1 month ago #14832
Attachments:

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

The ISO settings in Ekos is for DSLR cameras. Not sure about V4L2. You can set it from the INDI Control Panel, does it have any effect on your results?
7 years 1 month ago #14852

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

  • Posts: 486
  • Thank you received: 87
By reading the docs it looks that the PiCamera has 3 mode settings/ports, (Still/Video/Preview):

picamera.readthedocs.io/en/release-1.10/fov.html#camera-modes

picamera.readthedocs.io/en/latest/fov.html#sensor-modes

I found this reference:
"The still port is used by the various capture() methods when their use_video_port parameter is False (which it is by default)."

You should verify this paramater.
I searched the most recent docs about this, only found this ones.
Maybe it's being detected in Video mode and ISO is only available is Still Capture mode?
Does the INDI driver have any option to change this? Just my 2 cents...
Last edit: 7 years 1 month ago by nMAC.
7 years 1 month ago #14853

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

  • Posts: 5
  • Thank you received: 0
@knro:

I have no way to access the INDI Control Panel in EKOS. In the settings there seems to be only options for a local INDI instance.
As my INDI server runs on a headless RasPi and EKOS/KStars on my laptop, I'll have to enter a remote connection, as I do in the EKOS-Settings.

For ISO capability of the v4l2 driver:
You can change the ISO from the RasPi commandline:

v4l2-ctl --set-ctrl=iso_sensitivity_auto=0,iso_sensitivity=XX

with XX being a valid value for the device. check valid values with:
v4l2-ctl --all |grep iso
(each increase in value doubles the ISO)

I changed mine to 4 (which should be 800 or 1600, documentation is unclear about if 0 or 1 is ISO100) and took daytime images.
The higher ISO resulted in a grainier picture (so far so good), but overall it didn't seem to be any brighter (As it is with a "normal" digital camera, when you increase the ISO). Maybe some internal driver foo reduced exposure time or such.

I have no clue about the internals of the indi_v4l2_ccd driver, if or how requests like "change iso" or "change exposure time" are handled. If there is an API documentation, I haven't found it yet.


@nmac:
The default port is the video port. But somewhere I've read, EKOS switches to the still port for "Capture" mode. Not sure. If it doesn't, it would be really bad - the lowest possible video-framerate for the PiCamera is 1/s. So there would be no way to do a 10sec exposure... :-/
Last edit: 7 years 1 month ago by sasax.
7 years 1 month ago #14861

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

What do you mean you have no access? You posted a screenshot of INDI Control Panel in your first post. The INDI V4L2 driver does not have an ISO property, these are generated from the device via the V4L2 properties the driver receives when it first connects to the camera. Upon first connection and if you turn debug on, you'll see all the properties listed from V4L2.
7 years 1 month ago #14863

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

  • Posts: 5
  • Thank you received: 0
Ah - I thought that window is the EKOS detailed panel. I just didn't read the windows' title. Sorry for the mixup. I meant in the KStars Settings -> INDI section I can only enter local indiserver.

Ok, that there is no ISO setting in the panel I posted, I know. There is only the switch for "ISO Setting Auto" [Auto | Manual]. Changing that gets reflected in the iso_sensitivity_auto value of v4l2-ctl.
v4l2-ctl --all |grep iso

So somehow the command gets piped from the settings page through indi to the v4l2 driver.

But this should also be possible for changing the actual ISO value, as this is just another v4l2-ctl call. It just doesn't seem to be exposed to the frontend...

Btw - How do I turn on debugging? Do you mean starting indiserver with -vv option?
Last edit: 7 years 1 month ago by sasax.
7 years 1 month ago #14865

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

Check my signature on logging HOWTO
7 years 1 month ago #14874

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

  • Posts: 5
  • Thank you received: 0
(Upon trying to view the how-to-turn-on-logging video I just got the massage "unknown mime type")

Anyhow - when I start indiserver with debugoption, in the beginning is a list which seems to me like the capabilities-list you spoke of.
Actually I've looked at it before and thats where I got the idea from, that not all driver capabilities are exposed to the GUI. Because here is not only the ISO-Automode listed, but also the ISO setting as well:



But without menu items.
"Control ISO Sensitivity" corresponds to iso_sensitivity
"Control ISO Sensitivity, Auto" corresponds to iso_sensitivity_auto

The latter gets its 2 values (0/1=Manual/Auto) listed as menu items, the former just sits there without a list of possible values.

UPDATE:
A quick glance at the man page for v4l2-ctl got me the -L parameter ("Display all controls and their menus [VIDIOC_QUERYMENU].").

After listing the detailed driver capabilities I think I might have found whats wrong:



Here the iso_sensitivity gets a full menu listing. But unlike most of the other options, this one is of type intmenu , while the majority of the others are of type menu.
The same can be said about auto_exposure_bias, which also is of type intmenu and doesnt get menulisted in indiserver/debug as well.

So whoever made the implementation of the indi_v4l2_ccd may have just regexed' for /[a-z0-9_]+ \(menu/ instead of /[a-z0-9_]+ \([int]*?menu/ ?

Just an idea...

UPDATE 2:
I attached the INDI/EKOS logfile and the indiserver debug output below.
Last edit: 7 years 1 month ago by sasax. Reason: found the sourcecode meanwhile
7 years 1 month ago #14877
Attachments:

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

  • Posts: 5
  • Thank you received: 0
Ah - my guess was right: In the file libindi/libs/webcam/v4l2_base.cpp there is a commented out part, whos purpose seems to be targeting also the intmenu controls when getting the "normal" menu controls. Function V4L2_Base::enumerate_ctrl(), line 1722:
if ((queryctrl.type == V4L2_CTRL_TYPE_MENU))//|| (queryctrl.type == V4L2_CTRL_TYPE_INTEGER_MENU)) // not in < 3.5

What does "// not in < 3.5" mean and is this being curently developed or an artefact of a dead end try? (There are several commented out lines regarding the intmenu stuff in this file...)

Just asking - as I saw, that you (Jasem) wrote that file and comitted in January the last edit. My C/C++ coding skills are quite rusty (like 20+ years ago rusty), but I could give it a try, if you don't have the time for it?
7 years 1 month ago #14902

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

Sure try to fix this issue if you can and submit a pull-request. Just make sure it doesn't break anything else in the driver!
7 years 1 month ago #14904

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

  • Posts: 7
  • Thank you received: 0
3.5 might be the Version. I have found it right here: linuxtv.org/downloads/v4l-dvb-apis/uapi/...ml#v4l2-in-linux-3-5

I don't know anything about C++ oder C Programming so I don't think I can fix the problem either.
7 years 1 month ago #15131

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

  • Posts: 226
  • Thank you received: 88
Hi,
I've added some support for integer menus in v4l2, but was unable to test it as I don't have a device with integer menus.
May you test it with your setup before I ask for a pull request ?
The code is in my i fork repository , only the libindi/libs/webcam/v4l2_base.cpp has been modified.
Thanks,
Jean-Luc.
The following user(s) said Thank You: Dominik Laa
7 years 1 month ago #15146

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

Time to create page: 1.343 seconds