×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Pulsar2 connection fails

  • Posts: 66
  • Thank you received: 2

Replied by Paolo on topic Pulsar2 connection fails

see also private message with some reserved documents...
7 years 2 months ago #13844

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

  • Posts: 66
  • Thank you received: 2

Replied by Paolo on topic Pulsar2 connection fails

To say the truth, I did not use much filtering for my first driver version.
So the situation is:
- we had a Pulsar 2 driver which was working, but not implementing all options
- we now have a full Pulsar 1 driver (incorrectly called Pulsar 2), implementing most useful features, but not working with Pulsar 2

I see only two options:
- recover the previous driver for Pulsar 2 and keep the present one, renamed Pulsar 1 (but it seems not optimal to duplicate them)
- have a single driver, but recover somewhat the old behavior if the detected device is Pulsar 2

How to proceed? Camiel, can you explain why the driver should now communicate differently with respect to the original ?
7 years 2 months ago #13944

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

  • Posts: 105
  • Thank you received: 23
Hi Paolo,

Did you try the modification?
The reason for the changes is that I kept having problems with the communicatoin between my PC and the Pulsar module. The driver is working fine for my setup now which it wasn't in the past. From the documentation (unless it is out of date) and from the ASCOM driver code, I make up that it should work for both Pulsar vesions. Reverting to the previous version is fine with me.

Regards,
Camiel
7 years 2 months ago #13948

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

  • Posts: 66
  • Thank you received: 2

Replied by Paolo on topic Pulsar2 connection fails

Oh sorry there was it seems another modification? I did not check. Probably I missed it. I update by ppa and test tonight.
Thank you!
Paolo
7 years 2 months ago #13954

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

  • Posts: 66
  • Thank you received: 2

Replied by Paolo on topic Pulsar2 connection fails

Camiel

I don't know what you modified, but the effect is now very positive!!!!! I made just a short test as it is totally cloudy, but the driver seems now to behave correctly, and communicate with the Pulsar with nearly no glitches.
Did you introduce delays?

I just found a small issue when slewing and at least once (over 3-4 attempts) the slew failed. I found in the log that nearly always the RES to the slew command is not valid at the first attempt. See below. Probably a small detail to tune.
Thank you so much for the good job and the support!

Paolo
SCOPE	177.343233 sec	: CMD <#:GR#>
SCOPE	177.451890 sec	: RES <00:00:00> (1 attempts)
SCOPE	177.451947 sec	: VAL [0]
SCOPE	177.451954 sec	: CMD <#:GD#>
SCOPE	177.562886 sec	: RES <+00:29:59> (1 attempts)
SCOPE	177.562936 sec	: VAL [0.499722]
SCOPE	177.562972 sec	: CMD <#:Sr 00:00:00#>
SCOPE	177.673865 sec	: RES <1> (attempt 0)
SCOPE	177.673926 sec	: CMD <#:Sd -01:00:00#>
SCOPE	177.673952 sec	: RES <#> (attempt 0)
SCOPE	177.784853 sec	: RES <1> (attempt 1)
SCOPE	177.784913 sec	: CMD <#:MS#>
SCOPE	178.456254 sec	: RES <0> (2 attempts)
INFO	178.456317 sec	: Slewing to RA:  0:00:00 - DEC: -1:00:00
SCOPE	178.563086 sec	: CMD <#:YGi#>
SCOPE	178.895871 sec	: RES <1> (1 attempts)
SCOPE	178.895933 sec	: VAL [1]
SCOPE	178.895946 sec	: CMD <#:GR#>
SCOPE	179.005681 sec	: RES <23:59:59> (1 attempts)
SCOPE	179.005758 sec	: VAL [23.9997]
SCOPE	179.005775 sec	: CMD <#:GD#>
SCOPE	179.116608 sec	: RES <+00:29:47> (1 attempts)
SCOPE	179.116666 sec	: VAL [0.496389]
 
7 years 2 months ago #13995

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

  • Posts: 105
  • Thank you received: 23
Hi Paolo,

Good that its working again. I think that I read a comment about the :MS# command. I'll have a look at that.
There is one problem that remains to be solved: I have noticed that at some occasions (typically once in an hour but very irregularly) time out errors occur while the driver is reading the RA/DEC coordinates. Since there were some remarks in the ASCOM code about this I wander whether you see this problem too? If so the fix is (for the time being) to disconnect and reconnect the driver. It would be useful if you could provide a log file too.

Regards,
Camiel
7 years 2 months ago #14006

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

  • Posts: 105
  • Thank you received: 23
I checked the Pulsar documentation on the ":MS#" command: it is supposed to return 0 on success and 1 on failure. So, the slew should have been started according to the logging output. Did it?
The info on the number of attempts is maybe confusing you too. Once I get the time out problem solved, I'll clean up the code so that it silently ignores extra '#' characters in the response strings send by the Pulsar.
7 years 2 months ago #14007

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

  • Posts: 105
  • Thank you received: 23
I've finally found a reliable solution to the time out problems I was having with the Pulsar controller. Investigation of the input and output streams to the controller showed that the Pulsar is sometimes late by several seconds sending a response to a command. The delay varies in size so that simply flushing the input stream does not always work: in many cases it flushes nothing or only the first part of the delayed response. The remaining delayed response is than ready as the response of the following command send to the Pulsar. Thus commands and responses become out of sync.

In order to establish reliable communication with the Pulsar after a time out, one must resynchronize the commands and responses. This can be done by sending ACK characters until two subsequent positive responses to the ACK are received. In that way we can be sure that after the next command we can read the response to that command.

I've updated the lx200pulsar2 driver in the repository with this fix. Give it a try and let me know whether it works on the Pulsar2.
The following user(s) said Thank You: Jasem Mutlaq, Paolo
7 years 2 months ago #14152

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

Thanks! Merged! Can you please update the documentation here?

indilib.org/devices/telescopes/pulsar2.html

This is what users rely on when researching Pulsar2 on INDI and it seems quite sparse at the moment. Please add your name to the authors as well.
The following user(s) said Thank You: Paolo
7 years 1 month ago #14158

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

  • Posts: 105
  • Thank you received: 23
Hi Jasem,

I' ve updated the page. The changes in the driver up-to-now concern mostly the internal workings. One thing which is not so obvious, is that before syncing the mount one must indicate on which side of the pier the telescope is mounted. (Note that this has nothing to do with the meridian flip.)
Once the driver turns out to be stable we can start adding features such meridian flip detection.

Regards,
Camiel
7 years 1 month ago #14164

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

  • Posts: 66
  • Thank you received: 2

Replied by Paolo on topic Pulsar2 connection fails

Thank you Camiel and Jasem for having taken care of this driver! It is working much better now. I had cloudy nights recently so not able to test the last modifications. I'll let you know how it works in its last version.

Cheers
Paolo
7 years 1 month ago #14171

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

  • Posts: 66
  • Thank you received: 2

Replied by Paolo on topic Pulsar2 connection fails

I updated today to the last version on ppa and got a systhematic crash of kstars+ekos (segmentation fault).
This happens anytime I try to enter coordinates to slew or sync, in the control panel.
Restarting Ekos (but not the indi server) provides the warning window "sorry, the application indi_lx200generic has stopped unexpectedly".
I sent a report by the button appearing in this window... (who receives it? Jasem?)
Paolo
7 years 1 month ago #14459

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

Time to create page: 1.446 seconds