Jump to content

Recommended Posts

Posted

Having spent some time on this, I thought I would post it here for posterity, in the hope it might help someone.

 

Running Synscan WiFi on Linux


If you are runnimng Stellarium or Kstars on Linux, then you will have perhaps discovered that ASCOM and EQMOD are Windows only programs. You may also have discovered that there is an equivalent for Linux called INDI. It is quite possible to remote control using the Synscan WiFi dongle connected to the mount using Stellarium or Kstars on your Linux computer using INDI.

These instructions were tested using a USB WiFi stick plugged into my Linux PC and connected to the WiFi hotspot provided directly by the Synscan WiFi adaptor. However, there should be no reason why this shouldn't work with the Synscan WiFi adaptor configured and connected to the home WiFi network.

Stellarium and Kstars differ in the way that they interact with INDI. Kstars can launch the INDI server from within the application, whereas with Stelarium, INDI has to be started separately from the command line. Either way, INDI needs to be installed first.

To install INDI on a Ubuntu derived flavour of Linux, at the command line type:

$ sudo apt install indi-server
$ sudo apt install indi-bin

If you don't already have it, install a tool called socat:

$ sudo apt install socat

Linux uses the group named dialout to dynamically manage user access to plugged in USB devices. Our user name needs to be added to the dialout group. We can check this as follows:

$ cat /etc/group |grep dialout
dialout:x:20:john,root

Note, some linux distrubutions may used the group named uucp, but most now use dialout

If your username is not listed then it needs to be added:

$ usermod -a -G dialout yourusername

By default, the Syncan WiFi dongle is assigned the IP address 192.168.4.1 and provides port 11880 to receive EQDIR protocol data and pass it to the EQMOD port on the mount. Before starting INDI, we first need to create a serial-to-IP tunnel to the WiFi dongle. Assuming that the default network configuration on the Synscan WiFi adapter has not been changed, we can create a serial-to-IP device as follows:

$ sudo socat pty,link=/dev/ttyUSBEqmod0,raw,group=dialout,mode=660 udp:192.168.4.1:11880 &

We can confirm that the device has been created:

$ ls -al /dev/ttyUSBEqmod0
lrwxrwxrwx 1 root root 10 Jan  1 14:06 /dev/ttyUSBEqmod0 -> /dev/pts/4

We can also confirm the permissions assigned to /dev/pts/4

$ ls -al /dev/pts/4
crw-rw---- 1 root dialout 136, 4 Jan  1 14:30 /dev/pts/4

Note that the device has been assigned group ownership for the group named dialout. This is neccessary to allow a user to access the port without having to use the sudo command.

Note also the use of the ttyUSB prefix for our chosen device name. This simplifies things as by default, the INDI server will search for USB devices which have device names starting /dev/ttyUSB*.

Once the socat tunnel is in place we can now start INDI.

 


Stelarium
 

We need to start the INDI server from the command line:

$ indiserver -v indi_eqmod_telescope

You can skip the '-v' but it does provide some additional helpful information such as, for example, confirming that the driver was loaded and the port it is listening on.

2025-01-01T14:47:31: Driver indi_eqmod_telescope: pid=63821 rfd=6 wfd=6 efd=7
2025-01-01T14:47:31: listening to port 7624 on fd 5

Next, start Stellarium, and go to the Configuration Windows and then the Plug-ins tab. From there, select the Telescope Control plugin. Check Load at startup. Now close Stellarium, launch it again, and repeat the above steps. The Configure button should now be active. Click it and from the Telescope dialog, click the Add icon to the right of the Connect button.

Select INDI/INDIGO, and give your telescope a name. For the host name type localhost. The TCP port should be set to 7624. Click 'Refresh devices'. All being well, EQMod Mount should appear in the Devices list. Click OK to close the dialog. Now click Connect. The status should change to Connected.

You can now select a target. Next click the Move a telescope icon in the bottom menu. On the dialogue that opens up, click 'Current Object'. Below this you should see the name of your telescope. If not, go back an check that the status is connected. If all is well, click the 'Slew' button.

 


Kstars
 

Start the Kstars application.

Go to Settings -> Configure Kstars. Select the IND tab. The defaults should be OK for now, but you may want to add an image path for later. Port from should be set to 7624. Close the dialog. This is just a check.

Go to Tools -> Devices -> Device Manager... Ignore the warning and click Continue. Optionally remove the warning it be Checking Do not ask again.

Select the Client tab and click Add. Give your telescope a name. In the Host: field put localhost. In the Port: field put 7624. Click Ok to save that configuration.

Go to the Local/server tab. Expand Telescopes and find EQMod mount. (Yes, it would be nice if these were listed in alphabetical order!). At the bottom for the dialog, for Mode select Local, then click Run Service. This should open the EQMod configuration dialog.

On the Connection tab check that the /dev/ttyUSBEqmod0 port has been detected. If not, you can try the Scan Ports button.

If the port has been correctly detected, go back to the Main Control tab and click Connect. All being well, the status message will indicate that the mount is online.

Select a target by double-clicking it. Right click it, select EQMod Mount -> Goto.

When right-clicking the target, the EQMod Mount menu also shows other options for syncing and parking the mount.


Notes:
------
If the INDI server is stopped for any reason, the socat tunnel must be stopped and restarted before running the INDI server again, otherwise you may get an error saying that the port is in use by another process.

To close the serial-to-IP tunnel, first list the socat processes:

$ ps -ef |grep socat
root       64387   42848  0 15:27 pts/0    00:00:00 sudo socat pty,link=/dev/ttyUSBEqmod0,raw,group=dialout,mode=660 udp:192.168.4.1:11880
root       64388   64387  0 15:27 pts/3    00:00:00 sudo socat pty,link=/dev/ttyUSBEqmod0,raw,group=dialout,mode=660 udp:192.168.4.1:11880
root       64389   64388  0 15:27 pts/3    00:00:00 socat pty,link=/dev/ttyUSBEqmod0,raw,group=dialout,mode=660 udp:192.168.4.1:11880
johnc      64402   59874  0 15:28 pts/5    00:00:00 grep --color=auto socat

Now kill the first (lowest numbered) process in the list:

$ sudo kill -9 64387

This will shut down both the child processes and the main process.
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.