×

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

Bi-monthly release with minor bug fixes and improvements

Driver OnStep (LX200 like) for INDI

  • Posts: 322
  • Thank you received: 31
I don't want to sound ungrateful. Au contraire ... you and James did a superb job on a very complex piece of software that is constantly evolving.

The timeouts are the issue that makes this unusable now, at least over WiFi. So maybe that has priority, since I know many people use it like that.

As we discussed a long time ago, WiFi is not suitable for real time tasks. For my real mount, I use USB always, since that means my laptop and mount will always communicate and no interference or signal issues will affect it. It may affect my laptop communicating with the mount laptop, but that is just a remote desktop so if it goes away for a minute and comes back, it is not a big deal.

I do use WiFi for testing though since it is easier not to have wires, as I work on my recliner (I don't even have a desk).

So I am not really affected personally by this, but many will be, and will start complaining loudly ...

Back to the issue itself:

Maybe because over WiFi there is no real "tty" and therefore it does not time out quickly? I don't know.

But the issue is there. Every LX200 command to a non-existing device (focuser :F and thermometer :r are the ones I noticed) causes a 5 second timeout, and since we have many commands, that makes it unusable with WiFi.

I don't know how this can be worked around at least temporarily.

Can I manually disable these device in the INDI control panel after startup? If that is the case, then it is inconvenient, but should make WiFi usable.
2 years 4 months ago #77521

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

  • Posts: 452
  • Thank you received: 71
@Khalid,

Don't feel ungrateful, feedback is constructive and helpful. No tester no improvement.

I will try to find a module to test the WiFi .
For the time being I just have a Bluetooth module.

The strange thing is that it seems to work over USB.

Can you tell me your OnStep setup or maybe attach the config file, would be easier.
But one thing I don't have are any kind of sensors or limit switches except Pec, so I cannot test these.

I believe from a driver point of view we use the same set-up:
indi_lx200_OnStep version 1.12
indiserver 1.9.3
kstars 3.5.6 Stable
2 years 4 months ago #77526

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

  • Posts: 322
  • Thank you received: 31
Yes, it works perfectly over USB. I think what happens is that the fast timeout detection for the focuser and thermometer work correctly as intended when there is a USB connection (serial tty semantics and all that).

But the same method does not work over WiFi. There is no serial after all. Or rather the serial is between the WiFi module in the OnStep controller and the microcontroller.

You can wire any 5V ESP8266 module to your controller. The Wemos is preferred because of its small footprint, but the regular NodeMCU ESP8266 will work too.

I don't have any fancy devices or switches on my test controller (Blue Pill), other than WiFi. On my S6 controller, I also have WiFi, in addition to a GPS as a time/location source, and a heater as output. These are irrelevant for our testing of the WiFi issue.

So my configuration has nothing special in it. Not even PEC.

The WiFi module is flashed with the latest ("main" branch) of the SWS software from git. Version is 2.01d (or later).

WiFi is in station mode (done from the web interface), whereby the WiFi module on OnStep will join my home network and get assigned a fixed IP via DHCP.

Then in INDI under the connection tab, I have:
Connection Mode: Network
Server: 192.168.0.xx (where xx is what my router assigns to OnStep)
Port: 9998 (or 9997)

You can make it simpler if you don't configure station mode at all. SWS will default to Access Point mode and advertise its own SSID (ONSTEP) and you connect your PC to that network and work that way. Server in this case is 192.168.0.1.
2 years 4 months ago #77528

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

  • Posts: 452
  • Thank you received: 71
Finally I got to test communication via WiFi with a set-up where Focused are not configured.

the following network dump shows elapsed time and highlights where this delay is > 0,1
I have a hour long dump and no delay is over what is shown here.
What could I do to reproduce what you are observing?

Some of the long delay are due to end of polling start of next polling ("GR" commands)
I was not able to reproduce really long delays.

HH MM SS             Seconds               Delay             From        To           Frame          
 18 53      55,791420     68035,791420       ____             Indi          OnStep      .              
 18 53      55,794165     68035,794165       ____             OnStep       Indi         0.....         
 18 53      55,797490     68035,797490       ____             Indi          OnStep      :GR#           
 18 53      55,803498     68035,803498       ____             OnStep       Indi         08:53:17#      
 18 53      55,803726     68035,803726       ____             Indi          OnStep      .              
 18 53      55,807021     68035,807021       ____             OnStep       Indi         0.....         
 18 53      55,807256     68035,807256       ____             Indi          OnStep      :Gc#           
 18 53      55,812898     68035,812898       ____             OnStep       Indi         24#...         
 18 53      55,813108     68035,813108       ____             Indi          OnStep      :GM#           
 18 53      55,819405     68035,819405       ____             OnStep       Indi         Schoenau#      
 18 53      55,819616     68035,819616       ____             Indi          OnStep      :GT#           
 18 53      55,825894     68035,825894       ____             OnStep       Indi         60.16428#      
 18 53      55,826138     68035,826138       ____             Indi          OnStep      :Gt#           
 18 53      55,832083     68035,832083       ____             OnStep       Indi         +48*13#        
 18 53      55,832358     68035,832358       ____             Indi          OnStep      :Gg#           
 18 53      55,838857     68035,838857       ____             OnStep       Indi         -007*38#       
 18 53      55,840148     68035,840148       ____             Indi          OnStep      :GG#           
 18 53      55,845552     68035,845552       ____             OnStep       Indi         -01:00#        
 18 53      55,845715     68035,845715       ____             Indi          OnStep      :GL#           
 18 53      55,852472     68035,852472       ____             OnStep       Indi         18:53:42#      
 18 53      55,852623     68035,852623       ____             Indi          OnStep      :GC#           
 18 53      55,859079     68035,859079       ____             OnStep       Indi         11/13/21#      
 18 53      55,859278     68035,859278       ____             Indi          OnStep      :GVD#          
 18 53      55,867100     68035,867100       ____             OnStep       Indi         Nov 13 2021#   
 18 53      55,867257     68035,867257       ____             Indi          OnStep      :GVT#          
 18 53      55,874538     68035,874538       ____             OnStep       Indi         17:12:57#      
 18 53      55,874687     68035,874687       ____             Indi          OnStep      :GVN#          
 18 53      55,881334     68035,881334       ____             OnStep       Indi         10.04e#        
 18 53      55,881435     68035,881435       ____             Indi          OnStep      :GVP#          
 18 53      55,888328     68035,888328       ____             OnStep       Indi         On-Step#       
 18 53      55,889339     68035,889339       ____             Indi          OnStep      :FA#           
 18 53      55,894331     68035,894331       ____             OnStep       Indi         0.....         
 18 53      55,894443     68035,894443       ____             Indi          OnStep      :fA#           
 18 53      55,900015     68035,900015       ____             OnStep       Indi         0.....         
 18 53      55,900144     68035,900144       timeout 0,162    Indi          OnStep      :F1A#          
 18 53      56,062373     68036,062373       ____             OnStep       Indi         .....          
 18 53      56,062429     68036,062429       ____             Indi          OnStep      :rG#           
 18 53      56,124791     68036,124791       ____             OnStep       Indi         0.....         
 18 53      56,124830     68036,124830       ____             Indi          OnStep      :GXY0#         
 18 53      56,186221     68036,186221       timeout 0,102    OnStep       Indi         0.....         
 18 53      56,288607     68036,288607       ____             Indi          OnStep      :SG -01#       
 18 53      56,295466     68036,295466       ____             OnStep       Indi         1.....         
 18 53      56,295589     68036,295589       ____             Indi          OnStep      :SL 18:34:40#  
 18 53      56,306042     68036,306042       ____             OnStep       Indi         1.....         
 18 53      56,306181     68036,306181       ____             Indi          OnStep      :SC11/13/21#   
 18 53      56,316068     68036,316068       ____             OnStep       Indi         .....          
 18 53      56,316597     68036,316597       ____             OnStep       Indi         1.....         
 18 53      56,316857     68036,316857       ____             Indi          OnStep      :Sg352:21:9.00#
 18 53      56,328437     68036,328437       ____             OnStep       Indi         1.....         
 18 53      56,328571     68036,328571       ____             Indi          OnStep      :St+48:13:29.00
 18 53      56,340270     68036,340270       timeout 0,457    OnStep       Indi         1.....         
 18 53      56,797533     68036,797533       timeout 0,111    Indi          OnStep      :GR#           
 18 53      56,908387     68036,908387       ____             OnStep       Indi         08:34:12#      
 18 53      56,908586     68036,908586       ____             Indi          OnStep      :GD#           
 18 53      56,916131     68036,916131       ____             OnStep       Indi         +49*03:35#     
 18 53      56,916323     68036,916323       ____             Indi          OnStep      :GU#           
 18 53      56,923443     68036,923443       ____             OnStep       Indi         NpezEW160#     
 18 53      56,924399     68036,924399       ____             Indi          OnStep      :GR#           
 18 53      56,931356     68036,931356       ____             OnStep       Indi         08:34:12#      
 18 53      56,931468     68036,931468       ____             Indi          OnStep      .              
 18 53      56,934944     68036,934944       ____             OnStep       Indi         0.....         
 18 53      56,935034     68036,935034       ____             Indi          OnStep      :GM#           
 18 53      56,941606     68036,941606       ____             OnStep       Indi         Schoenau#      
 18 53      56,941822     68036,941822       ____             Indi          OnStep      :GT#           
 18 53      56,948241     68036,948241       ____             OnStep       Indi         60.16428#      
 18 53      56,948487     68036,948487       ____             Indi          OnStep      :GtH#          
 18 53      56,957615     68036,957615       ____             OnStep       Indi         +48*13:29.002#
 18 53      56,957821     68036,957821       ____             Indi          OnStep      :GgH#          
 18 53      56,966294     68036,966294       ____             OnStep       Indi         -007*38:50.978#
 18 53      56,967453     68036,967453       ____             Indi          OnStep      :GG#           
 18 53      56,973227     68036,973227       ____             OnStep       Indi         -01:00#        
 18 53      56,973381     68036,973381       ____             Indi          OnStep      :GL#           
 18 53      56,980498     68036,980498       ____             OnStep       Indi         18:34:41#      
 18 53      56,980656     68036,980656       ____             Indi          OnStep      :GC#           
 18 53      56,987309     68036,987309       ____             OnStep       Indi         11/13/21#      
 18 53      56,987529     68036,987529       ____             Indi          OnStep      :GVD#          
 18 53      56,994924     68036,994924       ____             OnStep       Indi         Nov 13 2021#   
 18 53      56,995050     68036,995050       ____             Indi          OnStep      :GVT#          
 18 53      57,002197     68037,002197       ____             OnStep       Indi         17:12:57#      
 18 53      57,002308     68037,002308       ____             Indi          OnStep      :GVN#          
 18 53      57,009173     68037,009173       ____             OnStep       Indi         10.04e#        
 18 53      57,009299     68037,009299       ____             Indi          OnStep      :GVP#          
 18 53      57,017120     68037,017120       ____             OnStep       Indi         On-Step#       
 18 53      57,018015     68037,018015       ____             Indi          OnStep      :FA#           
 18 53      57,023059     68037,023059       ____             OnStep       Indi         0.....         
 18 53      57,023221     68037,023221       ____             Indi          OnStep      :fA#           
 18 53      57,028907     68037,028907       ____             OnStep       Indi         0.....         
 18 53      57,029087     68037,029087       ____             Indi          OnStep      :F1A#          
 18 53      57,086872     68037,086872       ____             OnStep       Indi         .....          
 18 53      57,129417     68037,129417       ____             Indi          OnStep      :rG#           
 18 53      57,191500     68037,191500       ____             OnStep       Indi         0.....         
 18 53      57,192055     68037,192055       ____             Indi          OnStep      :GXY0#         
 18 53      57,254143     68037,254143       timeout 0,102    OnStep       Indi         0.....         
 18 53      57,355688     68037,355688       ____             Indi          OnStep      :%BD#          
 18 53      57,361172     68037,361172       ____             OnStep       Indi         .....          
 18 53      57,361667     68037,361667       ____             OnStep       Indi         0#....         
 18 53      57,361768     68037,361768       ____             Indi          OnStep      :%BR#          
 18 53      57,367892     68037,367892       ____             OnStep       Indi         0#....         
 18 53      57,368032     68037,368032       ____             Indi          OnStep      :GX90#         
 18 53      57,374899     68037,374899       ____             OnStep       Indi         0.50#.         
 18 53      57,375150     68037,375150       ____             Indi          OnStep      :GX95#         
 18 53      57,381224     68037,381224       ____             OnStep       Indi         0#....         
 18 53      57,381332     68037,381332       ____             Indi          OnStep      :GX96#         
 18 53      57,387884     68037,387884       ____             OnStep       Indi         E#....         
 18 53      57,387998     68037,387998       ____             Indi          OnStep      :GXE9#         
 18 53      57,394444     68037,394444       ____             OnStep       Indi         60#...         
 18 53      57,394646     68037,394646       ____             Indi          OnStep      :GXEA#         
 18 53      57,400992     68037,400992       ____             OnStep       Indi         60#...         
 18 53      57,401152     68037,401152       ____             Indi          OnStep      :GX9A#        
2 years 4 months ago #77538

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

  • Posts: 452
  • Thank you received: 71
Khalid,

Thanks for the infos.

I did the test with an ESP8266 configured to connect to my router network (so station mode).

I do not understand why I don't observe same issue as you do.
Guest I'm missing something but may be after a good sleep ... will work better.
Tomorrow is another day :-)
2 years 4 months ago #77539

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

  • Posts: 322
  • Thank you received: 31
Alain,

When you wake up tomorrow, please let me know what did you use to generate this dump?

I could do the same here and compare.
2 years 4 months ago #77540

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

  • Posts: 452
  • Thank you received: 71
Khalid,

hereunder the commandline to generate the dump
sudo ngrep -d eth0 -t -W single host 192.168.0.12 | grep "T" | awk '{print $2"\t"$3"\t"$4"\t"$8}' | sed 's/:/\t/g' | awk '{print $1"\t"$2"\t"$3"\t"$4"\t"$5"\t"$7":"$8":"$9}' | sed 's/192.168.0.10/Indi\tOnStep/g' | sed 's/192.168.0.12/Onstep\tIndi/g' | sed 's/:://g' | sed 's/#:/#/g' | awk '{printf "%s\t %s\t %s\t %s\t %f\t %s\t %s\t %s\t \n ", $1, $2, $3, $4, $2*3600+$3*60+$4, $5, $6, $7}' > testdump

I get something like this
 2021/11/14       16      05      08.302587       57908.302587    Indi    OnStep  GR#     
 2021/11/14      16      05      08.310520       57908.310520    Onstep  Indi    06:43:00#       
 2021/11/14      16      05      08.311024       57908.311024    Indi    OnStep  GD#     
 2021/11/14      16      05      08.317488       57908.317488    Onstep  Indi    +49*02:53#      
 2021/11/14      16      05      08.317824       57908.317824    Indi    OnStep  GU#     
 2021/11/14      16      05      08.324220       57908.324220    Onstep  Indi    nNPzEW160#      
 2021/11/14      16      05      08.324511       57908.324511    Indi    OnStep  %BD#    
 2021/11/14      16      05      08.330362       57908.330362    Onstep  Indi    0#....  
 2021/11/14      16      05      08.330557       57908.330557    Indi    OnStep  %BR#    
 2021/11/14      16      05      08.336283       57908.336283    Onstep  Indi    0#....  
 2021/11/14      16      05      08.336520       57908.336520    Indi    OnStep  GX90#   
 2021/11/14      16      05      08.343177       57908.343177    Onstep  Indi    0.50#.  
 2021/11/14      16      05      08.343353       57908.343353    Indi    OnStep  GX95#   
 2021/11/14      16      05      08.352210       57908.352210    Onstep  Indi    0#....  
 2021/11/14      16      05      08.352552       57908.352552    Indi    OnStep  GX96#   
 2021/11/14      16      05      08.358867       57908.358867    Onstep  Indi    E#....  
 2021/11/14      16      05      08.359211       57908.359211    Indi    OnStep  GXE9#   
 2021/11/14      16      05      08.365478       57908.365478    Onstep  Indi    60#...  
 2021/11/14      16      05      08.365767       57908.365767    Indi    OnStep  GXEA#   
 2021/11/14      16      05      08.372613       57908.372613    Onstep  Indi    60#...  
 2021/11/14      16      05      08.372878       57908.372878    Indi    OnStep  GX9A#   
 2021/11/14      16      05      08.378742       57908.378742    Onstep  Indi    NAN#..  
 2021/11/14      16      05      08.378969       57908.378969    Indi    OnStep  GX9C#   
 2021/11/14      16      05      08.386588       57908.386588    Onstep  Indi    NAN#..  
 2021/11/14      16      05      08.386918       57908.386918    Indi    OnStep  GX9B#   
 2021/11/14      16      05      08.394166       57908.394166    Onstep  Indi    NAN#..  
 2021/11/14      16      05      08.394520       57908.394520    Indi    OnStep  GX9E#   
 2021/11/14      16      05      08.401497       57908.401497    Onstep  Indi    NAN#..  
 2021/11/14      16      05      08.401921       57908.401921    Indi    OnStep  GXU1#   
 2021/11/14      16      05      08.409322       57908.409322    Onstep  Indi    ,,,,,,,#        
 2021/11/14      16      05      08.409571       57908.409571    Indi    OnStep  GXU2#   
 2021/11/14      16      05      08.417824       57908.417824    Onstep  Indi    ,,,,,,,#        
 2021/11/14      16      05      08.418165       57908.418165    Indi    OnStep  A?#     
 2021/11/14      16      05      08.424062       57908.424062    Onstep  Indi    900#..  
 2021/11/14      16      05      08.424430       57908.424430    Indi    OnStep  GX02#   
 2021/11/14      16      05      08.430430       57908.430430    Onstep  Indi    ......  
 2021/11/14      16      05      08.431426       57908.431426    Onstep  Indi    0#....  
 2021/11/14      16      05      08.431743       57908.431743    Indi    OnStep  GX03#   
 2021/11/14      16      05      08.438236       57908.438236    Onstep  Indi    0#....  
 2021/11/14      16      05      09.439170       57909.439170    Indi    OnStep  GR#     
 2021/11/14      16      05      09.446078       57909.446078    Onstep  Indi    06:43:01#   

After that I imported into Libreoffice Calc as csv file tab separator to investigate
I was too lazy to try to do everything in bash.
The following user(s) said Thank You: james_lan
Last edit: 2 years 4 months ago by Alain Zwingelstein. Reason: Pasted the wron code
2 years 4 months ago #77550

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

  • Posts: 161
  • Thank you received: 39
That's a cool way of doing that.

For the moment, Khalid can you try this branch: github.com/james-lan/indi/tree/network-timeouts

It has the "simple" solution to timeouts for networks of 2 second timeouts. Though like Alain, I haven't seeing issues on my board with the lower one. But it's esp8266 + stm32. (I'm not sure which box my SHC is in, but when I find it, I'll flash and test.)

But given the hardware, it suggests that there _could_ be an issue in esp32, the SHC, and/or your network with it having long timeouts (100ms seems like it shouldn't be hit often, though running ping I did have 2 over letting it run for a while, so maybe I've been lucky). Do note that is ONLY the detection timeouts, and a few others (mostly the ones I identified as benefiting from short timeouts for shorter startup), anything that goes through the standard lx200 stuff will still have it's timeout of 5 seconds. It also does not include the FocuserInterface Shown only on detection. (below)

If the longer timeout works for you Khalid, I'll add a configurable variable on that, similar to the update time. So that people who don't have problems can lower it.


For the focus detection, I did that separately and I've gone ahead and made a pull request, as it's simple, but please review it: github.com/indilib/indi/pull/1567 or try the branch it's from: github.com/james-lan/indi/tree/2021-fix-focuser-not-hidden

Also, Khalid, I also don't think that you are ungreatful/rude/anything like that. While I may in fact go ungh sometimes because of posts, (as I did when trying to think up a good method of making the timeouts changing before my brain went wait why not just do it immediately if we can tell the connection type.) that's not because of your input. I do appreciate it. 90% of the bugs with the driver have been just not thinking of things (Ex: Not everyone has PEC because Alt-Az or similar (and that's what causes some re-detection to be needed due to the setCapabilites that Alain listed out), or it working for me as in this case, so thinking it works for everyone.
2 years 4 months ago #77562

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

  • Posts: 161
  • Thank you received: 39
Oh, and the WeatherInterface is still as is. I'll get to that, but I think that's pretty harmless at the moment, and it allows you to set it for DewHeaters & such if you lack a sensor (I think, I need to look at all of that again). OnStep will reply to it as it's setup in all versions (:GX9A# to :GX9E#) I checked (3, 4, 5, X) so that shouldn't ever hit a timeout. (Barring disconnects, and it uses the long (5sec timeout if it does))
2 years 4 months ago #77564

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

  • Posts: 452
  • Thank you received: 71
James,

What is your opinion about having some check boxes in the "Option" tab to enable/disable features?

For the moment I have no idea about a smart way to interrogate OnStep about all the fetaures configured other than the diverse commands we already use (FA ...; )
The :Gu# looks promissing but still does not give all the informations in one shot.
2 years 4 months ago #77567

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

  • Posts: 322
  • Thank you received: 31
James,

The SHC is irrelevant to this bug.
Testing my OnStep with KStars only shows the problem.

And I am testing on a Blue Pill board, but with the STM32F303 RobotDyn module, which is faster than the original STM32F103, and has floating point. The Blue Pill has a Wemos D1 Mini, so ESP8266.

No ESP32 anywhere in the setup.

I will check your branch and see if I can compile it in the coming few days.
2 years 4 months ago #77568

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

  • Posts: 174
  • Thank you received: 27
Tested outputs, they are working.
The following user(s) said Thank You: james_lan
2 years 4 months ago #77569

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

Time to create page: 1.119 seconds