×

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

Bi-monthly release with minor bug fixes and improvements

Device not appearing in Ekos profile editor

  • Posts: 983
  • Thank you received: 375
I have encountered a strange problem while setting up profiles in Ekos with a custom driver, which are not listed in Ekos dropdowns.
XML file for the driver is located in /usr/share/indi and it has proper syntax. The problem does not appear in new installations but pops up in case of updated systems with a new version of the driver. Among a few changes in the driver's binary (connection plugins) the XML was updated to reflect driver's name change i.e.
Before update:
<devGroup group="Auxiliary">
        <device label="AstroHub">
                <driver name="AstroHub">indi_astrohub</driver>
                <version>0.1</version>
        </device>
</devGroup>
After update:
<devGroup group="Auxiliary">
        <device label="Jolo AstroHub">
                <driver name="Jolo AstroHub">indi_jolohub</driver>
                <version>0.2</version>
        </device>
</devGroup>

Installing the driver on new system works OK, it appears on the Ekos list and works as designed.
Installing the driver on a system where previous version was installed results in the drivers does not appear on the Ekos list. This applies also for full removal and reinstallation of INDI/KStars/Ekos BUT removing local configuration files for KStars.
When I manually edit the driver's XML and change the label and name to e.g. "Test Driver" it appears on the Ekos list and works OK. If I reedit this file in the next step and change "Test Driver" to anything else it disappears from the Ekos list.

The above suggests that a driver name is somehow cached by KStars/Ekos (where?) and changing XML label/name for a driver results in kind of conflict between cache and source XML. As the result the driver does not appear on the list.

Now the question is where this cache is sitting so I can purge it.
7 years 1 week ago #16059

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

This is indeed strange as there is no cache for drivers. The recent change in KStars is that it includes by default all INDI drivers so the user can select them in case of remote connection for example without having the enter it manually. But this shouldn't affect how custom drivers are read at all.
7 years 1 week ago #16071

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

  • Posts: 983
  • Thank you received: 375
I will try to trace it down. The only thing that I didn't do was to remove all KStars configuration from user profile. Strange indeed
7 years 1 week ago #16083

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

  • Posts: 270
  • Thank you received: 74
Hi Kaczorek

Glad to see, that I'm not the only one who bothers about this glitch! See my message www.indilib.org/forum/general/4454-what-....html?start=12#46878

Antonio
4 years 3 months ago #47240

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

  • Posts: 270
  • Thank you received: 74
Hi all

The mystery is solved!!

Here an excerpt of "drivermanager.cpp":

937 bool DriverManager::readXMLDrivers()
938 {
939 QDir indiDir;
940 QString driverName;
941
942 // This is the XML file shipped with KStars that contains all supported INDI drivers.
943 /*QString indiDriversXML = KSPaths::locate(QStandardPaths::GenericDataLocation, "indidrivers.xml");
944 if (indiDriversXML.isEmpty() == false)
945 processXMLDriver(indiDriversXML);*/
946 processXMLDriver(QLatin1String(":/indidrivers.xml"));

The line 946 is the crucial point! The file "indidrivers.xml" is a so called resource compiled into the executeable "kstars". This way the content of this file AT COMPILE TIME (!!) is stored directly in the binary file "kstars". You can notice this by the special call convention ":/indirivers.xml". I doubt heavily that this is a good solution: Everytime you create a new 3rdparty-driver, you have to compile also a new "kstars" in order to reflect the new version of the driver. Only if the driver you are working on is NOT listed in "indidrivers.xml" the standalone xml-file of the driver is read in. If this isn't the case you never see the correct version!:pinch:

Strange, that from line 943 to 945 there is a code snippet (commented out) which is reading the up-to-date file. Why was it replaced? Who knows more about this peculiar case?

Sincerely
Antonio
Last edit: 4 years 3 months ago by Toni Schriber.
4 years 3 months ago #47272

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

No that's not a problem. I think the XML file for your driver is not formatted correctly. I created a file /usr/share/indi/indi_foo.xml with the following:
<?xml version="1.0" encoding="UTF-8"?>
<driversList>
<devGroup group="Auxiliary">
        <device label="Jolo AstroHub">
                <driver name="Jolo AstroHub">indi_jolohub</driver>
                <version>0.2</version>
        </device>
</devGroup>
</driversList>

It was detected just fine by Ekos.
Last edit: 4 years 3 months ago by Jasem Mutlaq.
4 years 3 months ago #47282

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

  • Posts: 270
  • Thank you received: 74
Perhaps I am misunderstood: The driver itself IS appearing, but with wrong version number! That was the cumbersomeness when I was tesing the AOK Skywalker driver. Testing a new version Ekos and Drivermanager always showed the old version number!! This is really misleading as I always thought that the new version in not loaded. Until I noticed the problem this thread is all about.

Let's try it:

I changed the version number from '0.9' to '0.92' in both "indi_aok.xml"

<?xml version="1.0" encoding="UTF-8"?>
<driversList>
<devGroup group="Telescopes">
<device label="AOK Skywalker" manufacturer="AOKSwiss/Magnetdrives">
<driver name="LX200 AOK">indi_lx200aok</driver>
<version>0.92</version>
</device>
</devGroup>
</driversList>

and "indidrivers.xml"

snip
<driversList>
<devGroup group="Telescopes">
<device label="AOK Skywalker" manufacturer="AOKSwiss/Magnetdrives">
<driver name="LX200 AOK">indi_lx200aok</driver>
<version>0.92</version>
</device>
</devGroup>
</driversList>
snip

And that is what the driver window shows:


The reason is that the old "indidrivers.xml -resource" is compiled into "kstars" with the old version number! So the changed xml-files are never imported.

Antonio
4 years 3 months ago #47625
Attachments:

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

Time to create page: 0.263 seconds