×

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

Bi-monthly release with minor bug fixes and improvements

Celestron AVX mount and Starsense

  • Posts: 10
  • Thank you received: 4
Dear all,

meanwhile I got a response from Team Celestron and have been able to create an experimental patch to unlock newer features of the celestrongsps driver, when a Starsense controller is attached instead of a newer Nexstar controller. Since older versions of the Starsense controller include a nasty bug when syncing, the patch requires Starsense firmware 1.18 or newer in order to unlock full functionality. If you have an older firmware on your Starsense controller, please update to the latest version.

Unfortunately, due to time an weather restrictions, I have been only able to do some dry tests with the modified driver. Since parking and unparking the mount completely screwed up the mount causing the OTA (if it would have been mounted) pointing towards the ground, I decided to disable parking for safety reasons if a Starsense controller is detected. Please note that the patch does nothing else than enabling the full feature set of the celestrongps driver (except from parking/unparking). It does not add any new Starsense specific functionality.

DISCLAIMER OF WARRANTY: On the first glance all other features seemed to work fine, but if you want to test the patch, please note that you do it completely at your own risk. I am not responsible for any side effects or damages caused by the patch.

@bsfstreef: If you want to test the modified driver, simply apply the patch agains the git version of libindi and recompile.
Last edit: 6 years 9 months ago by Georg Schmidt.
6 years 9 months ago #17314
Attachments:

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

  • Posts: 3
  • Thank you received: 0
Thanks for the work geo! Maybe it sounds silly.... But I dont know how to apply the patch agains the git version of libindi and recompile.
6 years 9 months ago #17336

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

  • Posts: 10
  • Thank you received: 4
Ah, no problem, this does not sound silly at all. Regardless of the fact that libindi is very well designed and compiles rather well, the whole process is all but trivial for people who do not work with C++ on a regular basis.

First of all, you should follow the instructions in Jasem's forum post "HOWTO: Building latest libindi & Ekos", paragraph 3, "Building INDI from Source
". If you use Raspbian on your PI, the described steps should work without problems (at least they did for me). As a first test, I would recommend to compile the sources without the Starsense patch, just to make sure that the toolchain and the whole compilation process works flawlessly. For this purpose, simply type "sudo make" rather than "sudo make install" for this purpose.

If compilation works well, as a next step, you can apply the Starsense patch. To do this, enter the libindi directory created when downloading the sources via git, copy the patch to the same directory, and then type

patch -p1 <celestrongps_starsense.diff.txt

You should get then the following three messages:

patching file libindi/drivers/telescope/celestrondriver.cpp
patching file libindi/drivers/telescope/celestrondriver.h
patching file libindi/drivers/telescope/celestrongps.cpp

After this, you are ready to recompile the modified sources. To do this, and in the same step install the modified indi drivers use the command "sudo make install" this time.

If everything has worked correctly, you should now have a modified version of the celestrongps driver on your PI.

If the hole process sounds too complicated, maybe you kindly may ask Jasem, whether he could include the patch in his nightly builds. Since the patch is able to detect the Starsense controller and distinguishes between standard Nexstar controllers and Starsense, it should also be safe for all non-Starsense users. At least, I tested it with my AVX Nexstar+ controller and it worked flawlessly.
The following user(s) said Thank You: Jasem Mutlaq, Lucian Bumbuc
6 years 8 months ago #17548

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

  • Posts: 10
  • Thank you received: 2
Hi Jasem,

I have both nexstar+ and starsense hand controllers with a celestron avx mount plus a celestron gps module
I use Stelllarmate OS 1.3.0 on a RPI 3 B+.

When I use the original NexStar+ hand controller I can obtain the gps module time/location (by example "Mount UTC offset is 2.00. UTC time is 2018-09-19T17:59:52" ).
Nevertheless I can obtaint this only when the mount is NOT aligned, if it's aligned (quick align) I get never the gps module time/location but the message "Mount does not support retrieval of date and time settings".

When I use the StarSense hand controller I always get "Mount does not support retrieval of date and time settings" and I suppose that's related to the issue of this topic.

A short question: is geo's patch part of the currently release of StellarMate OS?

Thanks in advance,
Lucian
5 years 6 months ago #29653

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

  • Posts: 554
  • Thank you received: 138
The current sources have the command to detect the StarSense HC and a load of checks for it so it looks as if the patch is in.
I may be able to help with things Celestron because I've been developing the ASCOM driver for the Celestron mounts for many years.
Chris
The following user(s) said Thank You: Lucian Bumbuc
5 years 6 months ago #29676

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

  • Posts: 10
  • Thank you received: 2
Hi all,

