Seletek Driver

Seletek DriverSeletek Driver

Seletek is a peripheral controller developed by Lunático. Among others, it allows to control Focusers, filter wheels, general pourpose relays and so on.

Now it is possible to control the Seletek, at least it basic sensors and one or two focusers (three in the Platypus version) at the same time with INDI.

In this page you will find information about how to install and use the INDI driver for the Seletek.

 

  Installing the Seletek INDI for Java Driver

The Seletek uses the CP210x USB to UART Bridge in order to communicate with the computer. Despite being officially supported by modern 3.x.x by the Linux Kernel team, it seems that the USB ID that is used in the Seletek is not officially detected by the default kernel driver. To solve this problem you can follow the following steps in a shell (tested in KUbuntu 13.04, but probably working in many other distros):

Find out the USB ID of the Seletek. To do so, with the USB cable UNPLUGGED run the following command:

> lsusb

In my case, the output was:

Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04f3:0018 Elan Microelectronics Corp.
Bus 001 Device 006: ID 0489:e036 Foxconn / Hon Hai
Bus 001 Device 005: ID 05ca:18c4 Ricoh Co., Ltd

Then attach the USB cable an re-run the command:

> lsusb

A new line should appear with a new USB ID. In my case:

Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 012: ID 16c0:09b1 VOTI
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04f3:0018 Elan Microelectronics Corp.
Bus 001 Device 006: ID 0489:e036 Foxconn / Hon Hai
Bus 001 Device 005: ID 05ca:18c4 Ricoh Co., Ltd

The USB ID for the Seletek appears in the VOTI line and it is: 16c0:09b1

Then we shoud install some dependencies in order to be able to re-compile the driver:

> sudo apt-get install build-essential linux-source
> cp /usr/src/linux-source-3.x.x.tar.bz2 .
> bunzip2 linux-source-3.x.x.tar.bz2
> tar xf linux-source-3.x.x.tar
> cd linux-source-3.x.x/

(please replace 3.x.x with the exact version of your kernel sources). We are going to make a backup of the driver sources in case that something goes really wrong:

> cp drivers/usb/serial/cp210x.c drivers/usb/serial/cp210x.c.orig

