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

QHYCCD drivers [ERROR] GetQHYCCDSingleFrame error (-1) #1059

Closed
AradoSKY opened this issue Dec 26, 2019 · 12 comments
Closed

QHYCCD drivers [ERROR] GetQHYCCDSingleFrame error (-1) #1059

AradoSKY opened this issue Dec 26, 2019 · 12 comments
Labels

Comments

@AradoSKY
Copy link

Hello,

Here are two files showing QHYCCD drivers for PoleMaster and QHY5LII are not playing well with INDI. These two drivers error out with [ERROR] GetQHYCCDSingleFrame error (-1). This prevents polar alignment for KSTARS. On Random occasions, Polar Alignment with QHYCCD will work. QHYCCD drivers work after multiple [ERROR] GetQHYCCDSingleFrame error (-1) errors. No rhyme or reason is given in any INDI logs.

Attempting different USB settings, buffer sizes, resolutions, capture seconds, and others does nothing to prevent [ERROR] GetQHYCCDSingleFrame error (-1). I have another camera, ZWO ASI 120MM. The ASI 120MM works as described.

When capturing, under Polar Align, QHYCCD drivers fail after 67 seconds. EKOS shows the QHY disconnect with INDI.

All QHYCCD drivers enumerate without issue within INDI. When attempting to use, the QHY drivers dump many [ERROR] GetQHYCCDSingleFrame error (-1) and mostly never work.

2019-12-26-PolarAlign-Errors.txt

2019-12-24 PolarAlign Camera.txt

@AradoSKY AradoSKY added the bug label Dec 26, 2019
@knro
Copy link
Contributor

knro commented Dec 27, 2019

Please enable debug logging and re-attach the logs.

@AradoSKY
Copy link
Author

AradoSKY commented Dec 27, 2019

Hello Knro,

Thank you for checking. Here are my recent efforts of debugging. I am using the PoleMaster for Polar Alignment. I get the same errors with the QHY5L-II-C. KSTARS crashes now when attempting to Polar Align with PoleMaster and EKOS. I am including the output logs of KSTARS, qhy-ccd-test and LDD.

indi_qhy_ccd_13:41:32.log
2019-12-27-qhy-ccd-test-output.txt
LLD.txt
log_12-03-42.txt

@AradoSKY
Copy link
Author

AradoSKY commented Dec 29, 2019

Hello,
The INDI nightly arrived. I updated the 85-qhyccd.rules file with your supplied file from another thread. I have updated to the current release. I conducted a test with the PoleMaster and QHY5L-II-C. Both continue to fail with [ERROR] GetQHYCCDSingleFrame error (-1). Both LOG files are too big to upload. I will attempt to compress and try again.
log_20-20-00.txt.tar.gz
indi_qhy_ccd_01:20:36.log.tar.gz

@knro
Copy link
Contributor

knro commented Dec 29, 2019

Ok I was wondering if this is due to updated libqhy? can you build the indi-qhy driver against older libqhy from Github and see if that works?

@AradoSKY
Copy link
Author

AradoSKY commented Dec 29, 2019 via email

@AradoSKY
Copy link
Author

AradoSKY commented Dec 30, 2019

Hello,
I think I found the problem. I completed the removal of all things QHY. Then I tested. This morning on a whim, I decided to check the SYSLOG. This is what I found during the testing.

Dec 30 09:00:43 astroberry kernel: [ 7592.169498] usb 1-1.2.4.1: usbfs: process 4686 (indi_qhy_ccd) did not claim interface 0 before use

This occurs whenever the Polar Align begins a capture. The capture dies and Solver aborts.

This error also occurs when two drivers are attempting to load at the same time. I did a check and I do see indi_qhy_ccd loaded twice. There should be two because of two pieces of Hardware. So, this points more to the driver not handling the two devices.

root@astroberry:/home/astroberry# ps aux | grep indi_qhy_ccd
astrobe+ 6861 0.9 1.3 241412 12048 ? Sl 11:06 0:01 indi_qhy_ccd
astrobe+ 6865 0.9 1.3 241412 11972 ? Sl 11:06 0:01 indi_qhy_ccd
root 6957 0.0 0.0 6812 548 pts/1 S+ 11:08 0:00 grep --color=auto indi_qhy_ccd

In the QHY logs, the PoleMaster is dependent on the QHY5II driver for image processing. As such, the hand off between the two systems could be the stumbling block area to investigate. The OS stop message is the smoking gun indicating that PoleMaster and QHY5II are at odds with each other. The QHY logs confirm this disconnect. Then again, I could be off by a hundred miles.

@knro
Copy link
Contributor

knro commented Dec 30, 2019

ONLY when you do polar alignment? how about regular capture? looping..etc? There is nothing special about polar alignment per se.

@AradoSKY
Copy link
Author

AradoSKY commented Dec 30, 2019

Hello,

I just tried to conduct a stream. Yes. Even with a stream, this error with indi_qhy_ccd shows up in SYSLOG. Nothing gets captured doing as stream.

I accidentally dumped my keyboard. This closed this ticket prematurely.

@AradoSKY AradoSKY reopened this Dec 30, 2019
@AradoSKY
Copy link
Author

Hello,

Another option is not issue a claim against the indi_qhy_ccd driver. Look at tristil commented on May 20, 2014.

node-usb/node-usb#30

@knro
Copy link
Contributor

knro commented Dec 30, 2019

That's fine. However, all the low-level USB communication is happening inside the QHY SDK library and not the INDI driver. So QHY needs to fix these issues inside the SDK.

@AradoSKY
Copy link
Author

AradoSKY commented Dec 30, 2019

Hello,
Thank you. This explains the problem then. Is an issue going to raised to QHY?

I was looking at this as a permissions issue. So far, I am struck out. This is a driver issue with QHY. My work around is to use the PoleMaster for Polar Alignment. Then disable it. Then I can use the QHY5LII-C for guiding.

@AradoSKY
Copy link
Author

AradoSKY commented Dec 30, 2019

Hello,
I will close the issues. EKOS can allow multiple instances of any vendor's driver to be loaded into a Profile. The best method is 1 vendor instance in an EKOS profile. The Kernel will not allow multiple instances to be talking over USB at the same time. USB is asynchronous communication.

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

No branches or pull requests

2 participants