Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QHY camera loads different driver after reboot #884

Open
joliveira98 opened this issue Jan 17, 2024 · 1 comment
Open

QHY camera loads different driver after reboot #884

joliveira98 opened this issue Jan 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@joliveira98
Copy link

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.

@joliveira98 joliveira98 added the bug Something isn't working label Jan 17, 2024
@278261631
Copy link

From the current information, it is challenging to determine the nature of the problem, but whatever it is, it seems unrelated to INDI.

After connecting the camera, there is an ID conversion, but not as described. Normally, USB IDs like 1618 0920 should convert to 1618 0921, and 1618 0901 should convert to 16c0 196d.

As the specific model of the device cannot be determined from the error messages, perhaps providing a photo of the device label might be necessary.

You can use the journalctl -f command to check what specifically happens during the insertion or removal of the USB device; there might be some hints.

Also, pay attention to the SDK version used during the operation and the SDK version that INDI is currently using (and its path).

# Check SDK version
ls -al /usr/local/lib/libqhy*
# Check dependency
ldd /usr/bin/qhy_ccd_test | grep libqhy*
ldd /usr/bin/indi_qhy_ccd | grep libqhy*

Providing additional system details may be helpful:

# System environment
uname -r

cat /etc/*-release

lsb_release -a

uname -m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants