×

INDI Library v1.9.5 Released (08 Mar 2022)

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

Driver OnStep (LX200 like) for INDI

  • Posts: 300
  • Thank you received: 24
I did test your branch that you linked to initially, specifically:

github.com/james-lan/indi/tree/network-timeouts

And I verified that it has the 2 sec vs. 0.1 sec code per the last commit that you have in there.

But that branch could never connect over WiFi at all.

I changed the 0.1 sec to 0.4 sec then 0.8 sec, to no avail.

The same goes for your master branch: it cannot connect to WiFi.

So there is something in those two branches that are not right.

If I use Jasem's master that has your latest commit:

Author: james-lan <...>
Date: Sun Nov 14 13:58:27 2021 -0600
OnStep: Don't show focuser tab unless found. (#1567)

Then I am back to what is in the PPA: messed up startup and timeouts if using WiFi, but works well if using USB.

Can you verify that your branch works over WiFi?

At this point, I have no idea what the issue(s) are, and I am leaning more towards having more testers to verify (or not) that they see the same issue that I have.

By the way, when using other applications to the same port (9997 on the latest SWS) as I was using with INDI, things work as expected.

This is from the Python OnStep API:

Setting date to: 11/14/21
Setting time to: 16:34:26
Setting UTC Offset to: +05
Setting latitude to: +43*40
Setting longitude to: 080:43
Date: 11/14/21 Time: 16:34:36 UTC +05 Lat: +43*40 Long: +080*43
Starting tracking

16:35:25 TRK 16:35:26 13:16:55 +81*53:19 +41*47:59 348*20:53
16:35:36 SLW 16:35:36 11:10:34 +61*45:07 +22*51:12 336*56:06
16:35:47 SLW 16:35:47 11:03:43 +61*45:03 +22*27:27 337*27:11
16:35:57 TRK 16:35:58 11:03:43 +61*45:03 +22*26:43 337*28:16
16:36:07 TRK 16:36:08 11:03:43 +61*45:03 +22*25:59 337*29:22
16:36:18 TRK 16:36:19 11:03:43 +61*45:02 +22*25:15 337*30:28
16:36:28 TRK 16:36:29 11:03:43 +61*45:02 +22*24:31 337*31:35
16:36:39 TRK 16:36:40 11:03:43 +61*45:02 +22*23:47 337*32:41
16:36:50 TRK 16:36:50 11:03:43 +61*45:02 +22*23:03 337*33:46

No wonder, because it does not use any focuser or rotator commands.
6 months 3 days ago #77590

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

  • Posts: 300
  • Thank you received: 24
OnStepX is not yet ready for real use (in my view).

So I am on the latest OnStep 4.24m
WiFi is SWS 2.01d
6 months 3 days ago #77591

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

  • Posts: 320
  • Thank you received: 41
I agree but is nobody tests OnStepX ....

Outside I have OnStep 4 but no Wi-Fi, and ... Don't touch a working system :-)

So on my test platform I have two version running and for the time being they behave identical at least for what I use (basic control + Focuser)
6 months 3 days ago #77592

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

  • Posts: 300
  • Thank you received: 24
I absolutely agree: don't mess with a working system.
My mount has a FYSETC S6, and it only gets updates if I test them on my Blue Pill controller first.

If you have time tomorrow, can you disable the focuser in Config.h on your test controller and see if there is a difference with WiFi?

I am tempted to post in the OnStep group for help, asking anyone who uses INID over WiFi AND willing to test.
6 months 3 days ago #77593

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

  • Posts: 300
  • Thank you received: 24
I used the OnStep Python API and wrote a script to test some commands.

And the results are interesting. Some commands return almost immediately. Others take a lot of time.

Best let the data speaks for itself. First field is second.milliseconds.

The 0.020 is actually the timeout value the API uses to sleep after a send.

WiFi
0.020 GD +90*00:00#
0.030 GR 17:06:41#
0.280 rG 0
0.220 rI 0
0.260 rM 0
0.220 rT 0
0.260 rb 0
0.019 FA 0
0.230 FG 0
0.250 FT 0
0.413 FM 0
0.226 FI 0

USB
0.025 GD +90*00:00#
0.026 GR 17:07:37#
0.025 rG 0
0.025 rI 0
0.025 rM 0
0.025 rT 0
0.025 rb 0
0.025 FA 0
0.025 FG 0
0.025 FT 0
0.025 FM 0
0.025 FI 0

Note how GD, GR are fast, as well as FA?
Note how others are 10X or more slower?
Note how it is all fast when using USB?

I can share the python script if someone is interested.
6 months 3 days ago #77596

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

  • Posts: 300
  • Thank you received: 24
I have a clue on what may be going on.

Basically, James and Alain are using the old addons/WiFi, whereas I am using the SWS main branch.

The culprit may be the timeout default in SWS, which is 200 ms, vs. 60 ms in the addon. Search addons for TIMEOUT and you will see what it is.

See this screen shot of the SWS web interface i.imgur.com/bUIClqj.png

But I can't change it to 60, since SWS forces a minimum of 100 ms though.

After changing the timeout to that, I get this

0.060 GD +90*00:00#
0.050 GR 19:02:16#
0.150 rG 0
0.162 rI 0
0.178 rM 0
0.189 rT 0
0.267 rb 0
0.153 FA 0
0.267 FG 0
0.173 FT 0
0.150 FM 0
0.266 FI 0

Alas, when I try with KStars, I still get the same symptom.

So Alain, if you have the time, flash SWS 2.x (main branch) to your ESP8266, and see if you can reproduce the problem.
6 months 3 days ago #77597

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

  • Posts: 320
  • Thank you received: 41
Khalid,

I'll will try to flash the SWS,
I suppose you use this one github.com/hjd1964/SmartWebServer,
not the one in the addon of Onstep.

