×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

[SOLVED] HEQ5 mount connection problem

  • Posts: 86
  • Thank you received: 5

EQ mount protocol was created by Rob Meades

Hi there. I've got my HEQ5 mount connected via an EQDirect cable to the USB port of my Linux machine running Indiserver. However, when I try to connect to it from a Kstars/Ekos client it complains that it can't read from the tty. I've verified that the port name and baud rate are correct.

What I'd like to do is just open minicom locally on the same port and send something to prove that it is working. Can someone point me at the protocol that the HEQ5 port employs, or advise me on some, preferably ASCII, character/string I can send that will elicit a well known response?

Here's the error output, in case anyone can spot what I'm doing wrong:

2016-03-26T14:14:34: Driver indi_eqmod_telescope: read message EQMod Mount   'Connecting to port /dev/heq5 at speed 9600'
2016-03-26T14:14:34: Client 0: queuing <message device='EQMod Mount' name=''>
2016-03-26T14:14:34: Client 0: sending msg copy 1 nq 1:
<message device="EQMod Mount" timestamp="2016-03-26T14:14:34" message="Connecting to port /dev/heq5 at speed 9600"/>
 
2016-03-26T14:14:49: Driver indi_eqmod_telescope: read message EQMod Mount   'Error:  -> tty read failed, check connection: Timeout error'
2016-03-26T14:14:49: Client 0: queuing <message device='EQMod Mount' name=''>
2016-03-26T14:14:49: Client 0: sending msg copy 1 nq 1:
<message device="EQMod Mount" timestamp="2016-03-26T14:14:49" message="Error:  -&gt; tty read failed, check connection: Timeout error"/>
 
2016-03-26T14:14:49: Driver indi_eqmod_telescope: read setSwitchVector EQMod Mount CONNECTION Alert
    CONNECT='Off'
 DISCONNECT='On'
2016-03-26T14:14:49: Client 0: queuing <setSwitchVector device='EQMod Mount' name='CONNECTION'>
2016-03-26T14:14:49: Client 0: sending msg copy 1 nq 1:
<setSwitchVector device="EQMod Mount" name="CONNECTION" state="Alert" timeout="60" timestamp="2016-03-26T14:14:49">
    <oneSwitch name="CONNECT">
Off
    </oneSwitch>
    <oneSwitch name="DISCONNECT">
On
    </oneSwitch>
</setSwitchVector>

Rob
Last edit: 8 years 2 days ago by Rob Meades.
8 years 2 days ago #7435

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

  • Posts: 2247
  • Thank you received: 223

Replied by Gonzothegreat on topic EQ mount protocol

Hi Rob,

I am going to check my setup as I run an HEQ5 pro with that USB cable you have. Hold on for an update.
The following user(s) said Thank You: Rob Meades
Last edit: 8 years 2 days ago by Gonzothegreat.
8 years 2 days ago #7436

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

  • Posts: 2247
  • Thank you received: 223

Replied by Gonzothegreat on topic EQ mount protocol

I have added the following in my Odroid-C1:

root@heidenrod-obs:/etc/udev/rules.d# pwd && ll 99-EqDir.rules && more 99-EqDir.rules
/etc/udev/rules.d
-rw-r--r-- 1 root root 146 Mar 10 2015 99-EqDir.rules
KERNEL=="ttyUSB*", SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", ATTRS{product}=="USB-Serial Controller", SYMLINK+="EQDIR"
root@heidenrod-obs:/etc/udev/rules.d#
This is to make sure that I always get the same /dev/ file for my mount.

Once you add this, reboot the machine and plug the usb cable in, you should see in /dev a new file called EQDIR.
Then have EqMod connect to /dev/EQDIR , that should work fine.
The following user(s) said Thank You: Rob Meades
8 years 2 days ago #7437

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

  • Posts: 86
  • Thank you received: 5

Replied by Rob Meades on topic EQ mount protocol

Thanks for the swift response. I believe that I have done the equivalent of what you have done, the attributes reported by my cable being slightly different. My method was:

1. With cable unplugged, check contents of directory /dev/serial/by-id (which was not there).
2. Plug cable in and check again. Now that directory exists and contains the single file usb-FTDI_TTL232R_FTHHYXXC-if00-port0.
3. Run:

