Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

Mount Serial Port ?

  • Please log in to reply
21 replies to this topic

#1 mlord

mlord

    Viking 1

  • *****
  • topic starter
  • Posts: 881
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 22 February 2021 - 05:31 PM

Some Celestron mounts and accessories include something called a "Mount Serial Port", or "Mount PC Port".

 

Does anyone here know what baud rate that port normally uses?

 

And also, what protocol it speaks?  Most likely the same as an AUX port, but just guessing here.

 



#2 Jim Davis

Jim Davis

    Aurora

  • *****
  • Posts: 4,763
  • Joined: 05 Jul 2014
  • Loc: Lewisberry, PA

Posted 22 February 2021 - 05:40 PM

Some Celestron mounts and accessories include something called a "Mount Serial Port", or "Mount PC Port".

 

Does anyone here know what baud rate that port normally uses?

 

And also, what protocol it speaks?  Most likely the same as an AUX port, but just guessing here.

No, the AUX port uses the TTL protocol, Serial ports use RS-232. I don't know the speed. If you want to build a cable, check this site out: https://www.nexstars...ammingCable.htm



#3 mlord

mlord

    Viking 1

  • *****
  • topic starter
  • Posts: 881
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 22 February 2021 - 05:48 PM

No, the AUX port uses the TTL protocol, Serial ports use RS-232. I don't know the speed. If you want to build a cable, check this site out: https://www.nexstars...ammingCable.htm

That's the physical layer, which I already know about.

 

I'm more interested in the bit rate and whether or not it speaks the same binary protocol as the AUX bus, or if perhaps (unlikely) it uses HC commands.

 

Thanks.


Edited by mlord, 22 February 2021 - 05:48 PM.


#4 Jim Davis

Jim Davis

    Aurora

  • *****
  • Posts: 4,763
  • Joined: 05 Jul 2014
  • Loc: Lewisberry, PA

Posted 22 February 2021 - 06:16 PM

Programming for it is here: https://www.nexstars...mingNexStar.htm



#5 Michael_Swanson

Michael_Swanson

    Author of The NexStar Users Guide

  • *****
  • Vendors
  • Posts: 3,375
  • Joined: 23 Apr 2003

Posted 22 February 2021 - 08:43 PM

Programming for it is here: https://www.nexstars...mingNexStar.htm

Specifically, refer to Andre's "AUX Command Guide".  As he documents, the PC Port uses async serial data at RS-232 levels, 19200bps, no parity, 1 stop bit and hardware (RTS/CTS) flow control.  The protocol is the same as the AUX port.  Andre also discusses collisions, delays and retransmits via the PC Port and AUX bus to ensure robust communication.

 

Best regards,
Mike Swanson
https://www.NexStarSite.com



#6 mlord

mlord

    Viking 1

  • *****
  • topic starter
  • Posts: 881
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 22 February 2021 - 08:45 PM

Programming for it is here: https://www.nexstars...mingNexStar.htm

Four links to "how to talk to the hand-controller", plus one link for the AUX bus.

But what about the Mount-Serial aka. PC-Port?  I wonder which protocol it uses?

 

I'm more interested in the bit rate and whether or not it speaks the same binary protocol as the AUX bus, or if perhaps (unlikely) it uses HC commands.

 

I suppose it's possible nobody here actually knows.  That'll be fixed soon, but was hoping for more of a head start!  :)

 



#7 mlord

mlord

    Viking 1

  • *****
  • topic starter
  • Posts: 881
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 22 February 2021 - 08:48 PM

Here we go:

 

PC port access:
The AUX command set can be directly accessed by connecting a PC serial port to
the PC port of the telescope. The format is asynchronous serial data with RS232
levels at 19200 bps, no parity, 1 stop bit, and hardware (RTS/CTS) flow control.

 

So it looks like it should be the same as the AUX commands.

 

Except I have already tried 19200bps and AUX commands with CPWI with no luck.

Time to dig out the logic analyzer again.

 

Cheers



#8 mlord

mlord

    Viking 1

  • *****
  • topic starter
  • Posts: 881
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 23 February 2021 - 12:08 AM

Bit of a puzzle, this one.  19200bps is correct, and the circuit I have wired up for it works perfectly fine with the AUX bus scanner project elsewhere on CN.

 

But CPWI has yet to behave.

 

On the trace, I can see it sending GET VERSION commands to the AZM_MC, and I can see the AZM_MC replying correctly to those commands.  Yet.. CPWI behaves as if it never sees the response, and retries after around 200msecs, over and over until it gives up (and locks up too, have to kill it from the Task Manager).

 

It probably has something to do with the RTS/CTS lines from the virtual serial port.  The Arduino's USB-Serial doesn't appear to implement them, though the code inside the Arduino does do proper handshaking on the AUX bus side.

 

