Sharpcap dropping connection with Synscan App

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]
User avatar
admin
Site Admin
Posts: 13350
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Sharpcap dropping connection with Synscan App

#11

Post by admin »

Hi,

you can certainly see the log in SharpCap (Help menu, then 'Show Log'). You can even turn on addition logging of all sorts of things in the settings, but if this is happening with SharpCap just running and idle, then there won't be much in the log - just various stuff that gets recorded during startup and camera/hardware detection.

How much memory does your system have? I am wondering if this could be a memory issue... Running SharpCap, even if it is just sitting there will use more memory, and on a low memory system that could push the operating system to swap memory out to disk/ssd, which can cause slowdowns/jerkiness and would tie in with low CPU usage.

cheers,

Robin
gateway
Posts: 8
Joined: Wed Mar 01, 2023 12:13 pm

Re: Sharpcap dropping connection with Synscan App

#12

Post by gateway »

Hello Robin,

having 16GB and nearly half of it is free when the issue occurs. No change after some time...

I will investigate log files tomorrow, maybe I can find something useful.
I also have some other people around me having troubles with various kinds of laptops and the AZ-GTI in combination with Sharpcap and also Stellarium.
Will also ask for log file information from them.

All the best,
Philipp
markoz81
Posts: 3
Joined: Wed May 31, 2023 8:41 am

Re: Sharpcap dropping connection with Synscan App

#13

Post by markoz81 »

Hello. I have the exact same problem.
I am connected to my mount via the Synscan app over a wifi connection. The connection is very stable. I use the Ascom synscan app driver which theters to the running synscan app.
All works well for a while but then the ascom driver can’t communicate with the synscan app.

If I disconnect the mount from sharpcap and close the synscan app then reopen the app and connect the mount again in sharpcap (by checking the connected box) all works well for a while, but then after a minute or two the same thing happens.
Those problems seem to happen less frequently when the mount is connected via a cable.

But the interesting part is I don’t belive it’s a problem with sharpcap or the Ascom driver.
I belive the problem lies in the synscan app.

In the synscan app under settings -> connect settings there is a section called Connection to this app.
There you can input the port numbers for synscan app protocol port, synscan communication protocol port and stellarium protocol port.

I found out that when you fucus on the input box and change a number there and then leave the input box the server that is listening to that port gets restarted.
There is also a label for each port saying Server started.
I belive this is a server hosted inside the synscan app itself which is listening for connections.
Althoug it says Server started it is realy not.
If you go and change the port number for the Synscan app protocol port from the default 11881 to 11883 and leve the input field the internal server in the synscan app gets restarted and listens to connection on that port you specified.
When you change it back to 11881 and leave the input box it gets restarted again and listens on that port.
The moment you do this ascom driver picks up the connection again and so does Sharpcap because it’s using the ascom synscan app driver.
But again after a few minutes the whole thing repeats again.

This is obviously not a solutin nor an acceptable workaround but it can help to pinpoint where the problem lies.

I will report my findings to skywatcher support, I realy don’t know who to conntact. So if anyone has an email or a contact I could reach out to, please let me know.

If someone has an idea what could be done on the host operating system running the synscan app so that it wouldn’t stop listening for connections on that port please let me know. I tried changing it to a different port and set that port also in the synscan driver but it didn’t help. It got disconnected again after few minutes.

I hope this helps to clarify where the isue exists at least.
User avatar
admin
Site Admin
Posts: 13350
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Sharpcap dropping connection with Synscan App

#14

Post by admin »

Hi,

that sounds like good detective work regarding the Synscan server stopping intermittently. If it's really doing that then nothing we try on the SharpCap or ASCOM server side will fix the issue :(

I think you can confirm whether something is listening on a port on Windows by running 'netstat -aon' in an administrative command prompt. That should list ports that are being listened on as well as other network connection info, although you only get a process ID so have to cross-check back to Task Manager to check which process is which.

As to reporting the issue - Skywatcher have a 'support' form here : http://skywatcher.com/contact/ . It might also be possible to get to them via their social media pages - just send them a message asking how you can report a possible bug.

