INDI support on Windows?

678 views
Skip to first unread message

Jasem Mutlaq

unread,
Jul 10, 2017, 2:47:11 PM7/10/17
to Open PHD Guiding
I downloaded PHD2 for Windows but found it was lacking INDI support. Since connection to INDI is done via TCP/IP, why isn't it supported on Windows (and perhaps Mac?)

Andy Galasso

unread,
Jul 10, 2017, 4:12:54 PM7/10/17
to Open PHD Guiding
Hello Jasem,

There is no good reason for the lack of INDI support on Windows other than the lack of developer effort (and little interest expressed by users.)

Mac support for INDI is in progress and will be coming soon  :)

Andy

Hans

unread,
Jul 10, 2017, 4:17:46 PM7/10/17
to Open PHD Guiding
Hi Jasem,


On Monday, July 10, 2017 at 8:47:11 PM UTC+2, Jasem Mutlaq wrote:
I downloaded PHD2 for Windows but found it was lacking INDI support. Since connection to INDI is done via TCP/IP, why isn't it supported on Windows (and perhaps Mac?)

We actually have two tickets open for that :

we should probably replace the Linux INDI support with a new one that works on all 3 platforms.


-- Hans

bw_msgboard

unread,
Jul 10, 2017, 11:24:51 PM7/10/17
to Jasem Mutlaq, Open PHD Guiding

Hi Jasem.  I think I see the value of having an on-the-wire protocol like INDI, but could you describe the use-case you have for the Windows platform?  Are you using or writing some collection of astronomy applications that can take advantage of INDI?  I’d just like to understand this better.

 

Thanks,

Bruce

 


--
You received this message because you are subscribed to the Google Groups "Open PHD Guiding" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-phd-guidi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jasem Mutlaq

unread,
Jul 11, 2017, 5:29:20 AM7/11/17
to Bruce Waddington, Open PHD Guiding
Hi Bruce,

Sure, there are many INDI-compatible applications under Windows. KStars & Ekos are supported under Windows, and there is an option to use external guiding applications like PHD2. If INDI is running on a remote computer (say Raspberry PI), then you can do imaging with Ekos under Windows, and still get to use PHD2 for guiding. This is the exact scenario that a user reported just yesterday and this is why I brought up the issue as I expected PHD2 to support INDI on all platforms.

Thanks for the great work!!

Regards,
Jasem


On Tue, Jul 11, 2017 at 6:24 AM, bw_msgboard <bw_m...@earthlink.net> wrote:

Hi Jasem.  I think I see the value of having an on-the-wire protocol like INDI, but could you describe the use-case you have for the Windows platform?  Are you using or writing some collection of astronomy applications that can take advantage of INDI?  I’d just like to understand this better.

 

Thanks,

Bruce

 

From: open-phd-guiding@googlegroups.com [mailto:open-phd-guiding@googlegroups.com] On Behalf Of Jasem Mutlaq
Sent: Monday, July 10, 2017 11:47 AM
To: Open PHD Guiding
Subject: [open-phd-guiding] INDI support on Windows?

 

I downloaded PHD2 for Windows but found it was lacking INDI support. Since connection to INDI is done via TCP/IP, why isn't it supported on Windows (and perhaps Mac?)

 

--
You received this message because you are subscribed to the Google Groups "Open PHD Guiding" group.

To unsubscribe from this group and stop receiving emails from it, send an email to open-phd-guiding+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.




--
Best Regards,
Jasem Mutlaq

Patrick Chevalley

unread,
Jul 11, 2017, 8:19:48 AM7/11/17
to Open PHD Guiding, bw_m...@earthlink.net
Hi Jasem,

Do you have instruction to build only the client from libindi?

For PHD2 we not need to build the server or the drivers and this can simplify the process.

Patrick


Jasem Mutlaq

unread,
Jul 11, 2017, 8:30:20 AM7/11/17
to Patrick Chevalley, Open PHD Guiding, Bruce Waddington
Hi Patrick,

