×

INDI Library v1.9.9 Released (30 Nov 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Driver OnStep (LX200 like) for INDI

  • Posts: 304
  • Thank you received: 24
More iterations of testing with "return home" after Park data was purged, show everything working normally. No crashes.

So it has something to do with Parking, which is not part of my actual workflow since I don't have an observatory.
1 year 2 weeks ago #77734

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

  • Posts: 332
  • Thank you received: 42
Khalid,

I tried the "Purge" methos but still have the jumps when Parking / Unparking.

In the meantime I did try to start a list of all the LX200 commands github.com/azwing/OnStep_Commands
It is really a start but more complete that the Wiki and IO still miss a bunch of commands.
Since I am blocked for hardware reason ...
1 year 2 weeks ago #77741

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

  • Posts: 304
  • Thank you received: 24
After I purged, I never parked. Just "return home", and everything was normal.

So my scenario is different that yours.

There is still a bug that happens after parking (wrong coordinates reported in KStars, but not in other client applications) and crashing.

I think the crashing is related to the wrong coordinates somehow.

The puzzle is what happens after parking that triggers all this. It is not parking itself, but something following or relating to it.
1 year 2 weeks ago #77743

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

  • Posts: 148
  • Thank you received: 19
Khalid - can you crash at will? if so humour me here - as you know I have a number of systems and under constant settings and conditions I randomly crash...BUT I have found if I turn off logging completely I do not randomly crash - Your crash on park may not be the park process but LOGGING about the park process - every crash I get is related somehow to Q lib(either io or audio) so my suspicion is that the the values used in motion and parking blow up when being logged - if you can replicate you crash, try a few time with no logging turned on - it would almost verify my theory....I am too random to verify
1 year 2 weeks ago #77744

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

  • Posts: 304
  • Thank you received: 24
Not really 'at will'. It takes some 5 minutes or so after I park, and after the coordinates are different from what OnStep actually reports, then it crashes.

I will park and see if it happens again.
1 year 2 weeks ago #77745

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

  • Posts: 304
  • Thank you received: 24
My log verbosity is 'regular'.

The park function works normally initially (except for that jump that Alain reported. I see it too).
There is no crash (at least for a few minutes).

Then I unparked, then slew to the other side of the meridian. All normal.

Then issued a park command and waited for maybe 10 minutes and it did not happen.

Now that I try to remember, the crash happened the next day from trying to park. Maybe because the position was under the horizon (or so INDI thought it was).

Will leave it like that, and test tomorrow.

Sorry, nothing definitive here.
1 year 2 weeks ago #77748

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

  • Posts: 332
  • Thank you received: 42
Khalid,

I try to setup different configuration with the hardware I have available (Bluepill / Arduino-Mega / Fysetc S6 / Max PCB2)
Not thaty I beleive the errors come from different platforms, it is just because this is what I have to set-up different scenarii.
(With / Without Focuser, Rotator, Equatorial vs Altaz ...)

I could not do all since I have still no soldering iron, but was able to set-up an Arduino Mega 2560 with flying wires.

just to see if my thoughts are correct:
In therory:
1) -If I connect to Serial (via usb-serial dongle) dedicated to WiFi I should be able to connect with Indi or terminal and send commands / receive responses, correct?
2) - If I use an Arduino Mega 2560 I connect my ESP8266 Rx/Tx to serial 1, correct?

If I try (1) I still have sometimes errors that I don't have via standard USB
If I try (2) I have some other errors: (with kstars of with python script)
a) I cannot connect at all
b) I can connect but after a while all is blocked
c) I have the message "Serial Interface to OnStep is Down!" in the Web browser
Last edit: 1 year 2 weeks ago by Alain Zwingelstein.
1 year 2 weeks ago #77768

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

  • Posts: 155
  • Thank you received: 37
WARNING: MEGA2560 IS 5V, ESP8266 IS LIKELY NOT 5V TOLERANT.

Use a voltage divider there, or it may fry it. (Some boards are, some are not, and the chip may have some extra tolerance on that pin, per a post by one of the esp people, but not to rely on it.)
1 year 2 weeks ago #77770

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

  • Posts: 332
  • Thank you received: 42
Thanks for the advice.
I have a divider mounted ...
1 year 2 weeks ago #77775

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

  • Posts: 304
  • Thank you received: 24
I don't have an answer for how to connect an Arduino.

But the Wiki for RAMPS should have the info (indirectly)

onstep.groups.io/g/main/wiki/3996
1 year 2 weeks ago #77777

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

  • Posts: 75
  • Thank you received: 5
Good all friends is possible to crash versione 1.9.3 in wifi?
Regards
Ettore
 
INDI/KStars on Raspberry Pi 4, 4gb
Raspberry Bull 64bit
Skywatcher 150PDS
CGE-PRO Mount
Nikon D5300 Camera
ZWO183MM
ZWO ASI120mm
Whaveshave focuser
1 year 2 weeks ago #77881

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

  • Posts: 155
  • Thank you received: 37
So after looking at this a lot more, and thinking about some things. The problem mainly is the timeout, but even setting it longer will crash things sometimes for a few reasons. (Yay wireless, also *#$%* ISPs.)

After that happens, often the connection does get the response. Unfortunately, tcflush doesn't work for that, nor do a few other things. So what was happening was say I had :A?# (returns ABC (A= max stars, B=Current Star, C=#stars in alignment, or B/C is flipped,) followed by :GU# (WHich is the nPada/250 looking string that's status info) and then :GR# So you'd get a timeout on A?, so :GU# would get back 600#, and :GR# would get nPada/250, and if input verification and on down the line. (Occasionally something would help it.) I didn't have the input verification needed for every function, so when it hit those it could crash. When I did add the input verification, I still had a problem: Everything was shifted. So while it wouldn't crash, you'd get endless error messages.

Unfortunately after playing with tcflush and others which didn't work, Eventually, I just decided to read it with a very short timeout (1ms (lower it? since it should be in the buffer already?)) until the buffer was cleared. Which seems kinda inelegant, but works. I also introduced getCommandDoubleResponse (no corresponding function in lx200drivers), which is same calling as the SingleCharErrorLongResponse, with a double added. This has the clear out portion, and after testing for a while (and quite large logfiles!) I can't reproduce the continuous shift or crashes. In the past I could after some period of time, be it 5 minutes, or 2 hours, it'd eventually have the issue.) It doesn't clean up the code much at all over doing it in the LongResponse, but does setup nicer for checksummed commands/resend. (I think.)

I will add the buffer clearing to others, and I do wonder about adding it to the lx200driver calls, because they also operate over the network. I don't have another lx200 to test, but I suspect if someone hooked up an esp8266 in it's original 'dumb' serial port <-> wifi intention, that might be seen.

Expected behavior:
No crashes
Occasional value is incorrect (due to not all functions flushing it, This should mostly be strings, like :GU#, or similar, I will be adding flushes to reduce/eliminate this)
INFO/ERROR messages only when something makes it past that buffer flush, so there should be only 1 for any given message.
Lots of error messages on disconnection (need to work on this.)

This is on the network-timeouts branch so far. Please test and let me know if there are any crashes or problems on wifi (or serial).

 
1 year 1 week ago #77976

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

Time to create page: 0.572 seconds