Welcome, Guest
Username: Password: Remember me
27 Feb 2017
INDI development team is happy to announce the release of INDI Library v1.4.0. This new exciting release builds on the maturity of INDI Library and comes with many new supported devices and fixes for existing drivers. Several improvements and enhancements are included in this release including native support for Cygwin and MacOS platforms in addition to Linux, BSD, and Windows (Client only).
Read More...
  • Page:
  • 1

TOPIC: Connecting to a TCP/IP telescope

Connecting to a TCP/IP telescope 4 months 6 days ago #15529

Hi all,
So, I'm new to INDI, and I haven't used C++ for 30 years! Yes, giving away my age.....
My lifetime (seems like anyway) project is SiTechExe.exe, a windows/ascom telescope program that controls our brushed and brushless servo controllers (sidereal technology).

Ok, it's about time, lots of our customers want an INDI driver.
Here's where I am right now:

I've got QTCreator working, and compiling a new telescope called SiTechScope, or something. I based it on the telescope_simulator. It's working with KStars as a simulator, now I just need the driver to communicate with our SiTechExe software, instead of just simulating a telescope.

SiTechExe is a TCP server, and you can send it text, for instance, if you send (in my case)
TO: 192.168.51.51::1952
THIS: "GoTo 12.123 45.456"
Then SiTechExe will move the scope to that RA and Dec. You can also sync, park, track satellites, track comets, and many other things, as well as reading status of the mount.

So, I was looking at baseclient, and it seems to be specific for connecting to an INDI server, not to a hardware device (in this case another piece of software).
So, does this mean I should start from scratch using C++ library socket routines? This seems daunting, especially to keep it from blocking, for instance, I need another process?
Any ideas would be helpful.

The second question, In KStars, I'm able to set the IP address and port number for the telescope. How do I access these from my telescope driver?

I'm sure I'll have 3rd, 4th, and nth questions!

Thanks a million!
Dan Gray

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

Connecting to a TCP/IP telescope 4 months 6 days ago #15530

  • oleg
  • oleg's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ubuntu Astronomy
  • Posts: 252
  • Karma: 2
  • Thank you received: 67

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

You can try my open project Ubuntu Astronomy
Last Edit: by oleg.

Connecting to a TCP/IP telescope 4 months 6 days ago #15538

Hi Dan,

This should be fairly straight forward to implement. Just make sure you are using the _latest_ INDI Library from Github (fork INDI and make modification to your fork) as it recently added connection plugins which would make this trivial. So you do not need to use baseclient at all, these are meant for INDI client applications and not drivers.

You can see the source code for all telescope drivers so this would make it easy. I suggest you look at paramount.[cpp,h] driver since it is also TCP based. If you started from Telescope Simulator, you basically need to do the following:

1. Remove Connect() and add Handshake()
2. In the construction, call setTelescopeConnection(CONNECTION_TCP);

After Handshake() is called in your driver, you have access to PortFD which then you can use any write/read function to write and get data. Again look at paramount for an example. Let me know if you have any additional questions.

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

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?

Connecting to a TCP/IP telescope 4 months 6 days ago #15540

Thanks Oleg, very helpful stuff.

Jasem, this paramount.cpp and h is exactly what I needed, thanks a lot!
Dan

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

  • Page:
  • 1
Time to create page: 0.143 seconds

Login

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!

Gallery

Replica

Why INDI

Replica