×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Celestron Motorised Focuser - Is it supported in EKOS yet

  • Posts: 13
  • Thank you received: 2
I emailed you but got no response
5 years 2 months ago #34904

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
The packet protocol is:
3b - signal the start of a packet
03 - number of bytes up to the checksum
22 - the transmit device ID
12 - the receive device ID in this case the focuser
fe - the message ID, fe is get firmware version
cb - a checksum, there is no data

The reply is similar, there are now 7 bytes and the send and receive are reversed.
There are 4 data bytes, 07 0f 20 30, not sure how this is parsed.

These 2 sequences start the focuser talking:
3b 03 22 12 fe cb --connect -->3b 07 12 22 fe 07 0f 20 30 61

3b 03 22 12 40 89 --?????? -->3b 04 12 22 40 00 88
That's command 40, I think that's reading the backlash, reply is 1 byte giving zero backlash


Focuser continues to send this while you are connected.
keep alive
3b 03 22 12 01 c8 -->receive 3b 06 12 22 01 ignore last 4 bytes, appears to be counting (3b 06 12 22 01 00 83 59 e9 ) or timestamp
Command 01 is get position and the reply is the focuser position as 3 bytes, a 24 bit number.

Commands 24 and 25 are move at a rate 0 to 9 with zero being stop 24 is positive move, 25 is negative.

Command 02 is move to position, the next three bytes are the position.

Hope that helps.

Chris
5 years 2 months ago #34910

Please Log in or Create an account to join the conversation.

  • Posts: 200
  • Thank you received: 57
This is AUX protocol. It is already implemented in nexstarevo driver. Maybe we should abstract the protocol and communication out of this driver? Anyway, we do not need to reimplement it.
I am affraid without implementin some kind of communication hub/queue for the protocol we will be unable to run mount and focuser driver together.
5 years 2 months ago #35081

Please Log in or Create an account to join the conversation.

Great Progress Donald!

I actually asked Celestron if they can send me a sample focuser + protocol so I can work on a driver for it for INDI, and their response was: Go buy one. So I guess we'll stick with community-driven reverse-engineering as usual with Celestron products.
The following user(s) said Thank You: Craig
5 years 2 months ago #35084

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 2
I have a focusor and a Stellarmate, Happy to give you remote access if it helps.

Let me know what you need and I can arrange it
5 years 2 months ago #35087

Please Log in or Create an account to join the conversation.

  • Posts: 200
  • Thank you received: 57
Jasem!
I do not know if you noticed but the AUX communication protocol is already implemented in nexstarevo driver. If another driver starts to run the same stack both will stop to work (there is no queue and target selection in the protocol). We need to move the comms to the common place and add target arbitration. Maybe I can help with some parts of that task.
The following user(s) said Thank You: Jasem Mutlaq
5 years 2 months ago #35091

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
I have a Celestron focuser that I will be able to use for testing once there's some code to try.
I can help because I implemented the combined ASCOM telescope and focuser drivers. Celestron provided me with a beta version of the focuser.

There are a number of possibilities for connecting:
a) Connect the focuser to the mount and use the connection to the AUX bus for the telescope and the mount. That could be an extension to the nexstarevo driver.
b) Connect to the focuser independently of the telescope using the focuser's USB port. This also used the AUX bus connection.
c) Connect the mount and focuser using the AUX bus connector, not the focuser USB connection, and use a connection to the base of the HC to control both the telescope and focuser. that uses the same commands but through the HC passthrough engine.

I described some commands a few days ago, some more are:
// Focuser commands
FOC_ENABLE_CALIBRATE = 0x2A, // send 1 data byte 1 to start calibration, 0 to stop
FOC_IS_CALIBRATED = 0x2B, // return 2 bytes, [0] != 0 for calibrate complete,
// [1] is calibrate step, up to 12

FOC_GET_HS_POSITIONS = 0x2C, // returns 2 uints, [0] is low and [1] is high

I'm not an expert with INDI or C++ so setting up the structure of the various drivers is something that would be better left to the experts but once there's something there I should be able to help with debugging adding functionality.

Chris
The following user(s) said Thank You: Jasem Mutlaq
5 years 2 months ago #35092

Please Log in or Create an account to join the conversation.

Thanks Chris! That clears it up. I believe we definitely need to have a dedicated driver for #2. I can create a skeleton driver today in a new branch (celestron_focuser) so you can get started on that.

For #1, can we also add this support to the regular Celestron driver as well? This way both drivers can control the focuser. The driver also uses a few passthru commands.

Pawel, maybe you can suggest to Chris how to proceed in the nexstarevo driver?
5 years 2 months ago #35095

Please Log in or Create an account to join the conversation.

Chris, I'd like to know if you if the focuser USB connection is via HID or regular USB? how is it recognized by Linux?
5 years 2 months ago #35098

Please Log in or Create an account to join the conversation.

  • Posts: 200
  • Thank you received: 57
I "bet" it is just usb->serial converter connected to aux bus. This is the way Celestron does things. It would simplify things. We would not need three drivers just one and the abstraction leyer for the communication. As a side effect It would make implementing support for other mounts in nexstarevo driver trivial. And the protocol part is ready in nexstarevo driver.
We need common communication "server" inside INDI. I just do not know how to go about it.
Jasem - any ideas? Is there a driver model we can use or should it be a library providing singleton object menaging comms?
5 years 2 months ago #35102

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
Thanks Jasem, I'll look out for the new branch.

I think you are right, it needs a dedicated Celestron USB focuser driver and ideally adding a focuser to the nexstarevo and Celestron telescope drivers.

I'm not sure how the focuser is seen by Linux but in Windows it is a serial port. It seems to use the same connection as the USB port on the mount. I guess that the tty commands should work. The baud rate is 19200.

I'm not sure how the system prevents commands from different devices stepping on each other, I think it's by using the flow control lines CTS and RTS. This won't be an issue for a single controller connected to a single device.

Nexstarevo seems to use a UDP socket, however that seems to be because it only uses the WiFi connection.

Chris
5 years 2 months ago #35103

Please Log in or Create an account to join the conversation.

  • Posts: 200
  • Thank you received: 57
Adding the focuser to the nexstarevo would be simple.
Add new target and commands in NexStarAUXScope.h, add next axis in the processCmd selector for motor commands in NexStarAUXScope.cpp, and either process them the way emulateGPS is implemented or rather as one more axis. The rest is adding Focuser API
to nexstarevo.cpp/h using the additional axis in NexStarAUXScope.

But let me note that this will force everyone to load the nexstarevo for the focuser. This is non-intuitive and suboptimal. Three separate drivers is even worse - they will conflict with each other and will contain unnecesary duplication of code. I think that the factorization of tcp/serial code done some time ago by Jasem should be our model here. The rest is just a driver keeping track of motor position/movements and the INDI API/GUI.
5 years 2 months ago #35104

Please Log in or Create an account to join the conversation.

Time to create page: 1.194 seconds