SGPro fails to connect to LiteCrawler on first power up, connects after LC 2nd power up

I keep getting this error when I turn on the power to my rig and start connecting SGPro to the litecrawler.
I am using the latest driver NiteCrawler Setup 6.2.6939.exe . I have to switch off/on the focuser manually to make SGPro connect.
It does not allow connections on the first power up.I am not sure what is causing this.

The NC is connected to a 10 port A/C power switch and I just turn on the main switch. I use a intel NUC pc which I sometimes power in the same manner or later as I take it away for other uses.

All the other usb devices are connected to the a sabrent USB3 hub. This is also powered at the same time.

I have discussed this with Moonlite folks and they suggested I also ask here as well.

[07/10/19 20:16:44.458][DEBUG] [Main Thread] Disconnecting ASCOM Focuser: ASCOM.NiteCrawler.Focuser
[07/10/19 20:16:56.406][DEBUG] [TEC Thread] TEC Change: Complete…
[07/10/19 20:16:56.406][DEBUG] [TEC Thread] SGM_CHANGE_COOLER_TEMP complete…
[07/10/19 20:27:30.113][DEBUG] [Focuser Thread] SGM_FOCUSER_MOVE_ABS message received…
[07/10/19 20:27:30.114][DEBUG] [Focuser Thread] Focuser moving to 0
[07/10/19 20:27:30.115][DEBUG] [Focuser Thread] ASCOM Focuser: Focuser is null, GetMaxSteps returning 0
[07/10/19 20:27:30.115][DEBUG] [Focuser Thread] ASCOM Focuser: MaxStep is 0. Ignoring this, hopefully bad things don’t follow.
[07/10/19 20:27:30.115][DEBUG] [Focuser Thread] ASCOM Focuser: Focuser is null, GetMaxSteps returning 0
[07/10/19 20:27:30.115][DEBUG] [Focuser Thread] ASCOM Focuser: Focuser is null, GetMaxSteps returning 0
[07/10/19 20:27:30.115][DEBUG] [Focuser Thread] ASCOM Focuser: Error in Move(abs) : Object reference not set to an instance of an object.
at rb.ip(Int32 A_0)
[07/10/19 20:27:37.952][DEBUG] [Focuser Thread] SGM_FOCUSER_MOVE_ABS complete…
[07/10/19 20:27:45.008][DEBUG] [Main Thread] Connecting ASCOM focuser…
[07/10/19 20:27:46.378][DEBUG] [Main Thread] Failed to connect to focuser. : The write timed out.
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at ASCOM.DeviceInterface.IFocuserV2.set_Link(Boolean Value)
at rh.set_Link(Boolean value)
at rb.ii()
[07/10/19 20:27:46.378][DEBUG] [Main Thread] Disconnecting ASCOM Focuser: ASCOM.NiteCrawler.Focuser
[07/10/19 20:27:55.437][DEBUG] [Main Thread] Connecting ASCOM focuser…
[07/10/19 20:27:55.628][DEBUG] [Main Thread] Failed to connect to focuser. : Access to the port ‘COM3’ is denied.
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at ASCOM.DeviceInterface.IFocuserV2.set_Link(Boolean Value)
at rh.set_Link(Boolean value)
at rb.ii()
[07/10/19 20:27:55.628][DEBUG] [Main Thread] Disconnecting ASCOM Focuser: ASCOM.NiteCrawler.Focuser

ASCOM Diagnostics

Create Creating device
Connected Connecting to device
Connected Trying Connected
Connected Trying Link: Access to the port ‘COM3’ is denied.
Error System.UnauthorizedAccessException: Access to the port ‘COM3’ is denied.
at System.Dynamic.ComRuntimeHelpers.CheckThrowException(Int32 hresult, ExcepInfo& excepInfo, UInt32 argErr, String message)
at CallSite.Target(Closure , CallSite , ComObject , Boolean )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at ASCOM.DriverConnect.ConnectForm.btnConnect_Click(Object sender, EventArgs e) in C:\ASCOM Build\Export\ASCOM.DriverConnect\ConnectForm.cs:line 260
Dispose Disposing of device
Dispose Completed disposal
ReleaseComObject Releasing COM instance
ReleaseComObject Completed release. Count: 0
GC Collect Starting garbage collection
GC Collect Completed garbage collection

There are some strange things shown in the SGP log fragment:
The first message shows that SGP has disconnected from the focuser.
After this there are messages showing that SGP is continuing to try to control the focuser. These all fail because the focuser is not connected. No surprise there.

Then there seem to be further disconnect and connect attempts, the connect fails because the serial connection to the focuser hardware has failed - the access denied message. This is usually because something is already connected, or because of a problem with the USB port.
The ASCOM diagnostice shows the same thing.

How do you recover from this? And is there a sequence of operations that will reliably generate the problem. I don’t see it.

Full logs are essential, not just the SGP log but the driver log for the same time as the SGP log. That would allow me to correlate what SGP thinks it is doing with what the driver thinks is happening.

I noticed another behavior which I believe is a factor. My usual startup routine is to connect the telescope using Celestron PWI software cum driver and then SGP and that is where I found SGP not connecting to Litecrawler. But when I start SGP first and connect to camera/Litecrawler focuser+rotator and then start CPWI software , the LiteCrawler connects easily but the CPWI complains that it cannot connect via the Starsense hand controller. At this point I just have to pull out the usb cable from the hand controller and put it back.

In both scenarios there is a manual step involved in disconnecting and connecting which prevents from adopting a remote power up of the gear and software.

I’ve tried as close to your setup as I can get - an AVX running CPWI through the HC. I don’t have a USB HC so am using a RS232 connection and a FTDI RA232 to USB adaptor, this is using COM3
I’m also using a NiteCrawler, not a LiteCrawler.

I tried this start sequence

  • PC on
  • Connect mount serial and NC USB
  • Mount on
  • CPWI, Quick align through HC
  • NC on
  • Start SGP
  • Select NC and CPWI drivers
  • check NC properties - COM7 Start NC driver
  • Start CPWI driver

This all works, I can control both the NC and the mount through SGP using the ASCOM interfaces.

There isn’t much more I can suggest other than what i did in my first reply.

I have changed the startup sequence, I start SGP and connect all the devices except the telescope CPWI software. Then after I start the Celestron CPWI and unpark the mount , I connect SGP with the Telescope and i dont have to manually turn off either the mount or the LiteCrawler to make it work. I do feel the CPWI software sometimes does not play nicely with other software/devices when It comes to accessing the ports.