udevadm info -a -p $(udevadm info -q path -n /dev/serial/by-id/usb-FTDI_TTL232R_FTHHYXXC-if00-port0)
4. From the output (attached), note a set of unique attributes and put these into a file 39-rob.rules in /etc/udev/rules.d, which I chose to be:

ACTION=="add", KERNEL=="ttyUSB[0-9]", SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="7777", SYMLINK+="heq5"

5. Reboot and check that the device dev/heq5 appears (and that it disappears when the USB cable is unplugged).
6. Check the default baud rate on that port with stty:

> stty -F /dev/heq5
speed 9600 baud; line = 0;
-brkint -imaxbel

So I think that should amount to the same thing. However indiserver, when started with indi_eqmod_telescope as a parameter and driven from a Kstars/Ekos Linux client, tries to but is not able to communicate with the mount on port /dev/heq5 at 9600.

My next step was to start minicom on the same port at the same baud rate and do something myself to see if the port responds. Question is, is there something I could send from a terminal that would get me back a response visible in a terminal?

Rob
Last edit: 8 years 2 days ago by Rob Meades. Reason: Correct misspooling.
8 years 2 days ago #7438
Attachments:

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

  • Posts: 2247
  • Thank you received: 223

Replied by Gonzothegreat on topic EQ mount protocol

try this also:
adduser $USER dialout

with $USER being the user you run the indiserver as.
8 years 2 days ago #7439

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

  • Posts: 86
  • Thank you received: 5

Replied by Rob Meades on topic EQ mount protocol

Yes, I saw that note, but on my Linux distribution (Arch Linux) the dialout group does not exist so I can't add it. The equivalent seems to be the uucp group, which I had already added my user to (and rebooted). Any other ideas?
8 years 2 days ago #7440

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

  • Posts: 2247
  • Thank you received: 223

Replied by Gonzothegreat on topic EQ mount protocol

Cannot think of something else to check apart from the obvious question: Are you sure the cable is working correctly?
Has it ever worked before, I blown mine a while ago, with similar symptons to yours.
8 years 2 days ago #7441

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

  • Posts: 226
  • Thank you received: 88

Replied by Jean-Luc on topic EQ mount protocol

Hi,
You may find the protocol described at skywatcher's page (old google wiki) .
The simplest way to perform a test is to send
:e1
followed with ctrl-M from the minicom/picocom terminal. It should answer
=yyyyxx
yyyy being your firmware version and xx your mount code (01 for HEQ5 if I can remember).

Jean-Luc.
The following user(s) said Thank You: Rob Meades
8 years 2 days ago #7442

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

  • Posts: 86
  • Thank you received: 5

Replied by Rob Meades on topic EQ mount protocol

Got it! The port that the USB to serial cable comes up as by default, dev/ttyUSB0 is part of the uucp group but the linked port that I created, /dev/heq5 is not, it is root. If I tell KStars/Ekos to connect to it on port /dev/ttyUSB0 it bursts into life. @Gonzothegreat: do you remember specifying a group for your /dev/EqDir device somehow?

[EDIT]

I think:

chgrp uucp /dev/heq5

...has done the trick for me.
Last edit: 8 years 2 days ago by Rob Meades. Reason: Found chgrp.
8 years 2 days ago #7443

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

  • Posts: 86
  • Thank you received: 5

Replied by Rob Meades on topic EQ mount protocol

@Jean-Luc: thanks, that's just what I was after. Strangely it still doesn't get a reply for me so there must be something up with the way I'm using minicom. Anyhow, since it seems to be working now I'll not worry about this until something else gets in the way.
8 years 2 days ago #7444

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

  • Posts: 86
  • Thank you received: 5

Replied by Rob Meades on topic EQ mount protocol

@Jean-Luc: gah, somehow I managed to have HW flow control switched on. Take that off and I get the response:

=020401

Perfect!

Rob
Last edit: 8 years 2 days ago by Rob Meades.
8 years 2 days ago #7445

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

  • Posts: 2247
  • Thank you received: 223

Replied by Gonzothegreat on topic EQ mount protocol

Good to hear you got it working now. Happy star gazing :)
8 years 2 days ago #7446

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

Time to create page: 0.424 seconds