I gathered some logs to better explain what's going on.
The config:
- Celestron Advanded X mount
- NexStar + HC
- StarSense HC
- SkySync GPS module
- StellarMate 1.3.0 OS on a RPI 3 B+
- Kstars:
kstars-bleeding/xenial,now 6:2.9.8+201808180747~ubuntu16.04.1 armhf [installed]
kstars-bleeding-data/xenial,now 6:2.9.8+201808180747~ubuntu16.04.1 all [installed,automatic]
kstars-bleeding-dbg/xenial,now 6:2.9.8+201808180747~ubuntu16.04.1 armhf [installed,automatic]
- libindi:
libindi-data/xenial,now 1.7.4~201808180610~ubuntu16.04.1 all [installed,automatic]
libindi-dev/xenial,now 1.7.4~201808180610~ubuntu16.04.1 armhf [installed]
libindi1/xenial,now 1.7.4~201808180610~ubuntu16.04.1 armhf [installed]
libindicator3-7/xenial,now 12.10.2+16.04.20151208-0ubuntu1 armhf [installed]
libindicator7/xenial,now 12.10.2+16.04.20151208-0ubuntu1 armhf [installed]

1. I've connected the StarSense HC, without align. The INDI control panel output was:
2018-09-21T09:20:39: [INFO] Device configuration saved.
2018-09-21T09:20:39: [INFO] Saving device configuration...
2018-09-21T09:20:39: [INFO] Device configuration applied.
2018-09-21T09:20:39: [INFO] Pulse guiding is enabled.
2018-09-21T09:20:39: [INFO] Session log file /home/stellarmate/.indi/logs/2018-09-21/indi_celestron_gps/indi_celestron_gps_09:20:38.log
2018-09-21T09:20:39: [INFO] Loading device configuration...
2018-09-21T09:20:39: [WARNING] Mount does not support retrieval of date and time settings.
2018-09-21T09:20:39: [INFO] Mount is parked.
2018-09-21T09:20:39: [WARNING] Mount firmware does not support track mode.
2018-09-21T09:20:39: [INFO] Starsense controller detected.
2018-09-21T09:20:38: [INFO] Mount model: AVX
2018-09-21T09:20:38: [INFO] Controller version: 1.19
2018-09-21T09:20:38: [INFO] Celestron GPS is online.
2018-09-21T09:20:38: [INFO] Session log file /home/stellarmate/.indi/logs/2018-09-21/indi_celestron_gps/indi_celestron_gps_09:20:38.log
2018-09-21T09:20:38: [INFO] Debug is enabled.

The log is attached as log_starsense.txt

Attachment not found



2. I've connected the NexStar+ HC without align. The INDI control panel output was:
2018-09-21T09:54:01: [INFO] Device configuration saved.
2018-09-21T09:54:01: [INFO] Saving device configuration...
2018-09-21T09:54:00: [INFO] Device configuration applied.
2018-09-21T09:54:00: [INFO] Pulse guiding is enabled.
2018-09-21T09:54:00: [INFO] Session log file /home/stellarmate/.indi/logs/2018-09-21/indi_celestron_gps/indi_celestron_gps_09:54:00.log
2018-09-21T09:54:00: [INFO] Loading device configuration...
2018-09-21T09:54:00: [WARNING] Mount is NOT aligned. You must align the mount first before you can use it. Disconnect, align the mount, and reconnect again.
2018-09-21T09:54:00: [INFO] Mount UTC offset is 2.00. UTC time is 2018-09-21T10:53:58
2018-09-21T09:54:00: [INFO] Mount tracking is off.
2018-09-21T09:54:00: [INFO] Mount is parked.
2018-09-21T09:54:00: [INFO] Mount model: GPS Series
2018-09-21T09:54:00: [INFO] Controller version: 5.29
2018-09-21T09:54:00: [INFO] Celestron GPS is online.
2018-09-21T09:54:00: [INFO] Session log file /home/stellarmate/.indi/logs/2018-09-21/indi_celestron_gps/indi_celestron_gps_09:54:00.log
2018-09-21T09:54:00: [INFO] Debug is enabled.

The log is attached as log_nexstar.txt

Attachment not found



3. I've connected the NexStar+ HC after align. The INDI control panel output was:
2018-09-21T10:04:44: [INFO] Device configuration saved.
2018-09-21T10:04:44: [INFO] Saving device configuration...
2018-09-21T10:04:43: [INFO] Device configuration applied.
2018-09-21T10:04:43: [INFO] Pulse guiding is enabled.
2018-09-21T10:04:43: [INFO] Session log file /home/stellarmate/.indi/logs/2018-09-21/indi_celestron_gps/indi_celestron_gps_10:04:42.log
2018-09-21T10:04:43: [INFO] Loading device configuration...
2018-09-21T10:04:43: [WARNING] Mount does not support retrieval of date and time settings.
2018-09-21T10:04:43: [INFO] Mount is unparked.
2018-09-21T10:04:43: [INFO] Mount model: AVX
2018-09-21T10:04:43: [INFO] Controller version: 5.29
2018-09-21T10:04:42: [INFO] Celestron GPS is online.
2018-09-21T10:04:42: [INFO] Session log file /home/stellarmate/.indi/logs/2018-09-21/indi_celestron_gps/indi_celestron_gps_10:04:42.log
2018-09-21T10:04:42: [INFO] Debug is enabled.

The log is attached as log_nexstar_after_align.txt

Attachment not found



On the other hand, I've read on other threads that is possible to connect via minicom to the mount and issue some commands, by example to query the time/location from the gps module. I have a doc (NexStar_AUX_Commands_10.pdf, author Andre Paquette), with comands accepted by Celestron NexStar.
Unfortunately I've have no idea how to issue the commands, if possible please give me some quick instructions. So far I've tried to use minicom on /dev/ ttyUSB1 (/dev/mount) but I'm stuck in the front of the terminal, no output and I have no idea how to send commands, thanks in advance.
5 years 6 months ago #29680

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

  • Posts: 554
  • Thank you received: 138
I'm not sure about minicom, the only way I communicate with the Celestron mount is using the serial port on the base of the HC. Even the USB port appears as a serial port.
It's possible to communicate with a GPS module if you have one by using the commmands in Andre's document and the AUX bus commands, these are sent using the
int CelestronDriver::send_passthrough(int dest, int cmd_id, const char *payload,
int payload_len, char *response, int response_len)
method.
dest is the device id cmd_id is the command and so on. There's an example of using this in the Pulse Guide command.

Personally I wouldn't bother with getting time or location from the GPS, the HC will connect to the GPS and updaate it's internal time and position. Also some mounts, such as the AVX don't have a GPS but do have a RTC. This can be read in a similar manner as the GPS but with a different device id.
I'm not sure why the time and date can't be retrieved when the mount is aligned. I don't hve a problem doing this. There's a recommendation that the time and location are not updated when the mount is aligned because these are used in calculating the local sidereal time and so changing them affects the alignment.
Looking at the logs both the log_starsense and log-nexstar logs are actually using a starsense HC. I can tell this from the controller version and variant.
The low version number seems to cause the driver to use the low precision 'E' command to get the ra and dec rather than the high precision 'e' command. This is fine with the starsense.
The third does use the nexstar HC. Incidentally earlier version of the HC dn't support the 'm' command and these will give a timeout error. Easy to trap and assume it's not Starsense.
I'm not sure how any of the logs are determining if the mount is aligned, there's a command that will do this - 'J', it returns 0 or 1.
Hope this hurried response helps, I'm going to have to get the QT environment set up and start learning how to debug.
Chris
The following user(s) said Thank You: Lucian Bumbuc
5 years 6 months ago #29691

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

  • Posts: 554
  • Thank you received: 138
I hadn't even tried connecting my AVX to the Pi, didn't anticipate any issues. BIG mistake.

When I tried it things are really strange. Slews are all over the place, the HC produces slew limit exceeded messages, KStrars doesn't display the correct, or expected, mount position. Errors in the status line at the base of KStars but practically nothing in the log files.
It looks as if the serial communication is very unreliable, what messages I do get seem to show lots of timeout errors.

The identical hardware plugged into my Windows machine works perfectly using my ASCOM driver. Not casting stones, just a data point.

What I've done is:
Start mount and do a Quick Align.
Use EKOS to get a connection to the CelestronGPS driver.
Back to KStars and point to various stars and slew to them. I'm currently using Altair and Vega.
The USB to serial interface is a fairly elderly FTDI, it's been rock solid for years.
Will persist some more tomorrow, maybe I will be able to get more out of the logs.

Chris
5 years 6 months ago #29694

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

  • Posts: 554
  • Thank you received: 138
It looks as if the problem is with my hardware.

If I connect the USB to serial adaptor directly to my Pi it's fine, but if I connect the adaptor through a brand new 7 port USB hub then the serial communication seems to be unreliable. I see communcation failures and the mount does some very strange things. I guess that the commands being sent have been corrupted in some way.

Chris
5 years 6 months ago #29696

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

Yes, that was applied long ago. Regarding the time/date, this is the code right here:
 // JM 2014-04-14: User (davidw) reported AVX mount serial communication times out issuing "h" command with firmware 5.28
        // Therefore disabling query until it is fixed.
        // 2017-07-06: Looks like CGE Pro also does not support this
        if (fwInfo.controllerVersion >= 2.3 && fwInfo.Model != "AVX" && fwInfo.Model != "CGE Pro")

So AVX was disabled due to this. Now you can try recompiling this and removing && fwInfo.Model != "AVX" from celestrongps.cpp file to see if it would with your mount, but it was a report by another user that the AVX mout times out. Can you perform such a test and see if the problem remains there?
The following user(s) said Thank You: Lucian Bumbuc
Last edit: 5 years 6 months ago by Jasem Mutlaq.
5 years 6 months ago #29753

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

  • Posts: 10
  • Thank you received: 2
Thanks Jasem!

I will do it today and I'll keep you updated about results.
Lucian
5 years 6 months ago #29806

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

  • Posts: 554
  • Thank you received: 138
I've enabled the 'h' command with my AVX running a StarSense HC version 1.19 and there's no problem reading the time. This isn't a surprise because the HC commands tend to follow the HC type and version, not the mount type.

Chris
5 years 6 months ago #29902

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

Time to create page: 3.223 seconds