×

INDI Library v2.0.0 Released (01 Feb 2023)

Bi-monthly release with major changes to INDI properties and client API in addition to new drivers and improvements.

Driver OnStep (LX200 like) for INDI

  • Posts: 155
  • Thank you received: 37

The clouds came. I just pushed something to azwing, with so far only the one change to the alignment: Namely that the kdialog isn't used for the align. (I'm using a mini pc outside (ECS Liva, though a Pi could be used instead, the Liva has GigE, and my pi doesn't) and... that it was popping up and freezing the whole system took me a bit to figure out. I'd gone out in the cold and actually reset the OnStep controller before figuring it out.)

So: Under the Align tab, here's how I see it as best, the popup I don't think should be used:
--Align--
Number of Align Stars: Dropdown: 1, 2, 3, 6, 9
Start Alignment: Button single
Alignment Status: Azwing's one currently on main labeled "Align Process"
Align Current sync: Button single

Instructions: Text box
(Which one, I'll leave to you, for now I'll leave mine as is.)

Write Alignment to EEPROM: Button Single (Might not be present until the results of the Align Process say complete.)
----
If stays cloudy (It's doing this really annoying thing where it's cloudy/not so i can't even take cloud flats.) I might do that tonight.

One other additional thing, I don't know why (Even after trying to look), but I've seen the issue with not connecting. I'm not completely sure of the cause, the reset script that kbahey (I think) posted on the OnStep list works. Not sure of the cause, but it appears only after I moved to CP 203?, Updated OnStep Alpha, Updated INDI, so of course it gives a great many possible problem locations.
4 years 2 months ago #32034

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

  • Posts: 335
  • Thank you received: 42
@James,

I merged you code just now. Compilation Ok and ... Onstep Crash at startup ....

Ok a little bit more work now


I was thinking about a way to discover OnStep capability as for example your Outputs.
For the time beeing it is not possible and the flexibility of OnStep makes it not easier.
there i way for exapmpe to discover the presence of focusers :FA# / :fA#

IIf the one adding code to OnStep to support an "exotic" capability like for example Inputs/Outputs could provide as well a command to check this capability.

Ok was only a thought .... I have to debug now :-)

After some checks it seems the problem comes from updates in indi itself because the official indi version does the same problem
Last edit: 4 years 2 months ago by Alain Zwingelstein.
4 years 2 months ago #32041

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

  • Posts: 304
  • Thank you received: 24

Here is the info again, for those who did not see my message on the OnStep mailing list:

I wrote a Python3 script that sends one command to /dev/ttyUSB0, then exits.

Copy and paste the contents below to a file called /usr/local/bin/reset.py
Make it executable: chmod +x /usr/local/bin/reset.py

Install python3-serial if not already installed:
sudo apt-get install python3-serial

You can then run this script from the command line instead of cutecom.

You can take this further, to make it totally automated by modifying the Teensy's udev rule to run this command automatically when OnStep is inserted.

This goes into:
/etc/udev/rules.d/49-teensy.rules

And you need to add a RUN+="..."

Here are the contents of reset.py:

===
#!/usr/bin/env python3

import time
import serial

# configure the serial connections (the parameters differs on the device you are connecting to)
ser = serial.Serial(port='/dev/ttyUSB0', baudrate=9600)

ser.isOpen()

def serial_send(s):
string = s.encode('utf-8')
ser.write(string)
time.sleep(0.05)

serial_send(':GVN#')
ser.close()
===
4 years 2 months ago #32058

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

  • Posts: 304
  • Thank you received: 24

If I may offer an opinion:

Let us not delay features until we get the Ultimate Solution. Things can always be refined later, and it is best if we have some features added with a suboptimal user interface, than waiting forever for the Ultimate Solution ...

But there is hope for doing what you want. Not only from the regular LX200 commands, but there are additional ones, e.g. :GXnn commands return a lot of info.

For example:

:GX09# -> number of aligned stars (easier than parsing :A?# output)

And so on, check Command.ino for more.

Other potentially useful ones :

:GX02# -> Polar align error in altitude
:GX03# -> Polar align error in azimuth
:GX95# -> Auto merdian flip?
4 years 2 months ago #32059

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

  • Posts: 14
  • Thank you received: 0
Thanks Kbahey,

I still have trouble connecting with Ekos/KStars, both with an Onstep Maxi and Mini PCB, it works only sporadically.
Using the App, the OnStep works fine.

The python script gives an error, and I don't see the problem.
Python3 and Python3-serial are both installed and the script has been made executable.
Please see attachment.

Best regards,
Albert
4 years 2 months ago #32085
Attachments:

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

  • Posts: 335
  • Thank you received: 42
@James,
I am still struggling with Indi since the merge of yesterdy.
One thing is sure it has nothing to do with an error in the version.
The crash happens with all versions but not on all machines :whistle:

The faultly machine is an Intel Laptop
The Other machine is an AMD Desktop
Both run Debian Buster, same packages, libraries and kernel version so I woul expect to have the eeror on both, but No!

Symptoms:
When I run indiserver -vvv indi_lx200_OnStep (or run it from within Kstars)
the server crashes (contropl panel is opened but not initialized)
dmesg shows [17443.498606] indi_lx200_OnSt[15817]: segfault at 40 ip 00007feca554697e sp 00007ffcbb3981f8 error 4 in libc-2.27.so[7feca54d9000+146000]

After many time debugging it appear that the crash happens during loading of the xml config file .indi/LX200\ OnStep_config.xml

So effectively when removing the entry for the serial port
<newTextVector device='LX200 OnStep' name='DEVICE_PORT'>
<oneText name='PORT'>
/dev/ttyACM0
</oneText>
</newTextVector>

the server starts and runs fine as long I do not update the config file. I can shutdown and restart the server without crashes.
But as soon I update the file the problem is there again.

If somebody has an idea before I commit ......... :)

I will continue to try to find what causes this behaviour but it is not easy to debug, the debugger crashes too when I arrive at the point of the error.

at least the weather is horrible so I have no frustration on this side :-)
4 years 2 months ago #32098

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

My fault, it's fixed in GIT.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
4 years 2 months ago #32112

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

  • Posts: 335
  • Thank you received: 42
Jasem,
there is a nice phrase in French: "Faute avouée, faute pardonnée" (Admitted fault, forgiven fault)
At least I passed a nice foggy day to debug, it was not in vain, during searching I learned lot of other things.
Just tryed it now, yes it is fixed.

Thank you for the Fix
4 years 2 months ago #32124

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

  • Posts: 107
  • Thank you received: 4
Onstep and INDI connection issue

Short My Setup
Setup Linux with Canon, SX CC, OnStep, OnFocus, One USB hub OnStep and OnFocus
This setup is working, When i replace OnStep with my FS2 usb to serial all are working in INDI But with the OnStep
The aim is to move to Raspberry

I use the
Onstep version 1.17 Last Alpha, type Mini. Umbuntu 18.04 LTS Gnome 3.82.2 64 Bit
Indi Last versions LX200 onStep 1.3 int 5

The Issue 1. Connecting via USB
The connection on wifi is working partly this means.
Status is connected., Site Management is updated from OnStep,
Firmware is displayed correctly but the status is grey instead of green
OnStep status Tab :GU# Return Npza/ET0 No idea what this means
The position of the scope as defined (in Coordinates) via my phone is pointing to the right star.
Mount controllable gives the status left below Error.

The logs after start up everything goes oke until

==> Update OnSTep Status
CMD <:FG#>
RES <-2>
CMD <GR#>
The Error Reading RA/DEC
CMD <GR#>
The Error Reading RA/DEC
endless loop

Thats the end

The replay on CMD <GR#> must be like Reply: HH:MM:SS# * From the site of howard
But the answer i don't see


The second issue: Connecting via USB
Communicated @9600 failed on
Connect via USB get Failed to connect (/dev/ttyUSB0) Error: Port Failure Error: No such File or directory Check device is connect to port

(the Usb connections with my Window PC no problem and under INDI with the FS2 Usb/Serial als on issue anymore)


here after de search of port connection successful
attempting to handshake using ACk
No response on ACk
Handshake failed


