indi icon indicating copy to clipboard operation
indi copied to clipboard

celestrongps.cpp with Nexstar 6SE mount: improperly supported/unsupported features

Open dmallett03 opened this issue 6 months ago • 3 comments

The indi_celestron_gps driver reports that the "mount firmware does not support track mode" and "mount firmware does not support getting peer side". These messages are shown in kstars' Indi Control Panel's message window when starting the service (example: Run Celestron Nexstar HC Service in kstars). I am not sure about the peer side, but the mount does support tracking, and I would expect it to show up as supported. This affects indi_celestron_gps version 3.6 (and many previous ones I've tried). I am using ubuntu 20.04. Additionally, the Nexstar 6SE mount can correctly track an object by default, however using the Indi Control Panel's Motion Control buttons (as to center the object) correctly moves the mount, but the mount stops tracking and drifts afterwards. One way to restore tracking is to disable and re-enable tracking in the INDI Control Panel's Main Control page. The code shows exceptions for many models, but my guess is that the driver has been written for an older "Nexstar" model (as per before the release of the Nexstar xSE). I can test corrected versions of the code if need be.

dmallett03 avatar Jun 18 '25 22:06 dmallett03

Ubuntu 16.04? Are you sure about that?

knro avatar Jun 19 '25 04:06 knro

Hm. Correction: Ubuntu 20.04 LTS (I used to have 16.04 LTS, but updated) and the other system is an Astroberry Pi 4. Both behave the same.

dmallett03 avatar Jun 19 '25 13:06 dmallett03

@knro : Thank you very much for looking at this issue. In the meantime, in order to have a semi-working setup, I use a workaround where I force a Tracking Enable call at then end of the Sync routine in the driver (celestrongps.cpp). My working sequence is: align mount (tracking is enabled by default), move to the object I want to observe (through KStars), center the object remotely through the INDI Control Panel's Move buttons, and once the object is centered, I select (KStar's Celestron Telescope's right-click) "Sync" option to have the object and KStar's crosshairs match. There, as mentioned above, I added a Tracking Enable call at the end of the Sync function, so tracking is restored after the Sync. Since this is a cheap and dirty work-around, it eventually stops working (after about after 5 object change sequences described above), so I'm looking forward to a permanent, more robust soution.

dmallett03 avatar Jun 27 '25 22:06 dmallett03

This issue has been inactive for 60 days and is being marked as stale.

github-actions[bot] avatar Aug 27 '25 02:08 github-actions[bot]

This issue has been closed due to inactivity.

github-actions[bot] avatar Sep 04 '25 02:09 github-actions[bot]

Why has this isdue been closed? It was never adressed.

dmallett03 avatar Sep 05 '25 12:09 dmallett03

It was closed due to inactivity. No developers picked up the issue, and I don't have time for it. If you can inspect the code and find the issue, or at least point to where it can be then maybe we can look further into it.

knro avatar Sep 05 '25 13:09 knro

Thanks for your reply. In order to better understand the code, could you please provide the sources for the information used to select the mount's features below ?

The changes below allow my mount to resume tracking after a manual displacement or a goto operation, but I'd need more information to better implement a solution.

I am using the celestrongps.cpp file version described as: setVersion(3, 6); // update libindi/drivers.xml as well

In the following code snippet, my mount does not return a version higher than 3.2. Is version 3.2 valid for a Nexstar SE, or is it for another (previous, maybe?) version of the Nexstar ? As it is now, i get a message saying that tracking and sync are not supported.

bool CelestronGPS::checkMinVersion(double minVersion, const char *feature, bool debug) { if (((fwInfo.controllerVariant == ISSTARSENSE) && (fwInfo.controllerVersion < MINSTSENSVER)) || ((fwInfo.controllerVariant == ISNEXSTAR) && (fwInfo.controllerVersion < minVersion))) { if (debug) LOGF_DEBUG("Firmware v%3.2f does not support %s. Minimum required version is %3.2f", fwInfo.controllerVersion, feature, minVersion); else LOGF_WARN("Firmware v%3.2f does not support %s. Minimum required version is %3.2f", fwInfo.controllerVersion, feature, minVersion);

    return false;
}
return true;

}

My (cheap and dirty) work-around is to do the followng:

In the following part, I had to force the enabling of the Sync feature. I kept your comment a few lines above the change I made. Maybe it's related. Where did you get the information saying the minimum version to enable sync is 4.1 ?

    // JM 2018-09-28: According to user reports in this thread:
    // http://www.indilib.org/forum/mounts/2208-celestron-avx-mount-and-starsense.html
    // Parking is also supported fine with StarSense
    if (checkMinVersion(2.3, "park"))
        cap |= TELESCOPE_CAN_PARK;

// Force enabling Sync // if (checkMinVersion(4.1, "sync")) if (checkMinVersion(1.0, "sync")) cap |= TELESCOPE_CAN_SYNC;

Same here. Where did we get version 2.3+ for track mode ?
my mount does not report version 2.3+ or better, but tacking is definitely supported.

    // Track Mode (t) is only supported for 2.3+
    CELESTRON_TRACK_MODE ctm = CTM_OFF;

// DM: Allow Track Mode // if (checkMinVersion(2.3, "track mode")) if (checkMinVersion(1.0, "track mode"))

In the following, I also had to force track mode when in Alt-Az, een though my mount can track even in Alt-Az mode. Wondering why track mode would be disabled in Alt-Az...

// if (fwInfo.celestronTrackMode != CTM_ALTAZ) if (1) cap |= TELESCOPE_HAS_TRACK_MODE; else ...

Below, I had to force Alt-Az tracking.

    //GUIDE Update properties.
    // check if the mount type and version supports guiding
    // Only show the guide information for mounts that
    // support guiding.  That's GEMs and fork mounts in equatorial modes.
    // well, anything in an equatorial mode
    if (fwInfo.celestronTrackMode == CELESTRON_TRACK_MODE::CTM_EQN ||
            fwInfo.celestronTrackMode == CELESTRON_TRACK_MODE::CTM_EQS ||

// DM: Allow Alt-Az tracking: fwInfo.celestronTrackMode == CELESTRON_TRACK_MODE::CTM_ALTAZ || fwInfo.celestronTrackMode == CELESTRON_TRACK_MODE::CTM_RADEC)

Below I added a call to unsync at the beginnning of the Goto call, as recommended in the Celestron manual:

bool CelestronGPS::Goto(double ra, double dec) { targetRA = ra; targetDEC = dec; // Unsync: driver.unsync(); ...

And force tracking back on at the end of the CelestronGPS::Sync call

... SetTrackEnable(true); TrackState = SCOPE-TRACKING; return true; }

dmallett03 avatar Sep 16 '25 00:09 dmallett03

What version is reported by your mount?

knro avatar Sep 16 '25 04:09 knro

Telescope and mount: Celestron NexStar SE, paddle is NexStar+. Mount Model is NexStar 6/8 SE Paddle shows firmware HC:NXS 5.35.3177 and MC:5.14 5.14

In KStars, I select Celestron NexStar HS from the Devices list.

The Driver loads with the following messages: 2025-09-16T19:35:06: [INFO] Updating location is not necessary since mount is already aligned. 2025-09-16T19:35:06: [INFO] Updating time is not necessary since mount is already aligned. 2025-09-16T19:35:06: [INFO] Mount UTC offset: -3.00. UTC time: 2025-09-16T18:35:30. DST: On 2025-09-16T19:35:06: [INFO] Mount does not support guiding. Tracking mode must be set in handset to either EQ-North or EQ-South. 2025-09-16T19:35:06: [INFO] Mount is unparked. 2025-09-16T19:35:06: [INFO] Mount is unparked. 2025-09-16T19:35:06: [WARNING] Mount firmware does not support track mode. 2025-09-16T19:35:05: [WARNING] Mount firmware does not support getting pier side. 2025-09-16T19:35:04: [INFO] Mount model: 6/8 SE 2025-09-16T19:35:04: [INFO] Controller version: 5.35 2025-09-16T19:35:04: [INFO] Celestron NexStar HC is online.

What worries me are the messages saying: 2025-09-16T19:35:06: [INFO] Mount does not support guiding. Tracking mode must be set in handset to either EQ-North or EQ-South. and 2025-09-16T19:35:06: [WARNING] Mount firmware does not support track mode. 2025-09-16T19:35:05: [WARNING] Mount firmware does not support getting pier side.

I know for a fact that the mount supports Tracking/track mode in Alt-Az mode (when used in stand-alone). I don't know about the pier side message.

The Connection applet shows: Name: Celestron GPS Exec: indi_celestron_gps Version: 3.6 Interface: 5

The Mount Info applet shows: Model: 6/8 SE hC Version: 5.35 Ra Version: 5.14 Dec Version: 5.14 Mount Type Fork (but my mount is a single arm) Guide Method: Time Guide Has Focuser: False (which is OK)

Hoping this answers your question. Regards, Daniel

dmallett03 avatar Sep 16 '25 19:09 dmallett03

Thank you for the detailed response. This is odd, because in the code, we have this:

bool CelestronGPS::checkMinVersion(double minVersion, const char *feature, bool debug)
{
    if (((fwInfo.controllerVariant == ISSTARSENSE) &&
            (fwInfo.controllerVersion < MINSTSENSVER)) ||
            ((fwInfo.controllerVariant == ISNEXSTAR) &&
             (fwInfo.controllerVersion < minVersion)))
    {
        if (debug)
            LOGF_DEBUG("Firmware v%3.2f does not support %s. Minimum required version is %3.2f",
                       fwInfo.controllerVersion, feature, minVersion);
        else
            LOGF_WARN("Firmware v%3.2f does not support %s. Minimum required version is %3.2f",
                      fwInfo.controllerVersion, feature, minVersion);

        return false;
    }
    return true;
}

So the log should indicate what firmware version it detected versus the firmware version required, but this is not shown in your logs. This could mean your installation of INDI is probably old. You might have a rouge INDI installation under /usr/local as well.

knro avatar Sep 17 '25 06:09 knro

Hello and thanks for your reply. The INDI installation and driver have been recompiled. I can change the version of the driver number from 3.6 to 3.7 and the version displayed in KStars is 3.7, so no rogue driver. Please note that the NexStar telescope series has been around for a while, and the NexStar 6/8 SE (for Second Edition, I guess) might be more recent than the one used when writing the Driver. Possibly the firmware version structure has changed between NexStar versions (?).

The FirmwareInfo from celestrondriver.h looks ike below. Note the commented line.

typedef struct { std::string Model; std::string Version; //std::string GPSFirmware; std::string RAFirmware; std::string DEFirmware; double controllerVersion; char controllerVariant; bool isGem; bool canPec; bool hasHomeIndex; bool hasFocuser; CELESTRON_TRACK_MODE celestronTrackMode; } FirmwareInfo;

I uncommented the "//std::string GPSFirmware;" and read back:

2025-09-18T00:03:19: [INFO] Updating location is not necessary since mount is already aligned. 2025-09-18T00:03:19: [INFO] Updating time is not necessary since mount is already aligned. 2025-09-18T00:03:19: [INFO] Mount UTC offset: -3.00. UTC time: 2025-09-16T23:19:39. DST: On 2025-09-18T00:03:19: [INFO] Mount supports guiding. 2025-09-18T00:03:19: [INFO] Mount is unparked. 2025-09-18T00:03:19: [INFO] Mount is unparked. 2025-09-18T00:03:19: [WARNING] Mount firmware does not support getting pier side. 2025-09-18T00:03:17: [INFO] Mount model: 6/8 SE 2025-09-18T00:03:17: [INFO] Controller version: 5.35 2025-09-18T00:03:17: [INFO] Celestron NexStar HC is online.

Which makes a bit more sense.

I'll need a bit of clear sky to verify the behavior. I'll return with results. Regards, Dan

dmallett03 avatar Sep 18 '25 00:09 dmallett03

Please toggle Driver Debug and then send the logs with the log enabled to see all the DEBUG messages.

knro avatar Sep 18 '25 04:09 knro

indi_celestron_gps_13:11:06.log this is after activating the commened line in celestrondriver.h.

indi_celestron_gps_13:22:06.log This is with the line commented out, as it originally was.

dmallett03 avatar Sep 18 '25 13:09 dmallett03

I don't see the warning about Track Mode in either log?

knro avatar Sep 18 '25 13:09 knro

Indi_Celestron_Gps_Tracking.zip

My aologies. I left the modifications (described in an earlier message) to enable Sync and Track Mode in celestrongps.cpp.

I now have replaced the celestrongps.cpp file with the original and generated 2 new logs.

indi_celestron_gps_19:49:44_Commented.log: this is the log file with the original celestrondriver.h with the commented out "//std::string GPSFirmware;" line.

indi_celestron_gps_19:27:04_Uncommented.log: This is the log file with the uncommented "std::string GPSFirmware;" line.

To see if the commented/uncommented line in celestrondriver.h file had any effect, I also generated logs with the modifications with both the commented and uncommented line in celestrondriver.h.

The warning is present in both cases. WARNING 19.414419 sec : Mount firmware does not support track mode. So the commented/uncommented line does not seem to have much of an effect, but I find it suspicious that the entry causing the problem is on that line.

Why are we getting this warning, then ?

For the sake of completeness, I added the logs with the modification (described earlier) that forces Track Mode.

indi_celestron_gps_20:18:49_UncommentedPlusMods.log: As the title says, uncommented plus modifications.

indi_celestron_gps_20:42:41_CommentedPlusMod.log: And commented plus modifications.

dmallett03 avatar Sep 18 '25 21:09 dmallett03

Please check the update driver and let me know if it fixes the issue.

knro avatar Sep 19 '25 05:09 knro

indi_celestron_gps_21:22:25.log

Thank you very much. Since I am not sure how to use pull, I downloaded the entire project branch and recompiled. Hoping this is OK. I am attaching the log file. I'll try it out as soon as i can and let you know how it went.

dmallett03 avatar Sep 19 '25 23:09 dmallett03

Sunday Test with actual stars: With the new code you provided, the original problem persists (tracking stops as soon as i use the remote buttons from the indi control panel page).

Monday update: Test during day, not actually looking at stars: I re-recompiled the new code you provided and I noticed the RA-DEC values varied a bit after moving the scope with the Indi Control Panel motion control buttons. I went to kstars and right-clicked on the Celestron pointer, selected "Sync" and saw the RA and DEC stay constant even after moving with the Indi Control Panel motion control, which I believe is good news.

I will check with actual stars, but we're in a cloudy/rainy sequence for the next few days... Thanks for your great help.

dmallett03 avatar Sep 22 '25 01:09 dmallett03

We finally had a bit of clear sky, so I was able to test the updated driver. I am very happy to say that I was able to correctly track objects. Note that there is a small drift after fine positioning with the Indi panel movement buttons, but correct tracking can be restored by right-clicking the object and selecting the Celestron Nexstar's Sync option. Thank you very much for your great help.

dmallett03 avatar Sep 30 '25 12:09 dmallett03