Sharpcap doesn't retrieve Celestron focuser position

A place to report problems and bugs in SharpCap
Forum rules


If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs

Please also read about Troubleshooting USB Issues before posting.

*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***

Please include the following details in any bug report:

* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
Post Reply
clouzot
Posts: 46
Joined: Thu Aug 08, 2019 11:13 am

Sharpcap doesn't retrieve Celestron focuser position

#1

Post by clouzot »

Hi Robin,

An unexpected behavior in some of the latest versions of Sharpcap (including the latest one).

The Celestron Motor Focuser can be accessed through various means in Windows:
- its own USB ASCOM driver (provided the focuser is connected to the PC through USB)
- an ASCOM driver exposed by CPWI (Celestron's mount modeling and planetarium software) provided the focuser is connected to the mount via its Aux port

I tried to connect Sharpcap through CPWI's ASCOM driver. Sharpcap connected but reported a focuser position of 0.

Oddly enough, Sharpcap could connect to the focuser's own USB ASCOM driver and reported the correct position.

Even more strange, I grabbed the first ASCOM client I could think of (N.I.N.A), and verified it could connect to the CPWI focuser driver and reported its position.

Celestron claims that their driver passed the ASCOM conformance checks, and they saw in the logs that Sharpcap doesn't ask the driver the focuser position. While I know Sharpcap is working correctly with other drivers (Celestron USB, ASCOM simulator...)

So... (hoping I'm not starting a blame-game!) do you see anything in the code, or in possible drivers responses, that could somehow block Sharpcap from asking the driver position?

I'm attaching two ASCOM logs: the one for Sharpcap (where it doesn't ask for the position), and the one from NINA (where position was retrieved successfully).

Thanks!
Attachments
ASCOM_Focuser_log_SharpCap_2020_02_11_0.txt
(1.3 KiB) Downloaded 93 times
ASCOM_Focuser_log_NINA_2020_02_11_0.txt
(16.77 KiB) Downloaded 84 times
clouzot
Posts: 46
Joined: Thu Aug 08, 2019 11:13 am

Re: Sharpcap doesn't retrieve Celestron focuser position

#2

Post by clouzot »

Robin,

The Celestron firmware engineer, Derik, who also manages the development of CPWI, asked if you could be in touch with him so as to try and debug what could be happening between Sharpcap and their hardware driver. He gave his email address so I could pass it on to you, so I sent that in a PM.

He also asked me to share Celestron's driver ASCOM conformance check, thinking that maybe some crucial information would help untangling the mystery. I also attached the two logs I got from Sharpcap and NINA when they connect to said focuser. Sharpcap seems to be stopping quite early compared to the other program.
Focuser_Evolution_Wifi.txt
(4.67 KiB) Downloaded 90 times
ASCOM_Focuser_log_NINA_2020_02_11_0.txt
(16.77 KiB) Downloaded 92 times
ASCOM_Focuser_log_SharpCap_2020_02_11_0.txt
(1.3 KiB) Downloaded 100 times
Thanks!
User avatar
admin
Site Admin
Posts: 13177
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Sharpcap doesn't retrieve Celestron focuser position

#3

Post by admin »

Hi,

First things first… I think you be very useful if you could send me the SharpCap logs that show what SharpCap thinks it doing in talking to that particular focuser driver. Maybe there will be some sort of error in those logs that could easily explain and point to the solution of the problem.

Two get the best quality logs, please first make sure you are using the very latest version of SharpCap from the downloads page. Run SharpCap and go straight to the settings dialog and turn on the option near the bottom of the page titled 'record extra information in the log troubleshooting'. Once you've done this, open your camera and connects to the troublesome Ascom driver. That should be enough to get useful info into the log – you can show the log itself from the help menu and then please post the content to me here.

Cheers, Robin
clouzot
Posts: 46
Joined: Thu Aug 08, 2019 11:13 am

Re: Sharpcap doesn't retrieve Celestron focuser position

#4

Post by clouzot »

Hi Robin,

attached is the requested log.
sclog_focuser.txt
(47.78 KiB) Downloaded 98 times
The driver seems to be returning 0s when asked for some information. Odd.
User avatar
admin
Site Admin
Posts: 13177
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Sharpcap doesn't retrieve Celestron focuser position

#5

Post by admin »

Thanks for that log, I think I understand what is going on now.

It looks like the Ascom driver for this device is reporting being connected immediately after its creation. That's unusual – most Ascom drivers need to be told to connect before they report that they are connected. If that's the case (and it's the only thing I can think of that fits with all the logs that I've seen so far) then it would be causing SharpCap to skip some of the necessary initialisation to get the focuser working correctly.

I can put a workaround in the next update for SharpCap 3.2 that should deal with this particular quirk.

Cheers, Robin
donstim
Posts: 128
Joined: Wed Sep 19, 2018 5:35 am

Re: Sharpcap doesn't retrieve Celestron focuser position

#6

Post by donstim »

Robin,
From the Celestron firmware engineer prior to your latest post:

"I have additional information.

After SmartCap creates an instance of the driver, it checks the Connected property.

CPWI's ASCOM focuser driver will report Connected=True if CPWI is running and if CPWI has found a focuser on your system. Otherwise it reports false.

If SmartCap discovers that Connected = False, then it will set connected = true. It will then work normally.
If SmartCap discovers that Connected = True, then it will do nothing correctly after that. It seems the process of setting the Connected property to True, is required to make SmartCap function correctly. This is errant behavior.

To test this theory, I modified my driver so that it would report false until CPWI had found the focuser hardware AND the ASCOM client had set the Connected Property to true. And SharpCap works with CPWI normally after that.
Special thanks to Daniel who suggested this I try the above work around.


Unfortunately, this will need to be fixed by the SharpCap people. I can't leave the driver in this condition for a public release."
User avatar
admin
Site Admin
Posts: 13177
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Sharpcap doesn't retrieve Celestron focuser position

#7

Post by admin »

Hi,

Well I have made the adjustment since it wasn't very hard, but I think that the Celestron people have got things wrong here. As you noticed, any Focuser driver that behaves in the way that theirs does will not work with SharpCap. Having just looked I can see that over 60 different types of focuser have been used by SharpCap users within the last seven days – if they all behaved like the Celestron focuser then none of them would have worked and surely someone would have reported that by now (many times in fact!). I think we can confidently say that the approach taken by Celestron looks to be in a minority of one :)

Sadly, as is typical for Ascom issues, the standards do not actually specify whether a device should be put in the connected state or not when it is first created by a piece of software.

Cheers, Robin
clouzot
Posts: 46
Joined: Thu Aug 08, 2019 11:13 am

Re: Sharpcap doesn't retrieve Celestron focuser position

#8

Post by clouzot »

Thank you Robin, I appreciate your taking the time to fix this issue (and your commitment to your users, more generally speaking)
I’ll pass on your comments to Celestron.
Looking forward to the next release!
Post Reply