×

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

Bi-monthly release with minor bug fixes and improvements

Bug in LX200 Basic driver on macOS [SOLVED]

  • Posts: 1957
  • Thank you received: 420
Hi Wolfgang,

Thanks for the super fast follow up. What I do is this:

- Go to the device manager in KStars (under Tools) and connect to LX200 Basic via TCP/IP.
- At that moment the RA and DEC are correct.
- Slew to an object.
- From that moment on RA and DEC are swapped. This can be seen in the device control panel. If you enter a RA/DEC combination and click the Set button, you can see in the same screen that they get set correctly and then get swapped after a few seconds.


HTH, Wouter
6 months 1 week ago #96632

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

  • Posts: 1187
  • Thank you received: 370
Wouter, I checked the LXBasic driver with my Avalon mount. At least with this combination it works correct, it does not show the effect yo are describing.

Are you 100% sure that the error is not somewhere in your mount firmware?

Wolfgang
6 months 1 week ago #96635

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

  • Posts: 1957
  • Thank you received: 420

Like I wrote, the code works fine with SkySafari and AstroPlanner but of course that doesn't rule out that there is an issue with my code. Perhaps the format of the RA and DEC strings that are sent by my code is incorrect. Would it be possible for you to capture those strings from your mount and post them here so I can compare with my code? I'll send examples of output from my code as soon as I get access to my MacBook.


Thanks, Wouter
6 months 1 week ago #96637

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

  • Posts: 1957
  • Thank you received: 420
OK, here we go. When INDI sends a slew command, it sends the following commands:

2023-10-22 19:55:47,034:DEBUG:LX200Mount:Read command line: 'Sr14:16:44#'
2023-10-22 19:55:47,034:DEBUG:Lx200CommandResponder:Setting RA to 14:16:44
2023-10-22 19:55:47,034:DEBUG:LX200Mount:Read command line: 'Sd+19*03:56#'
2023-10-22 19:55:47,034:DEBUG:Lx200CommandResponder:Setting DEC to +19*03:56
2023-10-22 19:55:47,034:DEBUG:LX200Mount:Read command line: 'MS#'
2023-10-22 19:55:47,035:DEBUG:Lx200CommandResponder:Slewing to RaDec (14:16:44, +19*03:56).

So it first sends an Sr command with the RA and then an Sd command with the DEC. Finally it sends an MS command that initiates the slew. Before that, my code sends the following RA and DEC strings, to indicate that the telescope is at AZ 0.0 and ALT 0.0:

2023-10-22 19:55:45,945:DEBUG:Lx200CommandResponder:ra_str='07:43:51.18'
2023-10-22 19:55:45,953:DEBUG:Lx200CommandResponder:dec_str="49*16'37.50"

The telescope is correctly displayed on the northern horizon. As soon as the MS command is received, the telescope code starts slewing to the position of, in this case, Arcturus and sends these strings:

2023-10-22 19:55:47,982:DEBUG:Lx200CommandResponder:ra_str='07:56:56.31'
2023-10-22 19:55:48,986:DEBUG:Lx200CommandResponder:ra_str='08:51:5.20'
2023-10-22 19:55:48,993:DEBUG:Lx200CommandResponder:dec_str="57*26'6.05"
2023-10-22 19:55:49,997:DEBUG:Lx200CommandResponder:ra_str='10:22:29.87'
2023-10-22 19:55:50,006:DEBUG:Lx200CommandResponder:dec_str="60*35'29.43"

And there I see the cause of the issue. Apparently the ra_str reply is sent twice. My guess is that this is a timing issue with two consecutive commands being received to request the telescope RA but I'll dig into my code to make sure that it is not an issue on my side.


Wouter
6 months 1 week ago #96638

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

  • Posts: 1957
  • Thank you received: 420
I enabled command logging in my code and found that indeed a duplicate GR command is sent by INDI. I added some code to ignore duplicate commands and now it works in KStars and Cartes du Ciel. I think there may be some timing issue or some other problem in INDI causing a duplicate GR command to be sent. No idea why it works with the Avalon Mount though!

I will keep ignoring duplicate commands in my code so it works well with INDI.

Thanks for helping me get to the bottom of this, Wolfgang!


Wouter
6 months 1 week ago #96639

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

  • Posts: 1187
  • Thank you received: 370
Strange thing, these duplicated commands. But anyway, good to hear that you resolved it!
6 months 1 week ago #96641

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

  • Posts: 1957
  • Thank you received: 420
Yes, I am happy that it is working for me now. I hope someone will take some time to dig into these duplicate GR commands. My python code for the LX200 protocol worked without the need to filter that out about two years ago and now not anymore. Seems like some regression in INDI to me.
6 months 1 week ago #96642

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

  • Posts: 1187
  • Thank you received: 370
