Chris Guidry replied to the topic 'DSUSB' in the forum. 6 years ago

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.

In the beginning, everything looks great:

[2018-08-30T20:44:30.539 EDT DEBG ][           org.kde.kstars.indi] - Nikon DSLR DSC D3200 0 : "[DEBUG] Model: D3200 "
[2018-08-30T20:44:30.539 EDT DEBG ][           org.kde.kstars.indi] - Nikon DSLR DSC D3200 0 : "[DEBUG] Finding DSUSB 0x134A, 0x9021 ... "
[2018-08-30T20:44:30.539 EDT DEBG ][           org.kde.kstars.indi] - Nikon DSLR DSC D3200 0 : "[DEBUG] Connected to DSUSB! "
[2018-08-30T20:44:30.539 EDT DEBG ][           org.kde.kstars.indi] - Nikon DSLR DSC D3200 0 : "[DEBUG] RC: 1 - Info Byte: 0X30 "
[2018-08-30T20:44:30.541 EDT INFO ][           org.kde.kstars.indi] - Nikon DSLR DSC D3200 0 :  "[INFO] Connected to DSUSB "
[2018-08-30T20:44:30.542 EDT DEBG ][           org.kde.kstars.indi] - Nikon DSLR DSC D3200 0 : "[DEBUG] GPhoto initialized. "
[2018-08-30T20:44:30.546 EDT DEBG ][           org.kde.kstars.indi] - Nikon DSLR DSC D3200 0 : "[DEBUG] Blub-stop thread enabled. "
[2018-08-30T20:44:30.547 EDT DEBG ][           org.kde.kstars.indi] - Nikon DSLR DSC D3200 0 : "[DEBUG] Capture target is SD Card. "
[2018-08-30T20:44:30.552 EDT INFO ][           org.kde.kstars.indi] - Nikon DSLR DSC D3200 0 :  "[INFO] Nikon DSLR DSC D3200 0 is online. "

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.

Thanks for looking!

Read More...