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

BeginQHYCCDLive() does not work for QHY5IIL-M #5

Open
ykm2006 opened this issue Oct 6, 2014 · 7 comments
Open

BeginQHYCCDLive() does not work for QHY5IIL-M #5

ykm2006 opened this issue Oct 6, 2014 · 7 comments

Comments

@ykm2006
Copy link

ykm2006 commented Oct 6, 2014

The demo program initandcapture.cpp in demo/QHY5IIL-M does not work. Followings are response:

$ ./initandcapturetest
Init SDK success!
Yes!Found QHYCCD,the num is 1
camid is :QHY5LII-M-6037d510f33c7353
Open QHY5LII-M success!
Init QHY5LII-M success!
Set QHY5LII-M resolution success!
Begin Live Video success!

and then it stalls.

Looking into inside the library code, it looks like there is infinity loop in QHYCAM::readUSB2BForQHY5IISeries() in qhycam.cpp. No further investigation is done.

Environment:
host: Ubuntu 14.04 amd64 on VirtualBox 4.3.14.r95030

@ykm2006
Copy link
Author

ykm2006 commented Oct 13, 2014

I attempted to reduce resolution from 1280x960 to 640x480 and set the USB traffic to 1000 in initandcapture.cpp then the capture was successful.

figure1

I will attempt to issue a pull request to show you what was done in initandcapture.cpp, then could you please investigate the root cause?

@qhyccd-lzr
Copy link
Owner

it is working now.please try.

@ykm2006
Copy link
Author

ykm2006 commented Aug 8, 2015

Thanks, I will give a try.

@ykm2006
Copy link
Author

ykm2006 commented Aug 14, 2015

Unfortunately it still does not work with my environment. With the VirtualBox environment, the sample code SingleFrameSampletest.cpp recently you provided got some fatal errors. Following is the result:

ykm2006@taurus:~/Build/QHYCCD_Linux/sample$ ./SingleFrameSampletest 
Init SDK success!
Yes!Found QHYCCD,the num is 1 
connected to the first camera from the list,id is QHY5LII-M-6037d510f33c7353
Open QHYCCD success!
Init QHYCCD success!
GetQHYCCDChipInfo success!
CCD/CMOS chip information:
Chip width 4.800000 mm,Chip height 3.600000 mm
Chip pixel width 3.750000 um,Chip pixel height 3.750000 um
Chip Max Resolution is 1280 x 960,depth is 8
SetQHYCCDResolution success!
SetQHYCCDBinMode success!
2015-08-14 16:55:30.341 LOG_FATAL libusb_bulk_transfer iTXD (qhycam.cpp):634 
2015-08-14 16:55:30.342 LOG_FATAL libusb_bulk_transfer iTXD (qhycam.cpp):634 
ExpQHYCCDSingleFrame success!
2015-08-14 16:55:30.543 LOG_FATAL libusb_bulk_transfer iTXD (qhycam.cpp):634 
2015-08-14 16:55:30.716 LOG_FATAL BadFrames=1 CurrentFrameSize=998405 (cmosdll.cpp):160 
2015-08-14 16:55:31.260 LOG_FATAL BadFrames=2 CurrentFrameSize=1072896 (cmosdll.cpp):160 
2015-08-14 16:55:31.536 LOG_FATAL BadFrames=3 CurrentFrameSize=1070610 (cmosdll.cpp):160 
2015-08-14 16:55:31.814 LOG_FATAL BadFrames=4 CurrentFrameSize=1063936 (cmosdll.cpp):160 
2015-08-14 16:55:32.087 LOG_FATAL BadFrames=5 CurrentFrameSize=1118289 (cmosdll.cpp):160 
2015-08-14 16:55:32.370 LOG_FATAL BadFrames=6 CurrentFrameSize=1039616 (cmosdll.cpp):160 
^C
ykm2006@taurus:~/Build/QHYCCD_Linux/sample$ 

Host environment is as follows:
Ubuntu 15.04 amd64 on VirtualBox 5.0.0.r101573

I attempted the same code on my IC8300 Linux and it got different result; I got segfault. I reported in issue #13 then please also take a look at it. For me #13 has higher priority since my current project is on IC8300 environment.

@GuLinux
Copy link

GuLinux commented Aug 14, 2015

I would try on a real machine first, in my experience I always had problems with virtual environments and USB cameras, both with windows and linux guests.

@ykm2006
Copy link
Author

ykm2006 commented Aug 14, 2015

Thanks GuLinux for the suggestion. I agree that virtual environment has speed performance issues with USB transmission, then this particular issue may come from it. Actually I was testing the latest library 0.1.6 with a real machine (architecture is not Intel though), then found the issue #13. I wanted to test with Intel arch then found this issue. As I noted my priority is on #13 right now, then I wanted to report this as a followup experiment to what lzr has notified me that it is working now.

@qhyccd-lzr
Copy link
Owner

hi
is there any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants