Building INDI Tutorials

INDI Library currently ships with seven tutorials in the examples subdirectory. To build the tutorials, first install some pre-requisties on Ubuntu:

sudo apt-get install cdbs libcfitsio-dev libnova-dev libusb-1.0-0-dev libjpeg-dev libusb-dev libtiff5-dev libftdi-dev fxload libkrb5-dev libcurl4-gnutls-dev libraw-dev libgphoto2-dev libgsl0-dev dkms libboost-regex-dev libgps-dev libdc1394-22-dev

Then checkout INDI Library code from Github and build it:

mkdir ~/Projects
cd ~/Projects
git clone
mkdir -p build/libindi
cd build/libindi
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ~/Projects/indi/libindi
sudo make install

To run tutorial one for example, simply run:

indiserver -v examples/tutorial_one/tutorial_one

This will create an INDI server running tutorial one driver on port 7624 (by default) on the local machine. You can connect to the INDI server using any INDI compatible client such as KStars. If you are using KStars, perform the following steps:

    1. Select the Device Manager menu item from the Tools menu
    2. Select the client tab and add a new host

    3. Click Connect in the device manager to connect to INDI server running Tutorial One
    4. Client Connect/Disconnect to test tutorial one simple functionality in INDI Control Panel
    5. The INDI Library tutorials cover some of the basic aspects of INDI, namely:
Tutorial Driver Description
One Simple Device The most simple INDI driver. The tutorial covers what is required to build and run a minimal INDI driver.
Two Simple Telescope Implementation of a simple telescope driver using INDI event-driven framework
Three Simple CCD Implementation of a simple CCD driver that sends a randomly generated image to the client as FITS.
Four Skeleton Demonstration on how to utilize INDI's skeleton files to build driver properties externally.
Five Rain and Dome Demonstration of INDI Snooping functionality that enables inter-driver communication.
Six Client Application Implmentation of a simple client application that can connect to the Simple CCD driver and controls its temperature.
Seven Advanced Telescope Simulator Sample implementation of a telescope driver that utilizes INDI's Alignment Subsystem Infrastructure

In this short tutorial, our client (tutorial_client) needs connect to an INDI server which may be running several drivers. However, we only need to receive information regarding the "CCD Simulator" driver. Once received, we try to set the temperature to -20 C. In order to establish a client, we need to subclass INDI::BaseClient and extend it as necessary.

Client Tutorial Header

class MyClient : public INDI::BaseClient
    void setTemperature();
    virtual void newDevice(INDI::BaseDevice *dp);
    virtual void removeDevice(INDI::BaseDevice *dp) {}
    virtual void newProperty(INDI::Property *property);
    virtual void removeProperty(INDI::Property *property) {}
    virtual void newBLOB(IBLOB *bp) {}
    virtual void newSwitch(ISwitchVectorProperty *svp) {}
    virtual void newNumber(INumberVectorProperty *nvp);
    virtual void newMessage(INDI::BaseDevice *dp, int messageID);
    virtual void newText(ITextVectorProperty *tvp) {}
    virtual void newLight(ILightVectorProperty *lvp) {}
    virtual void serverConnected() {}
    virtual void serverDisconnected(int exit_code) {}
   INDI::BaseDevice * ccd_simulator;

In this tutorial we will create the most basic INDI driver: a simple device! The simple device performs no functions, it just connects and disconnects.

All INDI devices inherit from INDI::DefaultDevice. Some specialized classes like INDI::Telescope also inherits from INDI::DefaultDevice and specific telescope drivers then inherit from INDI::Telescope.

Let's checkout the header file for Simple Device, which is included in the INDI Library package

#include "indibase/defaultdevice.h"

class SimpleDevice : public INDI::DefaultDevice

    bool Connect();
    bool Disconnect();
    const char *getDefaultName();



3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!