×

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

Bi-monthly release with minor bug fixes and improvements

USB relay (HID interface) as shutter release device. Help!

  • Posts: 23
  • Thank you received: 0
Hi everyone,
I'm new on this forum. I've recently bought this USB relay from Amazon (www.amazon.it/gp/product/B00W3GRQNI/ref=...00_s00?ie=UTF8&psc=1). I intend to use it as a shutter release device for my Nikon D200. However, it has a HID interface, rather than a serial one, which is giving me a headache to configure. I'm running Kstar/Ekos under Xubuntu. This is what I get when I run lsusb:

maurizio@maurizio-AMILO-Li-1718:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 16c0:05df Van Ooijen Technische Informatica HID device except mice, keyboards, and joysticks
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
maurizio@maurizio-AMILO-Li-1718:~$

And this is what I get when I run dmesg:
[    3.996074] usb 2-1: new low-speed USB device number 2 using ohci-pci
[    4.180048] usb 2-1: device descriptor read/64, error -62
[    4.513184] usb 2-1: New USB device found, idVendor=16c0, idProduct=05df
[    4.513189] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.513191] usb 2-1: Product: USBRelay1
[    4.513193] usb 2-1: Manufacturer: www.dcttech.com
[    4.528256] hidraw: raw HID events driver (C) Jiri Kosina
[    4.540671] usbcore: registered new interface driver usbhid
[    4.540674] usbhid: USB HID core driver
[    4.550059] hid-generic 0003:16C0:05DF.0001: hiddev0,hidraw0: USB HID v1.01 Device [www.dcttech.com USBRelay1] on usb-0000:00:13.0-1/input0

First, I am not able to any address for it in /dev. I have tried setting /dev/uhid, /dev/usb/hiddev0 and /dev/hidraw0 as shutter release ports in Indi, but no luck. I don't think this approach is going to work, as Indi should know how to send Hex ON/OFF commands.

Is there a way to use this device as a shutter release? If not, I will go on and buy a USB relay with a serial interface (I was considering buying this one: sigma-shop.com/product/7/usb-relay-contr...one-channel-box.html). I should be able to see it as /dev/ttyUSBx, right?

Thanks for your help!

Maurizio
7 years 1 month ago #14263

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

This wouldn't work with the stock INDI GPhoto driver. The serial shutter port specified in the driver is controlled by simply opening/closing the device node, no communicating is taking place at all. I don't know how these shutter releases work, but it seems evident that just opening a connection to one is sufficient.

If you want to use a USB relay (whether serial or HID), then you need to modify the existing driver for this as you need to add extra logic to sending commands for the relay to open/close.
7 years 1 month ago #14287

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

  • Posts: 23
  • Thank you received: 0
Thanks for your quick reply! That doesn't sound too encouraging though, considering I have no programming skills whatsoever. Do you have any suggestion on how to trigger my D200 for long exposures in Ekos/Indi? Right now I'm limited to 30 seconds. I have a remote timer, which works fine, but then I cannot dither.
7 years 1 month ago #14291

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

I haven't researched how these serial shutter cables work, but if you are going to use one. Make it identical in operation to the ones used by Canon. Maybe they're even the same, I'm not sure.
7 years 1 month ago #14292

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

  • Posts: 23
  • Thank you received: 0
Do you have any link to those so I see what they look like?
7 years 1 month ago #14293

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

  • Posts: 3
  • Thank you received: 1
Hi, I was in the same position with the same hid dcctech relay device.

Here's how you can get it to work:

1. In the shutter port in the GPhoto driver, put /dev/hidraw0 - I found I had to edit the xml file in home/.indi to get it to remember the setting - for some reason it always defaulted back to /dev/ttyUSB0 every time I changed it.

2. You need to edit the gphoto driver to send the correct command to the dcctech device. Follow the instructions on building from source, but right after you clone the 3rd party drivers repository, edit the file /indi-gphoto/gphoto_ccd.cpp You only need to change 2 lines:

line 649, change to:
uint8_t close_shutter[3] = {0xFD, 0x01, 0x00};

and line 1224, change to:
uint8_t open_shutter[3] = {0xFF, 0x01, 0x00};

3. Finish the rest of the instructions to build from source as written.

You might want to create a copy of the existing gphoto driver instead of just editing it in place, but the above should get the relay working. Mine is now working great!

Hope this helps,

Joe

 
The following user(s) said Thank You: Jasem Mutlaq
2 years 1 week ago #81518

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

The driver should load whatever that was saved in config by default in the port. Even before connecting to the camera.
2 years 1 week ago #81521

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

Time to create page: 0.762 seconds