×

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

Bi-monthly release with minor bug fixes and improvements

Getting started with client development

  • Posts: 94
  • Thank you received: 8
I'm exploring creating a cross platform INDI client with only a subset of INDI's capabilities. I've looked through the docs a bit but could still use a little help getting started.

I would like to build a client (in C++) that will run on Linux, Windows, Android, macOS and iOS. I already have an app supporting these platforms and would like to add basic INDI support to it. It wasn't clear to me if the INDI makefiles are set up to build client libraries for all those targets. I believe there are already INDI clients on those platforms so I assume this is possible.

Is there a list of what libraries (INDI and other) are needed for client development? I looked at the libraries for KStars but surely the bulk of this are not needed for a simple client.

Initially I will be doing development mainly on macOS I realize I will eventually have to compile on the some of the other platforms I want to support.

I appreciate any pointers or tips you can give. If there is a document that described this process, I'd appreciate a link to it.

Bill
1 year 4 months ago #88581

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

  • Posts: 94
  • Thank you received: 8
I have made some progress. I was able to get all the dependencies installed and build on macOS. I was not able to do the "sudo make install" though. This is because it is trying to install in /usr/include and /usr/share. Apple has eliminated these directories starting back on Catalina (I think). Instead they seem to be using /usr/local/include and /usr/local/share instead. You literally cannot create /usr/include or /usr/share without disabling the SIP security.

Is there some way to configure the build to install in the /usr/local/ directories?

In the meantime, I have had luck running the server directly from the build directory. I can start the server (with a different port) and connect to it from Ekos. This is not ideal though and would like to get a proper installation.

Another question is about the drivers. I am using a Losmandy mount. In KStars/Ekos, I have been choosing the lx200gemini driver. However, it seems this driver is not built by default when using the build instructions. I see a couple of lx200XXX drivers compiled, but not the gemini one. How can I get this?

Anyway, making slow progress in figuring this out.

Thanks for any help.
Bill
1 year 4 months ago #88632

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

  • Posts: 94
  • Thank you received: 8
How strange. By looking at the drivers in KStars, I see that the indi_lx200gemini driver is just a symbolic link to the indi_lx200generic driver. If I make this link manually in the "build" directory, it does seem to work properly. Interestingly, I get a slightly different set of properties in the Ekos Control Panel if I star the server with the "gemini" driver as opposed to the "generic" one even though they are the same executable. Is the driver looking at the executable name and behaving differently depending on whether it is "generic" as opposed to "gemini"?

There is also the question of why I didn't get these symlink automatically created. Is this done during the "install" phase rather than the "build" phase? Since I can't install, that would explain it.
1 year 4 months ago #88634

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

  • Posts: 315
  • Thank you received: 42
I was curious about that too, looked at it for the AP driver:
There is _one_ binary installed, lx200generic, for all LX200 drivers.
The variant's binaries (including ap_experimental) are links to that one indi_lx200generic.
When the requested driver image invokes the linked indi_LX200_generic executable the original
specific driver name is passed in. The main function will fetch from std args the binary name
and In lx200Generic:ISInit() it creates a new instance of LX200AstroPhysicsExperimental.
The implementation is running within the generic binary.

For example:

else if (strstr(me, "indi_lx200ap_experimental"))
{
IDLog("initializing from Astrophysics Experimental device...\n");

if (telescope.get() == nullptr)
telescope.reset(new LX200AstroPhysicsExperimental());
}
\

INDI::BaseDevice
^
INDI::DefaultDevice
^
Telescope GuiderInterface (libs/indibase/inditelescope.h / libs/indibase/indiguiderinterface.h)
^ ^
LX200Telescope includes lx200driver (getCommandSexa etc) in generic and library?
^
LX200Generic
^
LX200AstroPhysicsExperimental includes lx200ap_experimentaldriver
1 year 4 months ago #88658

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

  • Posts: 351
  • Thank you received: 109
You can change install destination by passing "-DCMAKE_INSTALL_PREFIX=/some/other/path" or not running make install but "cmake --install . --prefix /some/other/path"
Last edit: 1 year 4 months ago by nou.
1 year 4 months ago #88665

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

  • Posts: 94
  • Thank you received: 8
Excellent! My brain must have passed over the DCMAKE_INSTALL_PREFIX in the ReadMe build instructions. Passing /usr/local seems to fit things.

Thanks so much.

I'm still stuck on how to build the client library for all the various platforms. Is this straightforward?
1 year 4 months ago #88671

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

Client library is built already when you build libindi, you just need to link with it. Pawel Soja made major improvements recently to INDI client library and you can see the example to get started.
1 year 4 months ago #88680

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

  • Posts: 94
  • Thank you received: 8
Yes, I realize that the client library is built for the platform you are building on. I have that working on macOS now. My question is how one gets the client library for iOS and Android. One does not "build" INDI on either of those two platforms.

If there is not a target for the client library for those two platforms, how do you develop a client for them?

Thanks,
Bill
1 year 4 months ago #88700

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

Time to create page: 0.401 seconds