Open the drivers/usb/serial/cp210x.c file (for example with kate editor) and add the following line (with the USB ID that you obtained earlier to the lists of devices (no matter between which other lines of he list):

> kate drivers/usb/serial/cp210x.c

In my case I added the following line:

    { USB_DEVICE(0x16C0, 0x09B1) }, /* Seletek */

I added it between the "Clipsal 5560884 C-Bus Multi-room Audio Matrix Switcher" and the "Jablotron serial interface" lines. Therefore my file now cointains these three lines:

    { USB_DEVICE(0x166A, 0x0101) }, /* Clipsal 5560884 C-Bus Multi-room Audio Matrix Switcher */
    { USB_DEVICE(0x16C0, 0x09B1) }, /* Seletek */
    { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */

Save the file (and close your editor). Now we have to compile

Code:

> make oldconfig
> make prepare
> make scripts
> cp /usr/src/linux-headers-3.x.x-xx-generic/Module.symvers .
> make -i M=./drivers/usb/serial

Remember to replace 3.x.x-xx with your current kernel version.

Now that the module is compiled, we will make a backup of the original one:

> sudo cp /lib/modules/3.x.x-xx-generic/kernel/drivers/usb/serial/cp210x.ko /lib/modules/3.x.x-xx-generic/kernel/drivers/usb/serial/cp210x.ko.orig

We override it with the new one:

> sudo cp drivers/usb/serial/cp210x.ko /lib/modules/3.x.x-xx-generic/kernel/drivers/usb/serial/cp210x.ko

Finally we unload the old module ad load the new one module:

> sudo modprobe -r cp210x
> sudo modprobe cp210x

If I then unplug and plug the USB cable and I run

> dmesg

I obtain

[ 8576.089574] usb 3-1.2: new full-speed USB device number 29 using xhci_hcd
[ 8576.108007] usb 3-1.2: New USB device found, idVendor=16c0, idProduct=09b1
[ 8576.108019] usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8576.108025] usb 3-1.2: Product: Lunatico Astronomia Seletek Controller
[ 8576.108029] usb 3-1.2: Manufacturer: Silicon Labs
[ 8576.108034] usb 3-1.2: SerialNumber: Armadillo 0022
[ 8576.109133] cp210x 3-1.2:1.0: cp210x converter detected
[ 8576.193783] usb 3-1.2: reset full-speed USB device number 29 using xhci_hcd
[ 8576.210734] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff88022e5728c0
[ 8576.210746] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff88022e572880
[ 8576.211409] usb 3-1.2: cp210x converter now attached to ttyUSB0

which confirms that the device can now be accessed via /dev/ttyUSB0.

Last but not least, to ensure that the cp210x driver is loaded at every time, just execute

> sudo tee -a /etc/modules <<< cp210x

IMPORTANT NOTE: If youu update your kernel version (via apt-get or any package manager) you MUST repeat the described steps as the driver provided by the  Linux kernel group  will not recognize the USB ID for the Seletek.

 

  Using the Seletek INDI for Java Driver

Although the driver has been developed using the INDI for Java Library it can be used either with the standard indiserver of the original INDI Library or with the INDI for Java Server. In the following both methods are explained in detail. Please note that for both methods to work Java must be installed in your system.

 

  Method 1: Seletek INDI Driver Using the Standard indiserver
  1.  Download the INDI for Java Seletek Driver from the downloads page (I4JSeletekDriver_vx.xx.zip).
  2. Unzip it to a directory of your choice:
    > unzip I4JSeletekDriver_vx.xx.zip
  3. A directory called I4JSeletekDriver must have been created. Enter into that directory. A file named launchSeletekDriver.sh should be there:
    > cd I4JSeletekDriver
    > ls -l
  4. Launch the standard indiserver with the launchQHYFWDriver.sh as parameter:
    > indiserver ./launchSeletekDriver.sh
  5. The server (with the driver) should start working. Check it out with your favourite INDI Client.

 

  Method 2: Seletek INDI Driver Using the INDI for Java Server
  1. Download the INDI for Java Server from the downloads page (I4JServer_vx.xx.zip).
  2. Unzip it to a directory of your choice:
    > unzip I4JServer_vx.xx.zip
  3. Download the INDI for Java Seletek Driver from the downloads page (I4JSeletekDriver_vx.xx.zip).
  4. Unzip it to the same directory:
    > unzip I4JSeletekDriver_vx.xx.zip
  5. Launch the INDI for Java Server with the Seletek Driver:
    > java -jar I4JServer/dist/I4JServer.jar -add=I4JSeletekDriver/dist/I4JSeletekDriver.jar
  6. The server (with the driver) should start working. Check it out with your favourite INDI Client.

 

  Driver Properties:

  • Main Control Group:
    • Connection: Standard connection property.
    • Port: Standard port property.
    • Seletek Info: Some static information aobut the Seletek (Version and Serial Number)
    • Main Device: Device connected to the Main Port of the Seletek.
    • Exp. Device: Device connected to the Exp. Port of the Seletek.
    • Third Device: Device connected to the Third Port of the Seletek (only for the Platypus Seletek).
  • Device Sensors Group:
    • Temperatures: Internal and External temperatures.
    • Power: Enough power sensor.

For each focuser to one of the ports you get the following properties:

  • Control Group:
    • Absolute Focus Position: Standard focus position property.
    • Stop Focusing: Stops the focus movement (if any).
  • Configuration Group:
    • Focus Speed: Standard focus speed property.
    • Wire Mode: Lunático, Lunático Inverted, RF/Moonlite, RF/Moonlite Inverted.
    • Model: Unipolar, Bipolar, DC, Step & Dir.
    • Half Step: Enable half step.
    • Power Settings: PWM configuration when moving and when stopped.

 

Subscribe to INDI

SUBSCRIBE TO THE NEWSLETTER
NEWSLETTER
NAME
EMAIL{emailcloak=off}
 

3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!