Re: Can I use OnStep to control my telescope from a laptop with stellarium?

Howard Dutton

On Sat, Oct 5, 2019 at 11:55 AM, Khalid Baheyeldin wrote:
On Mon, Sep 30, 2019 at 10:32 AM, Dave Schwartz wrote:

Note that it does not currently work over TCP/IP (WiFi) because Stellarium does not function with the short connection lifetime (after each interaction, OnStep closes the socket). Although Howard said that this was required for resource management on the ESP, Fabien thought this was a bizarre way to operate and had no plans to implement it.
If you look at this file, specifically line 388 and 394, you will find that the WiFi firmware explicitly closes the connection after 2 seconds.
Perhaps this can be changed somehow. One method would be timing out and closing the connection if no command received in, say, X seconds, otherwise keeping it open. X can be 10 seconds in the Config.h, and therefore can be tuned.

This will also solve the INDI problem of not working over TCP.

Not saying that Howard should do this immediately, but that someone tests it first, and prove it to work. After that Howard can merge it in the repo.

Yet it works and has always worked with Sky Safari?

It was originally done this way for the W5100 where hung connections would always lock up sockets over time, this was the one solution I found.  Probably a limitation of the Arduino libraries but I wasn't about to recreate those.  So short socket timeouts were the solution and the rest of the software stack ended up going that way.  Then when WiFi came along, ditto.

Join to automatically receive all group messages.