Any Ideas how tow handle this two issue

Chris
4 years 2 months ago #32126

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

  • Posts: 335
  • Thank you received: 42
Chris,

I try to answer to your questions:

Setup Linux with Canon, SX CC, OnStep, OnFocus, One USB hub OnStep and OnFocus
What is SX CC?

When i replace OnStep with my FS2 usb to serial all are working in INDI But with the OnStep do you try to connect OnStep with FS2? Sorry I do not understand here.
Seems you try a complete setup before making sure each individual piece is working, this makes difficult to interpret errors and answer.

You say "The Issue 1. Connecting via USB The connection on wifi is working partly this means."
Are you trying to connect via WiFi or USB?
WiFi does not work with Indi if you try to connect on the WiFi Server

I did it via a Raspberry see

GU# Return Npza/ET0 (this is documented in command.ino in the OnStep code) see below
=======================
reply to :GU#

n Not tracking
N No Goto
p Not Parked
P Parked
F Parking Failed
R PEC Recorded
H Telescope at Home
S Synceced from PPS
G Guide Active
f Axis1/Axis2 fault


#ifndef MOUNT_TYPE_ALTAZM
r refractoring compensation enabled
s refractoring compensation single axis
t refractoring full compensation enabled
#endif

w Waiting at Home
u pause at home enabled?
z Buzzer enabled

a autoMeridianFlip

#ifndef MOUNT_TYPE_ALTAZM
const char *pch = PECStatusStringAlt; reply[i++]=pch[pecStatus]; // PEC Status is one of "/,~;^" (/)gnore, get ready to (,)lay, (~)laying, get ready to (;)ecord, (^)ecording
// if (wormSensedAgain) { reply[i++]='.'; wormSensedAgain=false; } // PEC optional (.) to indicate an index detect since last call
#endif

E Mount type German Equatorial Mount
K Mount type Fork
k Mount type Fork Alt
A Mount type Altazimuthal

o PierSideNone
T PierSideEast
W PierSideWest

n an number 0 ..9 for last Error
=============================
Firmware is displayed correctly but the status is grey instead of green. You are right it is confusing, I take note. This could be green as soon communication is working.

Connect via USB get Failed to connect (/dev/ttyUSB0) Error: Port Failure Error: No such File or directory Check device is connect to port
this is a normal message at first connection attempt, but there is an option in the connection tab "Scan Ports" and "Auto Search Enable"
Normally after a while Indi finds the correct port which should be something like /dev/ttyACM0

I fear there is a mismatch between OnStep, OnFocus somewhere in Indi when you connect both via USB.
(Indi OnStep driver trying the link to OnFocus and vice versa)

Don't forget the ports change each time you connect an USB except if you define rules in /etc/udev/rules.d

I would suggest before testing a complete setup, to test individually each piece (may be you did but not as described)
Check OnStep alone with Indi, if it works go ahead and check OnFocus .... ans so on.
4 years 2 months ago #32133
Attachments:

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

  • Posts: 107
  • Thank you received: 4
Alain

Thanks for you quick and big replay
Below the point, your questions
1. SX CCD is the SX Lodedstar.
2. I have the whole INDI Kstar setup working with my FS2 (USB to RS232). I only change the FS2 with the OnStep. I didn't change the USB Ports (during the test i removed only the OnFocus USB connection
3. The issue 1 (Typo must be Connecting Via Wifi is not working as expected sorry :-)
4. The drawing i like Cool, thanks. I will add the focus -stepper to my mini setup this weekend.
You are running also on the Onstep mini, which operating system do you use on de RASP, Ubuntu Mate?
And aim right the RASP is the wifi AP and router do you have extra wifi adapter to connect to the internet?

About the issue 1 wifi, connection is not working 100%
"WiFi does not work with Indi if you try to connect on the WiFi Server" What doe you mean with this. I connect my wifi of my laptop to ONSTEP
and than i add the IP adres and Port of the OnStep in the Connection Tab after selecting Ethernet. Skysafari on my ip works with that. Do you mean that i must configure my OnStep that it will join my local network and from there connect to the OnStep via Indi? What is the symptom from your point of view in the way i connect to the wifi

Issue 2, Connecting via USB to the OnStep
I will check the usb if there is no hardware issues, I did all the steps, but its still strange because it works under windows with Howards ASCOM drivers ;-)
I did it again, connected the OnStep and on camera ( Star/Indi requires one camera)

I enabled Auto Search
First on port found then
waring Communication with /dev/ttyACM0 @ 9600 Failed. Starting Auto Search
repeating the last message

Still hoop you have some more suggestions

Chris
4 years 2 months ago #32136

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

  • Posts: 335
  • Thank you received: 42
@calberts,

Sorry for the WiFi. I cannot check since I dont have the hardware anymore. At the time I tested it was not possible and I had so much trouble flashing this horrible ESP8266 that gave it up at the profit of the raspberry solution.
But on the principle, yes the way you describe it should work provided the ESP let you pass lx200 commands.
May be somebody else vcan help you on this one.

Concerning connection via USB, it is starnge that you have a correct update of OnStep status but no answer on ":GR#".

A trial with minicom could also help to see if communication works or not.

Have you logs (setup in option tab, see picture) and then you shoud get somhing like that under ~.indi/logs/2018-11-30/indi_lx200_OnStep/
=============== logs
INFO 0.002136 sec : Session log file /home/alain/.indi/logs/2018-11-30/indi_lx200_OnStep/indi_lx200_OnStep_16:31:35.log
DEBUG 0.004782 sec : Active Snoop, driver: Dome Simulator, property: DOME_PARK
DEBUG 0.005766 sec : Active Snoop, driver: Dome Simulator, property: DOME_PARK
DEBUG 1.422239 sec : Connecting to /dev/ttyACM0
DEBUG 1.423027 sec : Port FD 8
DEBUG 1.423096 sec : Connection successful, attempting handshake...
DEBUG 1.423159 sec : Testing telescope connection using ACK...
DEBUG 1.428481 sec : Testing successful!
INFO 1.428610 sec : LX200 OnStep is online.
DEBUG 1.430089 sec : Configuration successfully saved for DEVICE_PORT.
DEBUG 1.431553 sec : Configuration successfully saved for DEVICE_BAUD_RATE.
DEBUG 1.433205 sec : Configuration successfully saved for CONNECTION_MODE.
SCOPE 1.434321 sec : CMD <:GR#>
SCOPE 1.452819 sec : RES <15:40:10>
SCOPE 1.452869 sec : Coordinate format is high precision.
SCOPE 1.452879 sec : <ACK>
SCOPE 1.452886 sec : CMD <0X6>
SCOPE 1.456815 sec : RES <P>
SCOPE 1.456861 sec : <getTimeFormat>
SCOPE 1.456870 sec : CMD <:Gc#>
SCOPE 1.465066 sec : RES <24>
SCOPE 1.465123 sec : <getSiteName>
SCOPE 1.465138 sec : CMD <:GM#>
SCOPE 1.481480 sec : RES <Schoenau>
DEBUG 1.481532 sec : Site Name <Schoenau>
SCOPE 1.481566 sec : <getTrackFreq>
SCOPE 1.481579 sec : CMD <:GT#>
SCOPE 1.497823 sec : RES <0.00000#>
SCOPE 1.497883 sec : VAL [0]
SCOPE 1.497908 sec : <getSiteLatitude>
SCOPE 1.497924 sec : CMD <:Gt#>
SCOPE 1.514193 sec : RES <+48*13>
SCOPE 1.514248 sec : VAL [48,13]
SCOPE 1.514264 sec : <getSiteLongitude>
SCOPE 1.514277 sec : CMD <:Gg#>
SCOPE 1.530709 sec : RES <-007*39>
SCOPE 1.530758 sec : VAL [-7,39]
DEBUG 1.530779 sec : Mount Controller Latitude: 48.2167 Longitude: 7.65
DEBUG 1.531260 sec : Configuration successfully saved for GEOGRAPHIC_COORD.
======================
4 years 2 months ago #32140
Attachments:

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

Time to create page: 0.902 seconds