×

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

Bi-monthly release with minor bug fixes and improvements

DSUSB

  • Posts: 185
  • Thank you received: 28

Replied by Richard Beck on topic DSUSB

I got my DSUSB today and tested it with my daughter's Windows 10 machine, and it successfully exposed for 40 seconds. (gphoto can only go to 30 seconds, the slowest pre-programmed shutter speed.)

In my tests with INDI, the shutter was not triggered. The only file I have is the indi_nikon_ccd log file (attached). I'm on IRC with this user name if you would like to contact me in real time.

2nd try with full debugging attached. (note mapped to /dev/dsusb)

3rd try with DSUSB as shutter control attached.
Last edit: 6 years 6 months ago by Richard Beck.
6 years 6 months ago #19028
Attachments:

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

  • Posts: 185
  • Thank you received: 28

Replied by Richard Beck on topic DSUSB

With the 30s exposure issue sorted for indi_nikon_ccd, I tied another test with DSUSB. The shutter never fired. The log file is attached,
6 years 6 months ago #19068
Attachments:

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

  • Posts: 185
  • Thank you received: 28

Replied by Richard Beck on topic DSUSB

Using the updated files on github, I was able to capture as follows, 1 @ 40s, 3 @ 40s and 3 @120s. Log file is attached.
6 years 6 months ago #19074
Attachments:

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

  • Posts: 185
  • Thank you received: 28

Replied by Richard Beck on topic DSUSB

Interestingly, alternate files were debayered fits files. I ran an additional test with 10 x 40s exposures, prefixed Ten_DSUB_Test. In the attached screenshot, the 32.5MB files are gray (need debayering) and the 48.3 MB files are already debayered (open as RGB in PixInsight).

I have also attached the indi_nikon_ccd log of this capture session.
6 years 6 months ago #19080
Attachments:

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

  • Posts: 13
  • Thank you received: 0

Replied by Christopher Rose on topic DSUSB

So can you state that the DSUSB will work with INDI?, I'm poised to get one for my D7000 but waiting until I know it works.

Regards

Chris
6 years 6 months ago #19091

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

  • Posts: 185
  • Thank you received: 28

Replied by Richard Beck on topic DSUSB

Yes, DSUSB is working with the version that's in the Git repository. I don't know when it will be in the PPA. The issue I had on bayered/debayered files should not be a problem if the images are saved to the camera's SD card in NEF format.
6 years 6 months ago #19092

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

Replied by Jasem Mutlaq on topic DSUSB


From the log, it downloads two images. First is NEF, then after the next exposure, it downloads JPG of the former exposure. I think maybe in your settings you set it to downloads both RAW+JPG? This is not supported in the driver, you must choose one of them at a time.
6 years 6 months ago #19093

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

  • Posts: 185
  • Thank you received: 28

Replied by Richard Beck on topic DSUSB

I accidentally set that mode via one of the Windows software that I used to test my DSUSB and forgot to reset it to RAW only :-(. I noticed this setting before I saw your reply.

After resetting to RAW only, I performed additional tests, and all images came out as bayered (gray in PixInsight). However, the first image in the sequence queue was larger than the subsequent ones (see screenshot). The FITS headers say the first file is 4948x3280 and the subsequent files are 4928x3264. I have repeated the test and get the same results.

I can confirm that for the DSUSB to work, the target needs to be the SD card.
6 years 6 months ago #19108
Attachments:

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

  • Posts: 6
  • Thank you received: 2

Replied by Chris Guidry on topic DSUSB

Hi RDBeck! I just got my DSUSB and I'm trying to use it with my Nikon D3200. As I'm looking through the logs you posted, I'm seeing that you mapped the DSUSB to /dev/dsusb. Can you say more about how you did that? My DSUSB mounts to /dev/usb/hiddev0 on my Ubuntu laptop. Are you entering "DSUSB" in the shutter release port for the INDI Nikon driver in Ekos? Or are you entering "/dev/dsusb"? You seem to be the only person on the internet who has posted success with INDI and DSUSB :D
5 years 6 months ago #29087

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

  • Posts: 6
  • Thank you received: 2

Replied by Chris Guidry on topic DSUSB

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!
5 years 6 months ago #29089
Attachments:

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

  • Posts: 185
  • Thank you received: 28

Replied by Richard Beck on topic DSUSB

I mapped the DSUSB to /dev/dsusb using a rule in in /etc/udev/rules.d. I named the file /etc/udev/rules.d/70-dsusb.rules and the contents are
ATTR{idVendor}=="134a" ATTR{idProduct}=="9021" GROUP="users", MODE="0666" SYMLINK+="dsusb"

I stopped using my DSLR some months ago and cannot recall what I put in the shutter release in EKOS. I didn't stop using the DSLR because of INDI. I stopped because I had some strange image artifacts with my D7000 which I couldn't seem to get out with calibration. I'm now working on getting and ASI 1600MM Pro plus filter wheel sorted out so I can image.
The following user(s) said Thank You: Chris Guidry
5 years 6 months ago #29128

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

Replied by Jasem Mutlaq on topic DSUSB

Chris, nice investigation skills you got there! It looks like that gphoto->dsusb is NULL for whatever user (since it gets skipped). Can you debug the code and verify this? If you're using Qt Creator, make sure to set GDB options as illustrated on the 2nd video in the development tutorial.

If you prefer to work from the command line, then you can do this:
gdb --eval-command="set follow-fork-mode child" --args indiserver -v indi_nikon_ccd
start
b gphoto_driver.cpp:1580
b gphoto_driver.cpp:1112

Then use the driver as usual, it should break at those lines. If for whatever reason 1580 is called more than one then it resets the dsusb variable to nullptr. Also check what happens at 1112 when it checks to see if dsusb is initialized.
5 years 6 months ago #29136

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

Time to create page: 0.440 seconds