I'm old fashioned and still run EQMOD to control my NEQ6 mount (via USB-serial), and that doesn't suffer from this sort of issue.

cheers,

Robin
User avatar
masahico
Posts: 1
Joined: Mon Jun 06, 2022 6:10 am

Re: Sharpcap dropping connection with Synscan App

#15

Post by masahico »

Hi

Me too I've met this bug with synscan (up to date, v2.4.8 and driver 1.4). I think it's a combo of both driver and app.

To save my night, I've tried to change my driver for older version that I have, but didn't succeed. For the app, I returned to v1.19.20. Tho it's not perfect, even if sharpcap doesn't freeze anymore, I've met some drop connection with phd2 (pulse guiding, not ST4). Not enough to kill connexion, but to introduce high peak while guiding ...

The more synscan evolve, the less is stable ...

Now I'm done with it, for the next session I will try GS server.
AlSterling
Posts: 1
Joined: Wed Feb 14, 2024 10:47 pm

Re: Sharpcap dropping connection with Synscan App

#16

Post by AlSterling »

Hopefully this solution works for Sharpcap users - it solved the dropping with SkySafari.
You must keep SynscanPro app open, i.e. not let it go to sleep. Some phones have a "keep open" option. My Android tablet did not, but when I have Synscan open in split screen mode, then the connection does not drop. Annoying to lose 1/3 screen real estate, but that's better than running a timer every 14 minutes to bring Synscan back to the front. Thanks to the SkySafari folk for sleuthing this.
Clear skies and bolides!
EduardoG
Posts: 3
Joined: Sat Aug 12, 2023 11:57 pm

Re: Sharpcap dropping connection with Synscan App

#17

Post by EduardoG »

Hi Robin,
I've also been trying to figure out what causes the Synscan app protocol server to crash when I connect to the mount via wifi. I connect Sharpcap 4.1 64bit to ASCOM Remote, to latest ASCOM Synscan driver and finally Synscan 2.4.18 (or any 2.4.x version). ASCOM Remote lets me see the request from Sharpcap, the JSON response and timeouts when the synscan server crashes. The connection is stable if Synscan runs on Android or Sharpcap isn't connected to the mount. Nothing stands out other than the rate of requests coming from Sharpcap. I wonder if Synscan server somehow gets overwhelmed with the number of requests and crashes

Is it possible to change (lower) the request frequency in Sharpcap? It might help to make Synscan more stable.

Thanks
Eduardo
User avatar
admin
Site Admin
Posts: 13350
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Sharpcap dropping connection with Synscan App

#18

Post by admin »

Hi,

yes I could add some configuration to reduce the frequency - right now SharpCap updates the mount state about 2x per second (RA,Dec,Alt,Az,Tracking,Park,Slewing,etc). I suspect that going to 1x per second wouldn't have much impact on usability anyway. Going beyond that might be an issue as there are some places where other code 'knows' that it needs to wait about 1s before being sure that the mount status has updated.

cheers,

Robin
User avatar
admin
Site Admin
Posts: 13350
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Sharpcap dropping connection with Synscan App

#19

Post by admin »

Hi,

for the next update I have made the refresh rate configurable, but only via a spot of registry editing, as I'd like to be sure this has a positive impact on the issue before putting options into the UI for it.

Go to this registry key

HKEY_CURRENT_USER\Software\AstroSharp Limited\SharpCap\4.1\misc

In that key, create a new string (REG_SZ) value called "Hardware.MountRefreshInterval"

Set the value of the new key to to the interval that you would like - the supported range is 0.5 to 2.0 seconds, so if you want a refresh every second, enter 1.0 as the value of the key.

Some parts of the code now scale how long they wait for the mount to update its state based on that value, so if you change from the default of 0.5s interval to 1.0s, in some places a 1s wait becomes 2s, etc.

cheers,

Robin
EduardoG
Posts: 3
Joined: Sat Aug 12, 2023 11:57 pm

Re: Sharpcap dropping connection with Synscan App

#20

Post by EduardoG »

Hi Robin,
Thanks for the quick turnaround! I'll wait for the next update and give this a try.
Cheers
Eduardo
Post Reply