I'll check it with my mount tomorrow whether it shows the duplicate code as well.
The following user(s) said Thank You: Wouter van Reeven
6 months 1 week ago #96643

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

  • Posts: 1187
  • Thank you received: 370
Hi Wouter,
the problem with the doubled commands must be somewhere in your setup. With the Avalon Legacy (using LXBasic), I get the following log entries in the INDI log when issuing a slew command
SCOPE	43.983334 sec	: CMD <:GD#>
SCOPE	44.015012 sec	: RES <+01*44:21>
SCOPE	44.015123 sec	: VAL [1.73917]
SCOPE	45.016280 sec	: CMD <:GR#>
SCOPE	45.038899 sec	: RES <15:25:05>
SCOPE	45.039048 sec	: VAL [15.4181]
SCOPE	45.039087 sec	: CMD <:GD#>
SCOPE	45.070813 sec	: RES <+01*44:21>
SCOPE	45.070993 sec	: VAL [1.73917]
SCOPE	45.072931 sec	: <setObjectRA>
SCOPE	45.073050 sec	: CMD <:Sr16:42:10#>
SCOPE	45.102746 sec	: CMD <:Sr16:42:10#> successful.
SCOPE	45.102862 sec	: <setObjectDEC>
SCOPE	45.102895 sec	: CMD <:Sd+31*33:40#>
SCOPE	45.134718 sec	: CMD <:Sd+31*33:40#> successful.
SCOPE	45.134826 sec	: <Slew>
SCOPE	45.134851 sec	: CMD <:MS#>
SCOPE	45.166737 sec	: RES <0>
INFO	45.166872 sec	: Slewing to RA: 16:42:10 - DEC: 31:33:40

- Wolfgang
6 months 6 days ago #96658

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

  • Posts: 1957
  • Thank you received: 420
Hi Wolfgang,

Thanks for looking into this again. What happens after the MS command? That part is missing from the log you posted and that is where I receive two consecutive GR commands.


Wouter
6 months 6 days ago #96660

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

  • Posts: 1187
  • Thank you received: 370
INFO	45.166872 sec	: Slewing to RA: 16:42:10 - DEC: 31:33:40
SCOPE	46.072109 sec	: CMD <:GR#>
SCOPE	46.142409 sec	: RES <15:33:20>
SCOPE	46.142562 sec	: VAL [15.5556]
SCOPE	46.142599 sec	: CMD <:GD#>
SCOPE	46.174370 sec	: RES <+03*47:03>
SCOPE	46.174504 sec	: VAL [3.78417]
SCOPE	47.175691 sec	: CMD <:GR#>
SCOPE	47.198005 sec	: RES <15:45:02>
SCOPE	47.198116 sec	: VAL [15.7506]
SCOPE	47.198150 sec	: CMD <:GD#>
SCOPE	47.229948 sec	: RES <+06*42:09>
SCOPE	47.230050 sec	: VAL [6.7025]
SCOPE	48.231239 sec	: CMD <:GR#>
SCOPE	48.253642 sec	: RES <15:56:43>
SCOPE	48.253754 sec	: VAL [15.9453]
SCOPE	48.253789 sec	: CMD <:GD#>
SCOPE	48.317584 sec	: RES <+10*23:26>
SCOPE	48.317719 sec	: VAL [10.3906]
SCOPE	49.318893 sec	: CMD <:GR#>
SCOPE	49.341188 sec	: RES <16:11:29>
SCOPE	49.341330 sec	: VAL [16.1914]
SCOPE	49.341364 sec	: CMD <:GD#>
SCOPE	49.373129 sec	: RES <+13*18:23>
SCOPE	49.373265 sec	: VAL [13.3064]
The following user(s) said Thank You: Wouter van Reeven
Last edit: 6 months 6 days ago by Wolfgang Reissenberger.
6 months 6 days ago #96662

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

  • Posts: 1957
  • Thank you received: 420
Thanks. That indeed doesn't show the duplicate command. A few more questions for you so I can investigate further.

What OS are you on? Which version of KStars? How is your mount connected to INDI? Via a serial cable or via TCP/IP?

I am on macOS with KStars 3.6.5 stable build 2023-06-01T21:31:40Z and connect via TCP/IP. I install KStars via homebrew so I will remove that and will install KStars 3.6.7 which I am downloading from the KDE website right now.
Last edit: 6 months 6 days ago by Wouter van Reeven.
6 months 6 days ago #96664

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

Time to create page: 0.313 seconds