I think I'll try an FTDI serial adapter between the Arduino and CPWI instead of the built-in USB on the Arduino.  With the FTDI I can tie RTS and CTS together to keep CPWI happy.  Maybe that'll work..


Edited by mlord, 23 February 2021 - 12:10 AM.


#9 mlord

mlord

    Viking 1

  • *****
  • topic starter
  • Posts: 881
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 23 February 2021 - 01:03 AM

I think I'll try an FTDI serial adapter between the Arduino and CPWI instead of the built-in USB on the Arduino.  With the FTDI I can tie RTS and CTS together to keep CPWI happy.  Maybe that'll work..

No better than before.  The AUX bus scanner is still very happy, even with RTS/CTS tied together, but no joy from CPWI.

 

I suppose next is to tie RTS and CTS from the FTDI board to some GPIO pins on the Arduino and control CTS from there, based on RTS.

 

Later. Much.
 



#10 mclewis1

mclewis1

    Thread Killer

  • *****
  • Posts: 21,024
  • Joined: 25 Feb 2006
  • Loc: New Brunswick, Canada

Posted 23 February 2021 - 10:15 AM

Mark,

 

The PC port is used only for hand controller connectivity ... not the physical hand controller but all the software designed to use the port (NexRemote, CPWI and I think SkySafari) use the hand controller functionality. So the PC Port is only expected to be used when the physical hand controller isn't present or operating (and so the mount hasn't been initialized).

 

When Andre P and others posted about this (billions of years ago on other boards) there was both something about the need for physical hand shaking (CTS/RTS) and the initial dialog with the motor controllers. 

 

So the hardware handshaking is required, and the software to use the port is dependent on very specific motor controller responses. I'm guessing the handshaking is used because the mount has just powered up and the various micro controllers could be in an uncertain state so there could be anything on the AUX bus. The hardware handshaking/flow control may initially allow for more stable communications. It might be useful to take a look at the initial dialog from the physical hand controller when it powers up and maybe compare it with what CPWI is initially trying to do when it's talking with the PC Port. 



#11 mlord

mlord

    Viking 1

  • *****
  • topic starter
  • Posts: 881
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 23 February 2021 - 12:22 PM

I think the same can be said of all of the "bus masters" for the AUX port.  Only one is supposed to be present and working at any given time, though the electrical layer and protocol do allow for "collisions" and retransmissions etc.

 

The term "bus master" here includes any of the various flavors of Hand Controllers, as well as the WiFi, Bluetooth, Ethernet, PC-Port software, etc.  Basically anything that sends a command to another device and then expects a response from it.

 

All of that said, it appears to be quite commonplace among this crowd to have and use multiple masters at the same time.  Eg. two hand controllers, or a hand controller plus CPWI, etc.  If only just for, eg., the focus buttons on the HC.

 

Cheers


  • mclewis1 likes this

#12 mclewis1

mclewis1

    Thread Killer

  • *****
  • Posts: 21,024
  • Joined: 25 Feb 2006
  • Loc: New Brunswick, Canada

Posted 24 February 2021 - 10:50 AM

One of the things I've been really curious about is what happens on power up. Specifically the difference between what happens when a hand controller device (physical HC, or software via the WiFi or other AUX bus connectivity) initializes the mount (after power up the h/w identification and device check) vs. what happens when the software HC functionality starts that same initialization via the PC port (either legacy serial or the CGX on mount USB).



#13 mlord

mlord

    Viking 1

  • *****
  • topic starter
  • Posts: 881
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 24 February 2021 - 12:03 PM

Hardly anything happens on the modern Evolution mount.  The HC does not actually initialize anything in the mount, but rather the individual parts of the mount (MC, GPS, etc..) initialize themselves.

 

Here's what happens when the mount is powered on with the HC (NexStar+) attached:

19.196227 - Nexstar+ HC (0xd) -> ALT MC (0x11) --- MC_GET_MODEL (0x5) --- []
19.246662 - ALT MC (0x11) -> Nexstar+ HC (0xd) --- MC_GET_MODEL (0x5) --- 5767
19.246776 - Nexstar+ HC (0xd) -> AZM MC (0x10) --- MC_GET_MODEL (0x5) --- []
19.246863 - AZM MC (0x10) -> Nexstar+ HC (0xd) --- MC_GET_MODEL (0x5) --- 5767
19.246922 - Nexstar+ HC (0xd) -> AZM MC (0x10) --- MC_GET_FW_VER (0xfe) --- []
19.247012 - AZM MC (0x10) -> Nexstar+ HC (0xd) --- MC_GET_FW_VER (0xfe) --- 7.17.98
19.297252 - Nexstar+ HC (0xd) -> AZM MC (0x10) --- MC_GET_APPROACH (0xfc) --- []
19.297391 - AZM MC (0x10) -> Nexstar+ HC (0xd) --- MC_GET_APPROACH (0xfc) --- 0
19.297459 - Nexstar+ HC (0xd) -> ALT MC (0x11) --- MC_GET_APPROACH (0xfc) --- []
19.297528 - ALT MC (0x11) -> Nexstar+ HC (0xd) --- MC_GET_APPROACH (0xfc) --- 0

