kevinferrare / arduino-st4

A PC-Telescope interface built around an arduino
90 stars 25 forks source link

Only 1 program can be connected to the Arduino trough the ASCOM driver #4

Open grozmaistor opened 6 years ago

grozmaistor commented 6 years ago

Only one program for instance Skycharts or PHD can be connected at a time, while the idea of ASCOM is to have the possibility to connect many via the ASCOM driver.

As I see it, the driver should be rewritten in a way that it determines the Arduino device on which port is running and the user is forbidden or hidden the selection for COM port. Also when you connect a program(PHD) via the ascom driver to the device and disconnect it, the next time you try to connect to the device on the com port it fails, unless you restart the program(PHD).

kevinferrare commented 6 years ago

Hello,

I am not sure I understand all your points. Regarding the possibility to have multiple clients for a driver, I am not sure ASCOM supports it. There is a software that acts as a hub between clients and driver here if it can help: http://www.optecinc.com/astronomy/downloads/ascom_server.htm

Regarding the issue with PHD, I did some tests, and contrarily to other softwares, PHD never reinitializes the driver between connections, so I made a fix and included it in the next version that is to be released once I properly test it in the field ... Here is the exe if you are interrested: https://drive.google.com/open?id=0B04IJvbw0nqmMUJVX25MQ2NJNFU

kevinferrare commented 6 years ago

Seems like PHD is never disconnecting the driver when clicking on disconnect: https://github.com/OpenPHDGuiding/phd2/blob/master/scope_ascom.cpp#L416 Opened an issue on their side: https://github.com/OpenPHDGuiding/phd2/issues/624

kevinferrare commented 6 years ago

@grozmaistor You can use the Hub included into ASCOM that allows multiple clients to control a single device simultaneously: http://www.ascom-standards.org/FAQs/POTH.htm