×

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

Bi-monthly release with minor bug fixes and improvements

How to increase the mount connection's timeout

  • Posts: 54
  • Thank you received: 3
I'm a new user of KStars/Enos/INDI. I have successfully migrated almost everything from my old Mac/VMware/Window8/CartesDuCiel&MaximDL world to the KStars/Ekos/INDI world directly on my Macbook computer. I believe I only have one unresolved issue. The INDI Control Panel for my Takahashi Temma mount correctly identifies my newly purchased Serial-to-USB connector as /dev/cu.usbserial. But, when I try to connect I get a SEND COMMAND: Timeout error. The error appears after only a few seconds. In the past when I've connected to my mount via CartesDuCiel, it takes a good 10 seconds before the connection is established. So, I'm assuming that the only remaining problem is that the "timeout" time limit is too brief. How does one set a longer time interval?
4 years 3 months ago #47393

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

Time out is hard-coded to 5 seconds, which is already longer than the usual 3-sec timeout used by other drivers. It seems odd for a serial response to take that long. You can of course download the source code, change the timeout to 10 and test. Somehow I don't think it's only related to that.
4 years 3 months ago #47416

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

  • Posts: 554
  • Thank you received: 138
Could it be that the driver is sending several serial commands to the mount which correctly time out? Sometimes the only way to tell if a feature is present is to try it once and use a timeout as a signal that it isn't available.
4 years 3 months ago #47419

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

That's a very good point Chris. Perhaps the logs would shed more light on where it gets stuck during the handshake process.
The following user(s) said Thank You: Robert Vanderbei
4 years 3 months ago #47420

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

  • Posts: 54
  • Thank you received: 3
I will go out right now and grab a log of the connection process. I will submit the log shortly.
4 years 3 months ago #47421

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

  • Posts: 54
  • Thank you received: 3
My log file is attached. Many thanks in advanced for looking at this. I'm really hoping to get things working.


File Attachment:

File Name: log_04-55-...2-30.zip
File Size:4 KB
4 years 3 months ago #47424
Attachments:

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

  • Posts: 54
  • Thank you received: 3
Hi Chris. According to the Log that I just posted, I don't see multiple commands being sent to the mount. The driver just sends one initial command, waits 5 seconds and then times out.
4 years 3 months ago #47430

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

It's failing on the initial handshake to get the version number. I suggest you turn "Auto Search" off and try to select the port manually and then connect. I saw a comment inside the code about problems with initial communication, maybe it can be made more bullet proof.
4 years 3 months ago #47431

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

  • Posts: 54
  • Thank you received: 3
Attached is a new Log file. I disabled autoscan and tried to connect to cu.usbserial and I got the same timeout message. I then manually changed cu.usbserial to tty.usbserial and again clicked connect. This time nothing happen. No connection. No error message. Nothing. Had to click the "Stop" button in Ekos. And, when I clicked on "Start" again in Ekos, the autoscan was turned back on. Don't know how to turn it off globally.

File Attachment:

File Name: log_07-22-00.txt.zip
File Size:12 KB
4 years 3 months ago #47440
Attachments:

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

After turning it off, go to Options --> Configuration --> save.

Next step would be for you to download and build the driver yourself. Then maybe you can change the timeout there or tinker more with the driver to get it working under Mac.
4 years 3 months ago #47441

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

  • Posts: 54
  • Thank you received: 3
Ok, I'll be happy to try to tinker with the driver myself. I'm new to this project so let me ask... is there a quick tutorial on how to download and build the driver in a Mac environment?
4 years 3 months ago #47443

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

  • Posts: 54
  • Thank you received: 3
I went to the website
github.com/indilib/indi
to get instructions on how to download and compile indi.

In the "Get the code" section, I chose to grab the full clone (PS. the command shown on that page is wrong... it says "git clone github.com/indilib/indi.github" where it should say it without the ending hub: "git clone github.com/indilib/indi.git").

After the git was complete, I followed the instructions to "Build indi-core". In the last command to "sudo make install", I got an error message that "uint" is not defined. To fix that, I added a single line to the top of the header file indicom.h...
typedef unsigned int uint;
That fixed the compilation issue and the "sudo make install" command successfully built the indi code locally on my machine.

I then searched for the Takahashi Temma part of the code and found the file indi/drivers/telescope/temmadriver.cpp and I discovered the "#define TEMMA_TIMEOUT 5" right near the top of the code. I changed the 5 to 20 and did a recompile.

I did this build in a local folder, not in the folder containing the actual KStars app stuff. So, the next step is to figure out what files need to be updated in the KStars app. My guess is that I just need to update
/Applications/KStars.app/Contents/MacOS/indi/indi_temma_telescope
with the new version of indi_temma_telescope.

I made that one file change and then I fired up KStars, clicked on the Ekos observatory, and clicked on the "start" button. Unfortunately, I then get a pop-up window saying

"INDI Driver Temma Takahashi crashed. Restart it?"

So, I'm guessing that just changing that one file is not enough. It's completely unclear to me what I should do next. I hope you can tell me what I need to do to resolve this last issue. THANKS.
4 years 3 months ago #47454

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

Time to create page: 0.350 seconds