So all it does is take inventory of what's there.


Edited by mlord, 24 February 2021 - 12:08 PM.


#14 mclewis1

mclewis1

    Thread Killer

  • *****
  • Posts: 21,024
  • Joined: 25 Feb 2006
  • Loc: New Brunswick, Canada

Posted 24 February 2021 - 02:09 PM

Good point, initialize was the wrong word as it applies to the whole mount. The hand controller inventories the devices, then goes off and does internal stuff like reconfiguring the menus based on the mount type and devices present, reading the stored user data and GPS if present, and doing a little housekeeping in preparation for an initial alignment. So I guess it would be more correct to say that the HC initializes itself.

 

There would be AUX bus activity after an initial alignment when the HC loads the MCs with positioning information from the sky model.



#15 mlord

mlord

    Viking 1

  • *****
  • topic starter
  • Posts: 881
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 24 February 2021 - 02:17 PM

Note that the HC doesn't even try to talk to the GPS until one begins an alignment.  And only then if the GPS was "enabled" in the past via the Utilities Menu.   It also talks to it briefly (GET VERSION only) when "enabling" it via the Utilities Menu.


Edited by mlord, 24 February 2021 - 02:17 PM.


#16 Noah4x4

Noah4x4

    Skylab

  • *****
  • Posts: 4,163
  • Joined: 07 Apr 2016
  • Loc: Colchester UK

Posted 24 February 2021 - 04:10 PM

Note that the HC doesn't even try to talk to the GPS until one begins an alignment.  And only then if the GPS was "enabled" in the past via the Utilities Menu.   It also talks to it briefly (GET VERSION only) when "enabling" it via the Utilities Menu.


This is an interesting comment.

If I use my Starsense HC and select enable GPS in time-loc source it reports "updated". But does that refer only to device initialization or the input of time and location data? But if I use CPWI (connected to HC in Boot loader mode) it finds GPS then updates time and location before an alignment is invoked.

The above comment might suggest these initialization processes differ? The reason I am curious is that I have experienced problems with GPS failing to connect with CPWI, but it is always fine with HC. Success seems to vary dependent on which CPWI version. Eventually, I gave up using GPS with CPWI as it proved unreliable and now rely on my PC's <location services>. But better understanding of these GPS initialization process might help explain why so many of us have encountered inexplicable GPS/CPWI issues and possibly identify solutions. Celestron has invested a fair bit of time revising the process for searching for Celestron Focuser and GPS.. .

#17 mlord

mlord

    Viking 1

  • *****
  • topic starter
  • Posts: 881
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 24 February 2021 - 05:49 PM

The StarSense HC probably behaves differently from the Nexstar+ HC that I have here.  Dunno what it does.



#18 Michael_Swanson

Michael_Swanson

    Author of The NexStar Users Guide

  • *****
  • Vendors
  • Posts: 3,375
  • Joined: 23 Apr 2003

Posted 24 February 2021 - 07:31 PM

Yes, the behavior of the StarSense HC is quite different than a NexStar HC.  

 

Best regards,
Mike Swanson
https://www.NexStarSite.com



#19 cdvideo

cdvideo

    Lift Off

  • -----
  • Posts: 15
  • Joined: 17 Dec 2018
  • Loc: Hamilton Ontario Canada

Posted 25 February 2021 - 11:11 PM

I have a request at celestron to find out if CPWI is compatible with the PC protocol No answer as of today 



#20 mlord

mlord

    Viking 1

  • *****
  • topic starter
  • Posts: 881
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 26 February 2021 - 12:02 AM

I have a request at celestron to find out if CPWI is compatible with the PC protocol No answer as of today 

The protocol we currently are providing via this project is exactly the same that CPWI would see over Bluetooth, ethernet, or wifi.  All of which work with CPWI.  So it does support it, but the question is does it support it over a USB serial link?


Edited by mlord, 26 February 2021 - 12:03 AM.


#21 cdvideo

cdvideo

    Lift Off

  • -----
  • Posts: 15
  • Joined: 17 Dec 2018
  • Loc: Hamilton Ontario Canada

Posted 26 February 2021 - 11:24 AM

Now I am getting confused as to what is what,  in CPWI help it states USB serial ports on the HC is compatible, USB to USB is OK and WIFI dongle is OK but I asked them will this work:

 

  AVX, CPWI, and a 93965 port expander's PC port I have made the cable up that is used to connect them but CPWI does not see it.

 

 

 



#22 mlord

mlord

    Viking 1

  • *****
  • topic starter
  • Posts: 881
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 26 February 2021 - 11:32 AM

USB to USB sounds like a USB PC-Port on the mount, which is more or less what we are doing in this thread.




CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics