indilib / indi

INDI Core Library Repository
https://www.indilib.org
GNU Lesser General Public License v2.1
366 stars 387 forks source link

QHY camera loads different driver after reboot #1973

Closed joliveira98 closed 8 months ago

joliveira98 commented 9 months ago

I have built the INDI library to use my QHY5-II color camera with indi-allsky. After building the library and setting up indi-allsky, I rebooted my Raspberry Pi 3, ran "lsusb" and got the following:

cloco2@raspberrypi:~$ lsusb
Bus 001 Device 005: ID 16c0:296d Van Ooijen Technische Informatica QHY5-CMOS

After running the qhy_ccd_test I got the following output saying that my color camera was a mono camera and that my camera ID was "QHY5-M-":

cloco2@raspberrypi:~$ ghy_ccd_test
QHY Test CCD using Single FrameMode, Version: 1.00
qhyccd.cpp param
QHYCCD | QHYCCD.CPP|InitQHYCCDResource () | START
QHYCCD | QHYCCD.CPP | InitQHYCCDResource | auto detect camera:false, call InitQHYCCDResourceInside QHYCCD | QHYCCD.CPP|InitQHYCCDResource Inside | START
QHYCCD | QHYCCD.CPP|libusb_version 1.0.24.11584
QHYCCD|QHYCCD.CPP|libusb_init (libqhyccd_context) called...
QHYCCD | QHYCCD.CPP|InitQHYCCDResource Inside | numdev set to 0
QHYCCD | QHYCCD.CPP|InitQHYCCDResourceInside | END
**************** config file path
23.7.16.17 svn: 1
QHYCCD | QHYCCD.CPP|InitQHYCCDResource | Load ini filePath = /home/cloco2 SDK resources initialized.
Number of QHYCCD cameras found: 1
fileName = qhyccd.ini
Application connected to the following camera from the list: Index: 1, cameraID=QHY5-M- Open QHYCCD success.
SetQHYCCDStreamMode set to: 0, success.
InitQHYCCD success.
GetQHYCCDOverScanArea:
Overscan Area startX x startY:
0 x 0
Overscan Area sizeX x sizeY : 0x0
GetQHYCCDEffectiveArea:
Effective Area startX x startY: 0 x 0 Effective Area sizeX x sizeY : 0 x 0
GetQHYCCDChipInfo:
Effective Area startX x startY:
Chip size width x height
Pixel size width x height
Image size width x height
This is a mono camera.
0 x 0
: 6.600 x 5.320 [mm]
: 5.200 x 5.200 [um)
: 1280 x 1024
SetQHYCCDParam CONTROL GAIN set to: 10, success
Default read mode: 0
Default read mode name STANDARD MODE
Read mode name STANDARD MODE
GetQHYCCDChipInfo in this ReadMode: imageW: 1280 imageH: 1024 SetQHYCCDParam CONTROL EXPOSURE set to: 1, success.
SetQHYCCDResolution roiStartXx roiStartY:
0 x 0
SetQHYCCDResolution roiSizeX x roiSizeY: 1280 x 1024
SetQHYCCDBinMode set to: binX: 1, binY: 1,
ExpQHYCCDSingle Frame (pCamHandle) start... ExpQHYCCDSingle Frame (pCamHandle) end...
-
ExpQHYCCDSingle Frame success (8193).
Allocated memory for frame: 6204480 [uchar].
success.
GetQHYCCDSingle Frame: 1280 x 1024, bpp: 8, channels: 1, success.
CancelQHYCCDExposingAndReadout success.
Close QHYCCD success.
SDK resources released.
cloco2@raspberrypi:~ $

In indi-allsky the same ID was found (QHY5-M-) and no image was taken. I've decided to unplug and replug the USB again and the driver shown in lsusb had switched to:

cloco2@raspberrypi:~/Desktop/indi-allsky $ lsusb
Bus 001 Device 007: ID 1618:0921 QHY-CCD QHY5-II

Here's the qhy_ccd_test again with the new driver loaded showing that it is indeed a color camera with ID "QHY5LII-C-6117da60£33c7354":

cloco2@raspberrypi:~$ qhy_ccd_test
QHY Test CCD using Single FrameMode, Version: 1.00
qhyccd.cpp param
QHYCCD | QHYCCD.CPP|InitQHYCCDResource () | START
QHYCCD | QHYCCD.CPP|InitQHYCCDResource | auto_detect_camera:false, call InitQHYCCDResourceInside QHYCCD | QHYCCD.CPP|InitQHYCCDResource Inside | START
QHYCCD|QHYCCD.CPP|libusb_version 1.0.24.11584
QHYCCD|QHYCCD.CPP|libusb_init (libqhyccd_context) called...
QHYCCD | QHYCCD.CPP|InitQHYCCDResource Inside | numdev set to 0
QHYCCD | QHYCCD.CPP|InitQHYCCDResourceInside | END
******
*************** config file path
23.7.16.17 svn: 1
******
fileName = ghyccd.ini
QHYCCD | QHYCCD.CPP|InitQHYCCDResource | Load ini filePath = /home/cloco2 SDK resources initialized.
Number of QHYCCD cameras found: 1
Application connected to the following camera from the list: Index: 1, cameraID = QHY5LII-C-6117da60£33c7354 Open QHYCCD success.
SetQHYCCDStreamMode set to: 0, success.
InitQHYCCD success.
GetQHYCCDOverScanArea:
Overscan Area startX x startY : 0 x 0
Overscan Area sizeX x sizeY : 0 x 0
GetQHYCCDEffectiveArea:
Effective Area startX x startY: Effective Area sizeX x sizeY :
GetQHYCCDChipInfo:
Effective Area startX x startY:
Chip size width x height Pixel size width x height Image size width x height
This is a color camera.
0 x 0
0 x 0
0 x 0
: 4.800 x 3.600 [mm]
: 3.750 x 3.750 [um]
: 1280 x 960
SetQHYCCDParam CONTROL_USBTRAFFIC set to: 10, success. SetQHYCCDParam CONTROL GAIN set to: 10, success
SetQHYCCDParam CONTROL_GAIN set to: 140, success.
Default read mode: 0
Default read mode name STANDARD MODE
Read mode name STANDARD MODE
GetQHYCCDChipInfo in this ReadMode: imageW: 1280 imageH: 960 SetQHYCCDParam CONTROL_EXPOSURE set to: 1, success.
SetQHYCCDResolution roiStartX x roiStartY: 0 x 0
SetQHYCCDResolution roiSizeX x roiSizeY : 1280 x 960
SetQHYCCDBinMode set to: binX: 1, binŸ: 1, success.
SetQHYCCDParam CONTROL_GAIN set to: 10, success.
ExpQHYCCDSingle Frame (pCamHandle) start...
ExpQHYCCDSingle Frame (pCamHandle)
end...
ExpQHYCCDSingle Frame success (8193).
Allocated memory for frame: 5851200 [uchar].

After this, I checked indi-allsky and the new color driver was detected and I was already getting images. I rebooted the system again and the incorrect mono driver loaded once again. After the USB unplug and replug the color driver loaded and I got image.

The expected here would be for the color driver to always load... I'm not sure why it is loading the mono driver when I reboot the system. Let me know if you require more details, I can easily reproduce this so let me know if you need more info.

PS: I would have opened this issue in the forum directly but I'm not able to register, the captcha is endlessly looping and I can't submit the register form.

knro commented 8 months ago

This belongs in 3rd party repo issues. Closing.