It's possible, but currently, the multi-platform client in INDI depends on Qt which is not ideal for many apps. Will see if we can get a standard C++ multi-platform client going and let you kow.

Regards,
Jasem


--
You received this message because you are subscribed to a topic in the Google Groups "Open PHD Guiding" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/open-phd-guiding/ayJSAxB7dv4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to open-phd-guiding+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Patrick Chevalley

unread,
Jul 11, 2017, 10:37:55 AM7/11/17
to Open PHD Guiding, p...@ap-i.net, bw_m...@earthlink.net
Sorry Jasem I was not clear enough.

We already have a Wxwidget INDI client GUI in PHD2 so this part is OK.

What I want is to build only the base client without GUI.
The PHD2 camera and scope interface use only indiproperty.h, basedevice.h and baseclient.h

Is there some cmake option to compile only this files or do we need to make our own cmakelists?
This can greatly simplify the compilation on Windows by removing most of the external requirements.

Patrick

bw_msgboard

unread,
Jul 11, 2017, 11:15:47 AM7/11/17
to Jasem Mutlaq, Open PHD Guiding

Thanks, Jasem, I’ll try to take a look at those apps – I wasn’t aware of them.

 

Bruce

 


Jasem Mutlaq

unread,
Jul 11, 2017, 11:48:56 AM7/11/17
to Patrick Chevalley, Open PHD Guiding, Bruce Waddington
Hi Patrick,

There is no GUI in INDI, you probably meant INDI client without server and drivers..etc.

It is possible, but problem is that the baseclient.[h,cpp] code is not cross-platform. First it was about using pthreads so I made it use std::thread, but then now there is UNIX networking code in there that doesn't work on Windows. I am now researching any light weight cross-platform networking libraries that we can use as a drop-in replacement. This is why it was easier just to use Qt back then. If you have any suggestions please let me know, you are well aware of the INDI code base.

Regards,
Jasem


--
You received this message because you are subscribed to a topic in the Google Groups "Open PHD Guiding" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/open-phd-guiding/ayJSAxB7dv4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to open-phd-guiding+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jasem Mutlaq

unread,
Jul 11, 2017, 11:49:49 AM7/11/17
to Bruce Waddington, Open PHD Guiding
On Tue, Jul 11, 2017 at 6:15 PM, bw_msgboard <bw_m...@earthlink.net> wrote:

Thanks, Jasem, I’ll try to take a look at those apps – I wasn’t aware of them.


Here is a list of all INDI clients: http://www.indilib.org/about/clients.html

Patrick Chevalley

unread,
Jul 11, 2017, 12:57:35 PM7/11/17
to Open PHD Guiding, p...@ap-i.net, bw_m...@earthlink.net
Thank you Jasem, I understand the problem now, and looking at the code make all clear.

I always forget that Windows do not include some standard socket, so you make baseclientqt to use a cross platform socket from QtNetwork.

Then for PHD2 we have two choices:

1- add Qt dependency to PHD2 for QtNetwork and probably a few runtime dll.

2- write a baseclientwx to use a WxSocket instead. This as the advantage to not require a new framework.

Patrick

Andy Galasso

unread,
Jul 11, 2017, 2:19:46 PM7/11/17
to Open PHD Guiding
On Tue, Jul 11, 2017 at 12:57 PM, Patrick Chevalley <p...@ap-i.net> wrote:

I always forget that Windows do not include some standard socket, so you make baseclientqt to use a cross platform socket from QtNetwork.

Then for PHD2 we have two choices:

1- add Qt dependency to PHD2 for QtNetwork and probably a few runtime dll.

2- write a baseclientwx to use a WxSocket instead. This as the advantage to not require a new framework.


