×

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

wow it's great you got this far! So you can start the server externally without sudo make install

./indiserver -v ./indi_temma_telescope ./indi_simulator_ccd

Then in Ekos, create a "Remote" profile, and select Temma and CCD drivers then save profile and connect. It will connect to the server you started and you can now test.
4 years 3 months ago #47458

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

  • Posts: 54
  • Thank you received: 3
Aha. Thanks. I'm at the office. I will head home now and give it a try. I'm hoping this gets everything working. :-)
4 years 3 months ago #47459

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

  • Posts: 54
  • Thank you received: 3
I assume I'm supposed to do that from within the folder containing the new version. Right?
Just now I tried that and I'm getting the following error message...

2019-12-30T19:32:25: startup: ./indiserver -v ./indi_temma_telescope ./indi_simulator_ccd
2019-12-30T19:32:25: Driver ./indi_temma_telescope: pid=47664 rfd=3 wfd=6 efd=7
2019-12-30T19:32:25: Driver ./indi_simulator_ccd: pid=47665 rfd=4 wfd=9 efd=10
2019-12-30T19:32:25: listening to port 7624 on fd 5
2019-12-30T19:32:25: Driver ./indi_simulator_ccd: dyld: Library not loaded: @rpath/libindidriver.1.dylib
2019-12-30T19:32:25: Driver ./indi_simulator_ccd: Referenced from: /Users/rvdb/tmp/usr/bin/././indi_simulator_ccd
2019-12-30T19:32:25: Driver ./indi_simulator_ccd: Reason: image not found
2019-12-30T19:32:25: Driver ./indi_temma_telescope: dyld: Library not loaded: @rpath/libindidriver.1.dylib
2019-12-30T19:32:25: Driver ./indi_temma_telescope: Referenced from: /Users/rvdb/tmp/usr/bin/././indi_temma_telescope
2019-12-30T19:32:25: Driver ./indi_temma_telescope: Reason: image not found
2019-12-30T19:32:25: Driver ./indi_simulator_ccd: stderr EOF
Child process 47665 died
2019-12-30T19:32:25: Driver ./indi_simulator_ccd: restart #1
Child process 47664 died
2019-12-30T19:32:25: Driver ./indi_simulator_ccd: pid=47666 rfd=0 wfd=9 efd=10
2019-12-30T19:32:25: Driver ./indi_temma_telescope: stderr EOF
2019-12-30T19:32:25: Driver ./indi_temma_telescope: restart #1
2019-12-30T19:32:25: Driver ./indi_temma_telescope: pid=47667 rfd=3 wfd=7 efd=8
2019-12-30T19:32:25: Driver ./indi_simulator_ccd: dyld: Library not loaded: @rpath/libindidriver.1.dylib
2019-12-30T19:32:25: Driver ./indi_simulator_ccd: Referenced from: /Users/rvdb/tmp/usr/bin/././indi_simulator_ccd
2019-12-30T19:32:25: Driver ./indi_simulator_ccd: Reason: image not found
Child process 47666 died
2019-12-30T19:32:25: Driver ./indi_simulator_ccd: stderr EOF
4 years 3 months ago #47460

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

  • Posts: 54
  • Thank you received: 3
I added...
export LD_LIBRARY_PATH="/Applications/KStars.app/Contents/Frameworks"
to my .bash_profile and that fixed the @rpath problem. Now I'm getting a different error...

.
.
2019-12-30T20:35:02: Driver ./indi_temma_telescope: restart #10
2019-12-30T20:35:02: Driver ./indi_temma_telescope: pid=48654 rfd=3 wfd=7 efd=8
2019-12-30T20:35:02: Driver ./indi_simulator_ccd: snooping on Telescope Simulator.EQUATORIAL_EOD_COORD
2019-12-30T20:35:02: Driver ./indi_simulator_ccd: snooping on Telescope Simulator.TELESCOPE_INFO
2019-12-30T20:35:02: Driver ./indi_simulator_ccd: snooping on Telescope Simulator.GEOGRAPHIC_COORD
2019-12-30T20:35:02: Driver ./indi_simulator_ccd: snooping on Focuser Simulator.ABS_ROTATOR_ANGLE
2019-12-30T20:35:02: Driver ./indi_simulator_ccd: snooping on CCD Simulator.FILTER_SLOT
2019-12-30T20:35:02: Driver ./indi_simulator_ccd: snooping on CCD Simulator.FILTER_NAME
2019-12-30T20:35:02: Driver ./indi_simulator_ccd: snooping on SQM.SKY_QUALITY
Child process 48653 died
2019-12-30T20:35:02: Driver ./indi_simulator_ccd: stderr EOF
2019-12-30T20:35:02: Driver ./indi_simulator_ccd: Terminated after #10 restarts.
2019-12-30T20:35:02: Driver ./indi_temma_telescope: snooping on GPS Simulator.GEOGRAPHIC_COORD
2019-12-30T20:35:02: Driver ./indi_temma_telescope: snooping on GPS Simulator.TIME_UTC
2019-12-30T20:35:02: Driver ./indi_temma_telescope: snooping on Dome Simulator.DOME_PARK
2019-12-30T20:35:02: Driver ./indi_temma_telescope: snooping on Dome Simulator.DOME_SHUTTER
Child process 48654 died
2019-12-30T20:35:02: Driver ./indi_temma_telescope: stderr EOF
2019-12-30T20:35:02: Driver ./indi_temma_telescope: Terminated after #10 restarts.
2019-12-30T20:35:02: good bye
4 years 3 months ago #47463

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

  • Posts: 54
  • Thank you received: 3
I have resolved the issues I was having yesterday. I can now edit/compile/run the code in "Remote" mode. I changed the TEMMA_TIMEOUT to 20 seconds hoping this would fix my connection failures. Sadly, it didn't fix things. I'm still getting the timeout failure . Attached is the current log file. It doesn't seem to provide any details as to why it's failing (at least not to my eyes). I guess it's time for me to actually look at the details of the driver code and see if I can figure out why my Takahashi NJP mount isn't responding.

File Attachment:

File Name: log_08-33-29.txt.zip
File Size:5 KB
The following user(s) said Thank You: Jasem Mutlaq
4 years 3 months ago #47482
Attachments:

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

Thank you for the detailed investigation. It is as I suspected not a timeout issue. Maybe you can start by checking against another system like Raspberry PI? or a Linux PC? This way you can start eliminating software/hardware elements as you go through them.
4 years 3 months ago #47488

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

  • Posts: 54
  • Thank you received: 3
I've now learned that the timeout takes place in the tty_timeout function in indicom.c. The specific line of code is:

retval = select(fd + 1, &readout, NULL, NULL, &tv);

The variables readout and tv are local variables. So, the only outside input to the function is the first parameter: fd + 1.
Using fprintf I'm able to determine that fd = 3.
And, it gets this value from the parameter PortFD in temmadriver.cpp. I don't know where PortFD gets set to 3.
Is that the correct value?
If no, what needs to be changed to correct it?
If yes, does that mean my cu.usbserial connection is at fault?
4 years 3 months ago #47489

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

  • Posts: 54
  • Thank you received: 3
Unfortunately, I don't have a Raspberry PI or a Linux PC do experiment with (although I could borrow something from someone in the new year).

But, on my Mac I have VMware with Windows8. Just now I attached my newly purchased Serial-to-USB adapter to my Takahashi Temma mount within the Windows8 environment and fired up Cartes du Ciel. I am able to connect and control the mount with Cartes du Ciel.

So, I'm confident that there is no hardware issue. It is at some level a software issue. It could be that the Serial-to-USB driver that I downloaded from the BestBuy website isn't working correctly on my Mac. But, the analogous software that's automatically downloaded on the Win8 side is working fine. Also, the driver does appear in /dev so it seems like all is okay with respect to the driver. That just leaves me looking at the INDI software. So, I'm still thinking that the problem is somehow related to PortFD being set to 3. Any recommendation on what I should try next?
4 years 3 months ago #47494

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

  • Posts: 2877
  • Thank you received: 812
Hi,

