Okay, after reading the code for gphoto_driver.cpp and dsusbriver.cpp (quite readable, nice work!) I'm puzzled by the output I'm seeing in my indi logs:
I've set the shutter release port to "DSUSB" after reading the code and realizing that you didn't need a device filename, you just need the string "DSUSB" in order to look for the USB device by its vendor IDs.
That tells me that things went well in the constructor for
DSUSBDriver
and that the
gphoto->dsusb[code] field should be set. When I try to take an exposure, these logs are puzzling:
[code]
[2018-08-30T20:45:04.278 EDT DEBG ][ org.kde.kstars.indi] - Nikon DSLR DSC D3200 0 : "[DEBUG] Opening remote serial shutter port: DSUSB ... "
[2018-08-30T20:45:04.278 EDT DEBG ][ org.kde.kstars.indi] - Nikon DSLR DSC D3200 0 : "[DEBUG] Failed to open serial port: DSUSB "
[2018-08-30T20:45:04.282 EDT INFO ][ org.kde.kstars.indi] - Nikon DSLR DSC D3200 0 : "[ERROR] Error starting exposure "
Those messages are coming from code in
gphoto_driver.cpp
that it shouldn't go to if
gphoto->dsusb
is set:
// If bulb port is specified, let's open it
if (gphoto->dsusb)
{
DEBUGDEVICE(device, INDI::Logger::DBG_DEBUG, "Using DSUSB to open shutter...");
gphoto->dsusb->openShutter();
}
else if (gphoto->bulb_port[0])
{
DEBUGFDEVICE(device, INDI::Logger::DBG_DEBUG, "Opening remote serial shutter port: %s ...",
gphoto->bulb_port);
gphoto->bulb_fd = open(gphoto->bulb_port, O_RDWR, O_NONBLOCK);
if (gphoto->bulb_fd < 0)
{
DEBUGFDEVICE(device, INDI::Logger::DBG_DEBUG, "Failed to open serial port: %s", gphoto->bulb_port);
pthread_mutex_unlock(&gphoto->mutex);
return -1;
}
ioctl(gphoto->bulb_fd, TIOCMBIS, &RTS_flag);
}
I'm not super familiar with the code of indi and have only spent a little time here with it. I'm on version 1.7.4 from the PPA and I'm reading the code from the v.1.7.4 tag of the repo. Attaching my full log in case there's more info in there that would help.