A third option would be to just deal with the WinSock / BSD socket differences directly in the baseclient code, or make your own very thin socket layer to abstract the differences. The differences are not that big and you can take care of them with a bit of conditional compilation (https://stackoverflow.com/questions/28027937/cross-platform-sockets) I have worked with code bases that take this approach and it is really not that bad.

Having a self-contained INDI client lib without dependencies on Qt or wx would make it easier and more appealing for client apps to integrate INDI.  This could really streamline adoption of INDI.

Andy

Jasem Mutlaq

unread,
Jul 11, 2017, 3:36:02 PM7/11/17
to Andy Galasso, Open PHD Guiding
Right this is what I'm working on right now. It's not as straight forward since it's a threaded implementation and you have to deal with platform-dependent differences. At any rate, this is the goal now so we'll see how it goes.

Regards,
Jasem


--
You received this message because you are subscribed to a topic in the Google Groups "Open PHD Guiding" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/open-phd-guiding/ayJSAxB7dv4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to open-phd-guiding+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jasem Mutlaq

unread,
Jul 11, 2017, 5:57:17 PM7/11/17
to Andy Galasso, Open PHD Guiding
Ok, so I have a preliminary working INDI client library for Windows. I tested it under KStars for Windows and it appears OK thus far. Under Windows, you can compile INDI with these flags:

-DINDI_BUILD_SERVER=OFF -DINDI_BUILD_DRIVERS=OFF -DINDI_BUILD_CLIENT=ON -DINDI_BUILD_QT5_CLIENT=OFF


and it should build the ANSI Base Client static library. INDI depends on libnova and cfitsio, but I believe PHD2 also uses these libraries.


Regards,

Jasem


Andy Galasso

unread,
Jul 11, 2017, 6:09:02 PM7/11/17
to Open PHD Guiding
Excellent, I see the commits on github, we'll give it a try, thanks.

PHD2 already depends on cfitsio, but libnova will be a new dependency (not a problem).

Andy Galasso

unread,
Jul 18, 2017, 4:01:06 AM7/18/17
to Open PHD Guiding
INDI support for Windows and Mac is now available in PHD2 2.6.3dev7.

Here's a screen shot from a Mac.  The camera image is from a ZWO ASI 120MM connected in PHD2 through the CloudMakers INDI Server running on the Mac.

 

And here is PHD2 on Windows connected over the network to the same INDI server on the Mac, with the camera still plugged-in to the Mac, but the images being delivered to PHD2 running on Windows.



As you can see, this opens up lots of possibilities for accessing gear in various combinations across different PCs.  For example, you could use the Windows INDI Server to connect to an ASCOM device on a Windows PC, then access that device in PHD2 on your Mac or Linux PC via INDI.

A side benefit of this work is that there is now an INDI client library for Windows that can be used to add INDI support to other Windows imaging apps.

Many thanks to Jasem and the other INDI developers!

Andy

Jasem Mutlaq

unread,
Jul 18, 2017, 12:06:14 PM7/18/17
to Open PHD Guiding
Great work Andy! Thanks for fixing INDI client issues on Windows, now we finally have one standard library for all major platforms! I'll share this with the rest of the community.

--
You received this message because you are subscribed to a topic in the Google Groups "Open PHD Guiding" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/open-phd-guiding/ayJSAxB7dv4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to open-phd-guiding+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Patrick Chevalley

unread,
Jul 18, 2017, 4:27:58 PM7/18/17
to Open PHD Guiding
Tonight I tested it for real and all work fine, congratulation Andy!

The setup:
- Linux laptop with INDI server and drivers (DMK CCD and EQMod)  connected to the HEQ5 and DMK21 by usb.
- Windows 10 desktop running PHD2 with wifi connection to the linux laptop.

No problem at all to configure and connect the INDI devices. Then calibration and guiding run smoothly.

Patrick

Andy Galasso

unread,
Jul 18, 2017, 4:48:39 PM7/18/17
to Open PHD Guiding
Very cool! Thanks for the feedback.

GrantB

unread,
Aug 19, 2017, 12:53:29 AM8/19/17
to Open PHD Guiding, bw_m...@earthlink.net
Hi Jasem,

I have installed INDI and kstars under Windows but I cannot get PHD2 guiding to run as an external guider. I keep getting messages saying it cannot connect and to check host name and port. Any idea what it is after and where do I add it?

The mount simulator and ccd camera connections work fine.

Thanks Grant


On Tuesday, 11 July 2017 17:29:20 UTC+8, Jasem Mutlaq wrote:
Hi Bruce,

Sure, there are many INDI-compatible applications under Windows. KStars & Ekos are supported under Windows, and there is an option to use external guiding applications like PHD2. If INDI is running on a remote computer (say Raspberry PI), then you can do imaging with Ekos under Windows, and still get to use PHD2 for guiding. This is the exact scenario that a user reported just yesterday and this is why I brought up the issue as I expected PHD2 to support INDI on all platforms.

Thanks for the great work!!

Regards,
Jasem

On Tue, Jul 11, 2017 at 6:24 AM, bw_msgboard <bw_m...@earthlink.net> wrote:

Hi Jasem.  I think I see the value of having an on-the-wire protocol like INDI, but could you describe the use-case you have for the Windows platform?  Are you using or writing some collection of astronomy applications that can take advantage of INDI?  I’d just like to understand this better.

 

Thanks,

Bruce

 

From: open-phd...@googlegroups.com [mailto:open-phd...@googlegroups.com] On Behalf Of Jasem Mutlaq
Sent: Monday, July 10, 2017 11:47 AM
To: Open PHD Guiding
Subject: [open-phd-guiding] INDI support on Windows?

 

I downloaded PHD2 for Windows but found it was lacking INDI support. Since connection to INDI is done via TCP/IP, why isn't it supported on Windows (and perhaps Mac?)

 

--
You received this message because you are subscribed to the Google Groups "Open PHD Guiding" group.

To unsubscribe from this group and stop receiving emails from it, send an email to open-phd-guidi...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

Ken Self

unread,
Aug 19, 2017, 7:28:19 AM8/19/17
to Open PHD Guiding, bw_m...@earthlink.net
This is fixed in Kstars 2.8.1 just released. I had the same issue and Jasem fixed it right away. In your EKOS profile you can set remote PHD guiding and enter the host details.

Jasem Mutlaq

unread,
Aug 19, 2017, 8:20:12 AM8/19/17
to Ken Self, Open PHD Guiding, Bruce Waddington
I just tested it and it works with 2.8.1. However, two issues:

1. If I select "On Camera", I still get "Failed to connect to: mount" from PHD2. If I specify the mount as the CCD Simulator (or Telescope Simulator) it works fine. It should be able to work with "On Camera".
2. When I disconnect INDI, PHD2 crashes. I'm using latest dev release but apparently there is no debug symbols?

Regards,
Jasem


--
You received this message because you are subscribed to a topic in the Google Groups "Open PHD Guiding" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/open-phd-guiding/ayJSAxB7dv4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to open-phd-guiding+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Patrick Chevalley

unread,
Aug 19, 2017, 12:19:47 PM8/19/17
to Open PHD Guiding, ken.k...@gmail.com, bw_m...@earthlink.net
Jasem,

I tested "on camera" with the indi ccd simulator and for me it work, tested with phd2 2.6.3dev7 on both linux and windows. I can even calibrate and guide if I snoop to the telescope simulator to get the gsc stars.

I confirm the crash if we disconnect the camera from indi or stop the indiserver.
The reason is probably because it call Disconnect() when processing the newswitch event. We may need to queue the event and call Disconnect() later as if we press the button in phd2.

Patrick

Andy Galasso

unread,
Aug 19, 2017, 4:03:17 PM8/19/17
to Open PHD Guiding
Jasem, thanks for the report.  I was able to reproduce both issues, though sometimes I was able to use On-camera, not sure why only sometimes. New items added to the issue tracker, # 625 and 626.
Andy

Reply all
Reply to author
Forward
0 new messages