Sorry I meant to respond sooner, but it is the holidays and I was on a trip. It sounds like you made great progress! In terms of getting set up to develop INDI or KStars code on a Mac computer, I developed a repo with scripts and instructions to get it all set up. github.com/rlancaste/kstars-on-osx-craft Hopefully this will help you. It sounds like you are just interested in editing INDI though, not KStars as well? My script builds everything from scratch and then optionally prepares a DMG for distributing it all and optionally sets up a development environment for editing the code. That might be overkill for what you are trying to do right now. I might want to make an option that doesn't require building everything, so that someone can get set up to just try a quick change like you wanted to do.

In terms of the first issue you ran into, I would say your main problem was having the driver find the dylibs as you identified. When a driver gets built, it has to link to the dylibs and when it runs, it has to find them based on that link. Your solution was to "export LD_LIBRARY_PATH=/Applications/KStars.app/Contents/Frameworks". You did that before building INDI I assume? That will work as long as you don't move KStars and as long as all the libraries that you need are present in that frameworks folder.

The solution that I use in the distributed INDI drivers in the DMG is to define the libraries' ID's and links as an RPATH and then at runtime, they get the RPATH so they can find the libraries. This does require a couple of extra steps however, so might not be desirable for your application.

Do you have homebrew or craft installed on your computer? Either one of these could be used to get set up to edit INDI code without any dylib issues. Then when you built the software, it would point to the libraries in the homebrew or the craft directory respectively. This is the way I typically will edit INDI code, using either homebrew or craft.

But your solution does give me an idea, for folks who want to just edit something quick in INDI, it might be nice to have a version of the script that would let you use the already existing frameworks instead of building everything from scratch. Let me think about that.

In terms of the second issue, the uint issue you ran into. I ran into the same problem the other day when building the KStars 3.3.9 DMG. Apparently somebody made an INDI change that OS X didn't like. I addressed this as soon as I found it, but I think that was before you ran into the issue. It should be fine now.

As for the real issues you are looking into, the timeout and Serial to USB adapter, it sounds like you have made some great progress. For the Serial to USB adapter, often times you have to install some driver from the manufacturer, you said you did this from the Best Buy website for the Mac driver? I would recommend going to the manufacturer's website instead. Also, maybe try the Serial to USB adapter with another device to test it?

Thanks,

Rob
4 years 3 months ago #47497

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

  • Posts: 54
  • Thank you received: 3
Hi Rob,

Welcome back from your holiday trip!

Mostly I've been following what I was able to learn from the online documentation together with some help from Jasem. It was Jasem who showed me how to run indi outside of KStars/Ekos. At the moment, I'm happy with that because I can use fprintf(stderr,...) to print stuff that I then see on the Terminal window. But, once the connection issue is resolved I will definitely want to access everything directly from KStars/Ekos. So, at the moment the only remaining issue is that my mount is not being recognized. I downloaded the driver twice. Once from the BestBuy website and once from the Insignia website. They are identical. And, a few hours ago I used the new Serial-to-USB adapter in my VMware/Win8/CartesDuCiel environment and it worked fine there. I guess a next step might be to try using a different serial device on the Mac side of my Macbook Pro. I don't have any such device but maybe can borrow one from one of my colleagues after they get back in the new year. I really really really want to get this working as KStars/Ekos/Indi seem like a great way to play with my astro gear.
4 years 3 months ago #47498

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

  • Posts: 54
  • Thank you received: 3
PS. So, I really think that the next thing I should try is to change the fd value from its current value of 3 to some other integer value. I'm thinking maybe I'll try 7 first because on my VMware/Win8 environment it defaults to COM3 but is then discovered at COM7. If 7 doesn't work, then I'll try 1, then 2, then 4, then ... :-)
4 years 3 months ago #47499

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

The PortFD value is correct. If that was the issue, nothing would connect to any serial device in INDI.

Standard Input --> 0
Standard Output --> 1
Standard Error --> 2

So the next available file descriptor is 3. I was going to suggest to install the FTDI drivers, but you already did. So next I would suggest you use minicom or whatever serial communication software that can be used under MacOS and use it to communicate directory with the mount. Maybe your mount uses a different baud rate? or maybe it could be something else entirely. So check with a serial tty software and see if you receive any response from the mount.
4 years 3 months ago #47502

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

Time to create page: 0.304 seconds