×

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

Bi-monthly release with minor bug fixes and improvements

Multiple V4L2 CCDs

  • Posts: 1029
  • Thank you received: 301

Multiple V4L2 CCDs was created by Eric

Hello,

As far as I understand, drivers save and load configuration from XML files named after their own driver names.

Is there a way to have two drivers load two different configuration files? As an illustation, I have one CCD on /dev/dmx21 and another on /dev/c210, I'd like two drivers to show up, with respective configurations loaded. I think I could create a second chained INDI server on another user account, but this seems a bit overkill.

If not possible, what would be the best way to implement this in the code? Adding an option to load a XML config and retaining it for saving later on?

Thanks,
-Eric
6 years 10 months ago #16432

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

Replied by Jasem Mutlaq on topic Multiple V4L2 CCDs

For drivers running in INDI server FIFO, you can always pass the configuration file.Alternatively, you can set INDICONFIG environment variable before starting the driver and it will be used to load the config.
6 years 10 months ago #16438

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

  • Posts: 1029
  • Thank you received: 301

Replied by Eric on topic Multiple V4L2 CCDs

OK, understood, that's indilib.org/develop/developer-manual/92-indi-server.html, section 3, for reference:."start -c ".

However if I start two V4L2 CCD drivers, I end up with only one in Ekos, which is duplicating all actions as there are actually two processes listening on the line. Furthermore, the XML configuration file doesn't embed the device path, thus both drivers attempt to control the default file "/dev/video0".

Is there something I can do to improve that? Any ideas that were implemented elsewhere before I dig in?
-Eric
6 years 10 months ago #16447

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

  • Posts: 1029
  • Thank you received: 301

Replied by Eric on topic Multiple V4L2 CCDs

Reference log from the V4L2 CCD driver:
2017-05-01T16:01:49: Failed to start streaming. 
2017-05-01T16:01:49: V4L2 base failed starting capture (VIDIOC_STREAMON error 16, Device or resource busy) 
2017-05-01T16:01:13: World Coordinate System is enabled. CCD rotation must be set either manually or by solving the image before proceeding to capture any frames, otherwise the WCS information may be invalid. 
2017-05-01T16:01:13: World Coordinate System is enabled. CCD rotation must be set either manually or by solving the image before proceeding to capture any frames, otherwise the WCS information may be invalid. 
2017-05-01T16:01:11: Device configuration applied. 
2017-05-01T16:01:11: Upload settings set to client only. 
2017-05-01T16:01:11: Loading device configuration... 
2017-05-01T16:01:11: Device configuration applied. 
2017-05-01T16:01:11: Upload settings set to client only. 
2017-05-01T16:01:11: Loading device configuration... 
2017-05-01T16:01:11: Found intial Input "Camera 1", Format "8-bit Greyscale", Size 640x480, Frame interval 1/30s 
2017-05-01T16:01:11: V4L2 CCD Device is online. Initializing properties. 
2017-05-01T16:01:11: Found intial Input "Camera 1", Format "8-bit Greyscale", Size 640x480, Frame interval 1/30s 
2017-05-01T16:01:11: V4L2 CCD Device is online. Initializing properties.
Two V4L2 CCD drivers start (on /dev/video0) outputting logs in the same console panel, and streaming request fails on one of them, as could be expected.
6 years 10 months ago #16448

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

Replied by Jasem Mutlaq on topic Multiple V4L2 CCDs

Are you renaming each of the CCD driver when starting them? So each has a unique name?
6 years 10 months ago #16462

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

Time to create page: 0.220 seconds