QHYCCD

QHY462C problems under Linux

QHY462C problems under Linux
« on: May 28, 2021, 11:28:30 AM »
Hi,

I tried getting the QHY462C to work under linux but failed.

The 2 biggest problems where:
- constant camera crashes (see below for exact description, making the camera practically unusable on linux amd64)
- 35 fps max (also a huge drawback for a planet camera)

As for the 35fps i was not able to do anything about it, no additional hub, no different cable or anything would change that, seems to be a limitation of libqhyccd.so.

But the biggest problem was, that the cam would freeze after just a few frames in firecapture.
(tested with firecapture 2.7 beta 4, the current version)
I tested with both qhyccd sdk version sdk_linux64_21.02.01 and sdk_linux64_21.03.13, made no difference.


The cam would either not start or freeze after just a few frames.

After setting `echo 200 >/sys/module/usbcore/parameters/usbfs_memory_mb` the cam would sustain a few seconds until freeze.

Freeze means the camera was "dead" and libqhyccd.so hung until the cam was removed from the system and re-attached.

After not getting enough debug info from firecapture i made your LiveFrameMode work under newer linux systems, activated the opencv example you left in there and made it show more than one frame ;)
https://gist.github.com/gebi/f85de8444d81961fb432d3fa1f23ddeb

Though that showed the same behaviour.
After a few seconds at maximum cam freezes and is dead until re-attach.

With the LiveFramMode example i was able to gather debug logs, the important line being:

> QHYCCD|LIBUSBIO.CPP|asyImageDataCallBack|LIBUSB_TRANSFER_STALL

After this line the cam does not work until re-attaching it to the system.

i've attached the full log in this post, hope it helps!
If you want me to test a few things i can do so, though there is a time limit here because i'll return the camera. (with the exact same setup the asi462 works perfectly fine without issues and delivers >500fps for smaller ROI).

greets,
Michael

Re: QHY462C problems under Linux
« Reply #1 on: May 30, 2021, 09:01:10 PM »
Hi,
    Well,I need test it,please wait for some time.
Best Regards,
QinXiaoXu

Re: QHY462C problems under Linux
« Reply #2 on: May 30, 2021, 10:13:14 PM »
Hi,
    I tested QHY5III462C on my Linux 64 device,it can get 135 fps,and captured repeatly,you can try this SDK and sample.
Best Regards,
QinXiaoXu

Re: QHY462C problems under Linux
« Reply #3 on: May 31, 2021, 12:00:32 PM »
hi QinXiaoXu!

thx for the quick reply, i've tested it and still have the same issues.
I only got this output in one out of 3 tries:

QHYCCD|QHYCCD.CPP|BeginQHYCCDLive|return value=0
QHYCCD|3A QHY5IIIBASE.CPP|GetLiveFrame|SKIP one frame
QHYCCDRD|CMOSDLL.CPP|IoThread|raw_fps = 125.400002 out_fps = 125.000000  raw_data_speed=0.000000
QHYCCDRD|CMOSDLL.CPP|IoThread|raw_fps = 92.599998 out_fps = 92.000000  raw_data_speed=0.000000
QHYCCDRD|CMOSDLL.CPP|IoThread|raw_fps = 0.000000 out_fps = 0.000000  raw_data_speed=0.000000
QHYCCDRD|CMOSDLL.CPP|IoThread|raw_fps = 0.000000 out_fps = 0.000000  raw_data_speed=0.000000
QHYCCDRD|CMOSDLL.CPP|IoThread|raw_fps = 0.000000 out_fps = 0.000000  raw_data_speed=0.000000

All other executions with your LiveFrameSample.cpp showed all 0 for fps.
(i've disconnected and the cam for each test, to reset the cam)
I've used the header files from sdk_linux64_21.03.13 to compile the sample.

I've attached the complete output with qhyccd.ini with debug.debugOutPut = true.

I've also tested with different usb cables, including one known good configuration for the asi462.

I've also tried the new libqhyccd.so.21.5.10.14 with firecapture 2.7beta4 and it shows the same behaviour of sometimes showing a few frames at the beginning and then freezing and never working again until replugin of cam.

Re: QHY462C problems under Linux
« Reply #4 on: May 31, 2021, 08:23:48 PM »
Hi,
    Please try setup traffic to be 60 and expose time to be 50*1000,and check if it still hung.
Best Regards,
QinXiaoXu

Re: QHY462C problems under Linux
« Reply #5 on: June 01, 2021, 06:02:57 AM »
hi,

Still having the same issues. The best i managed was just a few frames before cam freezing:
I've attached logs of two runs (both with re-attaching the camera)

QHYCCD|QHYCCD.CPP|BeginQHYCCDLive|return value=0
QHYCCD|3A QHY5IIIBASE.CPP|GetLiveFrame|SKIP one frame
QHYCCDRD|CMOSDLL.CPP|IoThread|raw_fps = 0.400000 out_fps = 0.000000  raw_data_speed=0.000000
QHYCCDRD|CMOSDLL.CPP|IoThread|raw_fps = 0.000000 out_fps = 0.000000  raw_data_speed=0.000000

As per your instruction i got the following diff

diff --git a/LiveFrameSample.cpp b/LiveFrameSample.cpp
index cba8abe..73fce51 100644
--- a/LiveFrameSample.cpp
+++ b/LiveFrameSample.cpp
@@ -194,9 +194,9 @@ int main(int argc,char *argv[])

     ret = SetQHYCCDParam(camhandle, CONTROL_GAIN, 10);
     ret = SetQHYCCDParam(camhandle, CONTROL_OFFSET, 10);
-    ret = SetQHYCCDParam(camhandle, CONTROL_USBTRAFFIC, 0);
+    ret = SetQHYCCDParam(camhandle, CONTROL_USBTRAFFIC, 60);^M
     ret = SetQHYCCDParam(camhandle, CONTROL_DDR, 1.0);
-    ret = SetQHYCCDParam(camhandle, CONTROL_EXPOSURE, 5*1000);
+    ret = SetQHYCCDParam(camhandle, CONTROL_EXPOSURE, 50*1000);^M

Re: QHY462C problems under Linux
« Reply #6 on: June 01, 2021, 08:28:21 PM »
Hi,
    Well,do you have Windows device?If so,please test it on Windows with SharpCap,check if it has same issue.If Windows also have this issue,it maybe a hardawre issue.
Best Regards,
QinXiaoXu

Re: QHY462C problems under Linux
« Reply #7 on: June 07, 2021, 10:52:28 AM »
sry, no windows around to test this.

Re: QHY462C problems under Linux
« Reply #8 on: June 07, 2021, 09:05:16 PM »
    Well,OK,from the debug info,the camera can get frame,but it will freeze later.I found a similar issue,that camera also will freeze after some time,that is because camera can't heat dissipation effectively,maybe your camera have same issue.
Best Regards,
QinXiaoXu