I already fear the process, I never was lucky with this beast , many failed attemps to flash ...

But I also will go back to the regular OnStep 4...


A propos your python script, yes would make sense to share.

and I have improved a bit the script to dump the network.
still does not calculated the time between commands and result but ...
#!/bin/bash
sudo ngrep -d eth0 -t -W single host 192.168.0.12 | grep "T" | awk '{split($3,a,":");printf "%s\t %s\t %s\t %s\t %f\t %s\t %s\t \n ", $2, a[1], a[2], a[3], a[1]*36 00+a[2]*60+a[3], $4, $8}' | sed 's/192.168.0.10:/Indi\t/g' | sed 's/192.168.0.12:/OnStep\t/g' | awk '{print $1"\t"$2"\t"$3"\t"$4"\t"$5"\t"$6"\t"$8}'
[code]
[/code]

and then get this result which is easier to analyse
2021/11/15      09      55      57.785758       3243357.790000  OnStep  nNPzEW150#
2021/11/15      09      55      57.786038       3243357.790000  Indi    :%BD#
2021/11/15      09      55      57.791273       3243357.790000  OnStep  0#....
2021/11/15      09      55      57.791402       3243357.790000  Indi    :%BR#
2021/11/15      09      55      57.797515       3243357.800000  OnStep  0#....
2021/11/15      09      55      57.797864       3243357.800000  Indi    :GX90#
[code]
[/code]
Last edit: 6 months 3 days ago by Alain Zwingelstein.
6 months 3 days ago #77604

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

  • Posts: 320
  • Thank you received: 41
Khalid,

I installed OnStep 4.24m
The last SamartWebServer from github.com/hjd1964/SmartWebServer

Configured OnStep without Focuser

and now I have a lot of problems.
Cannot wet my Site names etc etc

When using USB everything works fine.

OnStep 4.24m was working fine before with older WiFi (the one in the addons)

I will go ahead and make more precise tests but fore sure I now experience the same as you do,
small progress but at least progress
6 months 3 days ago #77606

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

  • Posts: 155
  • Thank you received: 37
Good catch there on the timeouts.

For some reason I was confusing the recent discussion of a wireless providing SHC with SWS.

I'm on 'Wifi server 1.13e (OnStep 3.16q)' on that one.

With the old master I'm good on connection. Though looking over some things I think I can see some timeouts in the past, but since it updates from OnStep so quickly (I'm at 50ms between updates due to trying to kill that one KStars bug. total is I think ~250ms per updateProperties cycle so I never saw it, and it'd probably be masked unless it hit in certain sections like detection where there's not a secondary gate on checking for it.)

I did go ahead and add the :rA# check, but only if OnStepX is detected to branch network-timeout.

Also discovered my test was wrong, it's a bit flag, not a value, so my == CONNECTION_TCP didn't hit the 2sec on my mount) That's also fixed in the network-timeouts branch. (It comes out as 6 aka CONNECTION_TCP + CONNECTION_SERIAL which is... a little confusing to me on the surface.) But sounds like that was working for you.

On the initialization time, it takes about 20 seconds with the 2 second timeout vs about 3 sec. (less on reconnects)

I don't have a spare esp8266 in the D1/ESP-12F formfactor, so I think I'll order some (need some more ESPs for other projects anyway.) that way swapping is good with the SWS so me testing that will be a few days or longer. Or I may try a bodged together thing.
6 months 3 days ago #77609

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

  • Posts: 320
  • Thank you received: 41
James,

I just tested your Pull request for the Focuser.
Focuser is disabled as expected.

I have same issue with WiFi and even more because with the SMW from github.com/hjd1964/SmartWebServer
I even cannot connect from any smartphone ...

I will try to go back to the WiFi from the OnStep 4.24m addons if I succeed to flash again and delet the EEprom.

With Murphy near by most probably kill the only ESP8266 I have :-)
6 months 3 days ago #77610

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

  • Posts: 320
  • Thank you received: 41
@James, Khalid,

I went back to the WiFi included in the Addons ( WiFi Server 2.1v (OnStep 4.24m))
and I do not notice anymore the delays.

As I suspected, it didn't work on the first trial, I had to cheat a bit
I changed the value 8266 into something else forcing an EEprom Init (WiFi lines 166 to 167)
===================================================
// EEPROM Init
if (nv.readInt(EE_KEY_HIGH) != 8266 || nv.readInt(EE_KEY_LOW) != 0) {
nv.writeInt(EE_KEY_HIGH,8266);
===================================================
Before doing this I was not able to adjust any WiFi settings via Web but this is another story, nothing to do with our issues.

So finally Khalid was right about the version of WiFi.

No we have to discover why and this is another pair of shoes.

First I will buy some Wemos D1 before testing again ...
The following user(s) said Thank You: james_lan
6 months 3 days ago #77613

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

  • Posts: 300
  • Thank you received: 24
I have found the ESP-01S form factor ones are painful to deal with.
Their only advantage is that they are small.
But they are 3.3V and very hard to get flashed.
I ruined 3 or 4 of them just trying to get one.

Then Howard advised to use 5V modules, which come with a microUSB port, and therefore easy to flash and easy to integrate.

The Wemos D1 Mini is trouble free. The Pro version has antenna issues.
The NodeMCU ones will also work, but have a larger footprint.

James, OnStep 3.16 is ancient. Version 4.24 is the recommended stable now. So better move with that. SWS is also stable, and recommended. There are two versions, 1.x and 2.x. The latter will become the recommended version in the next little while. So better test with that (it is the 'main' branch).

By the way, I created a thread to ask Howard why the timeout is different.

It is here

onstep.groups.io/g/developer/message/2454
6 months 2 days ago #77618

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

Time to create page: 0.646 seconds