Dear INDI Forum,

First of all, thank you guys for putting such an awesome piece of open source software. The ability to integrate kstars / ekos into the computer and operating system I prefer is a tremendous benefit compared to vendor released software that are often bound to a given operating system (most likely windows), which is such a presumptions limitation on end users (if it's not for the closed source, binary only libASI, I'd be running my imaging rig on FreeBSD, but oh well, one battle at a time).

I'm posting on this forum because I ran unto a strange behavior on my EQ6-R Pro mount using the built in USB port. I searched this forum and indi-3rdparty github issues and didn't find similar reports. In short, if I connect to the built in USB port using eqmod driver, and issue a manual slew command using the mount control pad under the "Mount" tab in Ekos, the mount slews accordingly. However when I let go of the slew button, the mount would come to a complete stop, but all the sudden starts to slew again in the same direction. The second slewing is accompanied with a rather disturbing, grinding noise. Hitting the "Stop Motion" button in the control panel has no effect. The only way to stop the motion is to turn off the mount.

Interestingly, if I instead connect the USB cable to the hand controller under PC Direct mode, the problem is then no more. All mount control operations work properly. But I would very much like to get rid of the hand control. Alternatively, if I use the SynScan app downloaded from SkyWatcher website, everything works fine even if I'm connected directly to the on-board USB port. I also tested the EQMod ASCOM driver (downloaded from sourceforge), which also works fine using the onboard connection.

This led me to believe that the issue is with INDI or indi-eqmod driver. Using socat, I was able to log the serial communications between my computer and the mount under three different setups: 1) using SynScan app and on-board USB port; 2) using INDI and hand-controller USB port; and 3) using INDI and on-board USB port (where things don't work). I've attached these logs (pretty-printed using a python program I wrote. First column is what got sent to the mount; second column is what the mount responded; things after "#" are my annotations). In brief, I noticed that, with INDI setup, after I let go of the slew button, the motor would come to a stop as requested by the driver. But somehow another Motion Start (J1) command is sent again to the mount, which is immediately followed by a MotionStop command (K1). This is somehow tolerated if the hand controller is used, but causes the motor to spin out of control if connected directly to the on-board USB (even the motor status command (f1) is getting "motor is stopped" response as the axis rotates). This is also evidenced by the INDI log:

2022-08-26T05:04:54: [INFO] EQMod Mount is offline.
2022-08-26T05:04:43: [INFO] West Slew stopped
2022-08-26T05:04:43: [INFO] Starting West slew.
2022-08-26T05:04:41: [INFO] West Slew stopped
2022-08-26T05:04:39: [INFO] Starting West slew.

2022-08-26T05:04:26: [INFO] Observer location updated: Latitude 40:45:23.0 (40.76) Longitude -111:53:27.0 (-111.89)
2022-08-26T05:04:26: [INFO] Observer location updated: Latitude 40:45:23.0 (40.76) Longitude -111:53:27.0 (-111.89)
2022-08-26T05:04:26: [INFO] Setting UTC Time to 2022-08-26T05:04:26, Offset -6
2022-08-26T05:04:26: [INFO] Observer location updated: Latitude 40:45:23.0 (40.76) Longitude -111:53:27.0 (-111.89)
2022-08-26T05:04:26: [INFO] Mount is unparked.
2022-08-26T05:04:26: [WARNING] Init() : Setting both ST4 guide rates to 0.5x (2)
2022-08-26T05:04:26: [WARNING] Init() : Setting default Init steps -- RAInit=8388608 DEInit = 8388608
2022-08-26T05:04:26: [WARNING] Init() : Motors already initialized
2022-08-26T05:04:26: [INFO] Mount has PPEC.
2022-08-26T05:04:26: [INFO] EQMod Mount is online.
2022-08-26T05:04:26: [INFO] Successfully connected to EQMod Mount.

I started to dig into the indi-eqmod driver code, but didn't find any immediate culprits. Since the driver pretty much only implements callbacks, I start to wonder if it's within the INDI framework where the second Start slew command is being scheduled. But I'm not familiar with the INDI code base at all so my judgement is most likely poor on this one.

Let me know if you have any follow up questions. I'd love to help in ways I can to nail this bug. Getting rid of the hand-controller would be much appreciated since it creates additional cable clutter, and I have to go through the initial screens to turn on Direct PC mode every time I turn on the mount, which is such a chore.

Some technical details:
Operating System: Ubuntu Server LTS 22.04
Kernel Version: 5.15.0
KStars version: 3.6.0 via the "kstars-bleeding" mutlaqja/ppa package
INDI version: 1.9.7 via mutlaqja/ppa package
indi-eqmod version: compiled from indi-3rdparty github repository v1.9.6 tag (the binary package from mutlagja/ppa crashes for some reason so I compiled from scratch)
USB-to-Serial chip: PL2303
Mount firmware version: 3.25

Read More...