×

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
@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.

  • Posts: 7
  • Thank you received: 0
I actually tested it. What i have done was downloaded it from your fork. And installed it afterwards. On my virtual machine and on the raspberry pi. But I have not found any new options for the ISO Setting.

I have already opened an issue about the problem on github: github.com/indilib/indi/issues/173

If I should try something else just tell me or if you need remote access to an raspberry pi with atached camera - i think that would be manageable.
Last edit: 7 years 1 month ago by Dominik Laa.
7 years 1 month ago #15148

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

  • Posts: 226
  • Thank you received: 88
Are the Menu items listed in the driver capabilities as you show in your preceding post ?
They should be there as 'Integer Menu items'.
7 years 1 month ago #15158

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

  • Posts: 7
  • Thank you received: 0
Yes they are.
iso_sensitivity (intmenu): min=0 max=4 default=0 value=0
                                0: 0 (0x0)
                                1: 100000 (0x186a0)
                                2: 200000 (0x30d40)
                                3: 400000 (0x61a80)
                                4: 800000 (0xc3500)
           iso_sensitivity_auto (menu)   : min=0 max=1 default=1 value=1
                                0: Manual
                                1: Auto

I also attached there KStars Log-File.
7 years 1 month ago #15163
Attachments:

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

Time to create page: 1.215 seconds