Bug 423012

Summary: EKOS - PHD2 sometimes does not see the camera
Product: [Applications] kstars Reporter: TallFurryMan <eric.dejouhanet>
Component: generalAssignee: TallFurryMan <eric.dejouhanet>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: v3.4.3
Sentry Crash Report:

Description TallFurryMan 2020-06-15 13:17:42 UTC
SUMMARY


STEPS TO REPRODUCE
1. Launch PHD2, do not connect equipment
2. Launch Ekos, Telescope and CCD Simulator, PHD2 guider
3. Check whether PHD2 connected the equipment

OBSERVED RESULT

3-5% of the attempts, Ekos cannot connect to the camera. This is possibly due
to the fact that Ekos asks PHD2 to connect *before* the CCD Simulator is
completely connected. Not seen with telescope, maybe because the Telescope is connected prior to Camera?

EXPECTED RESULT

Ekos should make sure devices are fully connected before asking PHD2 to
connect the equipment.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Lubuntu 18.04
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 5.14.1

ADDITIONAL INFORMATION
Comment 1 TallFurryMan 2020-08-24 06:41:43 UTC
This is worked around by https://invent.kde.org/education/kstars/-/commit/11130020b83497e98efaf5ace4fc892283abf652.

If PHD2 fails connecting to the guide camera at first, it will often succeed at the second attempt. Test test_ekos_guide waits long enough to accept one failing attempt, although it is unclear what makes PHD2 fail to connect. There are very rare cases where PHD2 fails to connect twice, and test fails.

In a real-life situation, there is nothing much Ekos can do about a failing guide camera, as most of the time the INDI Profile will *not* contain that sensor. If the camera is working properly, PHD2 will successfully connect at some point.

If the Guide Module is used independently, failure to connect will cause the module to remain unconnected (in terms of devices, not in terms of PHD2 connection).

If the Guide Module is used through the Scheduler Module, Scheduler will attempt to connect multiple times, increasing the chance PHD2 connects.