×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

QHY9 INDI driver using libqhyccd

  • Posts: 13
  • Thank you received: 1
Hello folks,

I've completed a preliminary version of a QHY9 driver for INDI. It uses QHY's SDK for Linux, so I don't have to worry about scan lines, etc. - let them deal with it. With very few mods to the SDK I was able to get my camera to work and make a small driver:
github.com/AlexRoman/indi-qhy9-libqhyccd

The modifications are also under my github (and I've also created a pull request to lzr from QHY). See my 'work' branch on github:
github.com/AlexRoman/QHYCCD_Linux/tree/work

What works:
- Exposures at 1x1 bin
- TEC control

What needs work:
- Shutter control - I don't think QHY SDK supports this, but I have some sample code from other misc projects elsewhere
- Bin 2x2, 3x3, 4x4
- Subframing

Please give it a shot if you use QHY9 and let me know if you have issues (feel free to log an issue on github).

Thanks!
The following user(s) said Thank You: Jasem Mutlaq
9 years 8 months ago #1563

Please Log in or Create an account to join the conversation.

Thanks for the driver! Is there any chance on supporting other QHY CCDs?
9 years 8 months ago #1582

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 1
So, it would seem that QHY would like Linux to be well supported and so the QHYCCD_Linux library on github seems to be progressing somewhat. The library seems to build support for:
- enumerating all connected QHY cameras
- enumerating the controls a particular camera supports
- talking to each camera using a common API

So, it would be feasible to write a driver that recognizes all the cameras and exposes them to INDI.

That being said, their library / SDK is far from complete and sometimes doesn't work at all... For example, my guider cam is a QHY5-II, and while there's code for it in the SDK, it doesn't work. I've emailed them to ask for support, we'll see what they say. So, support for different cameras will rely on QHY...

The next driver that I'll want to write is the QHY5-II, so I can guide through Ekos. When I get working code from QHY, I'll try to do use the library and build one driver "to rule them all". But until then, all I can do is try to get it to work based on lin_guider code (which works great BTW :D) which involves staring at sequences of i2cwrite(0xhexnumber, 0xhexnumber)... Not the most fun to compare :(

But for now, my QHY9 and the existing Moonlite focuser drivers seem to work great! Exposure abort is not supported in their SDK for any of the cameras it seems, so it's a bit of a problem sometimes...

I do hope QHY get their act together on the Linux SDK front... It would be great for their business, first of all, and even better for us, consumers!

This is pretty awesome, I gotta say... This has been a pretty successful first night.. Attached is a screenshot of one 10 minute frame of IC1396 :D
9 years 8 months ago #1583
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 155
  • Thank you received: 10
Hello Alex and others,

I will move my discussion to here, since this seems a more appropriate location to discuss INDI QHY. Unfortunately, I am not seeing the success which you are having, so, perhaps someone here can tell me if this new driver has been incorporated in the KStars-bleeding just yet?

Additionally, I can add that the new driver disrupted KStars formerly working QHY driver. I can no longer connect to my QHY5 camera because of the crash.

Best wishes,
Dan
9 years 8 months ago #1603
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 1
This driver is in my personal github repository. It hasn't been merged back, as it is not ready yet. You are most likely dealing with the standard INDI driver for QHY5. I cannot help there since I am not the developer of this driver, nor do I use it. I don't have a QHY5 camera.
9 years 8 months ago #1607

Please Log in or Create an account to join the conversation.

  • Posts: 155
  • Thank you received: 10
HI Alex, I am almost worn out by all the INDI QHY stuff that does not work. I thought you asked for others to test the QHY9 code? What am I missing here? You provided a link to your github, I logged in, downloaded the .zip of your code, compiled per your instructions, and after it was in, I got the above error. Nothing worked with regard to the QHY9, and the formerly working QHY5 never connected because the server crashes.

I had a friend in England, load, compile and try it with his QHY9. Same results. Now, let me say it again, this code is not working as posted.

Dan
9 years 8 months ago #1609

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 1
I never posted any instructions for compiling the code. To which instructions are you referring to?

I will wager a guess as to what happened. You checked out the QHY_Linux from the work branch, built it, and ran sudo make install. This overwrote your /etc/udev/rules.d/85-qhyccd.rules with a non-working example. If you edit this file you will see the fxload commands it points to a QHY_HEX directory which obviously doens't exist. So you'll have to edit the file, replace QHY_HEX with the path to where you installed it. So, if you install in /usr/local, it would be /usr/local/lib/libqhyccd/firmware. After that you can run "$ sudo udevadm control --reload" to re-load the new rules. You'll have to unplug and re-plug your camera at this point if it was already plugged in.

This is part of QHY's SDK and I was unaware it was there until after, since I didn't actually run make install, but was simply pointing my LD_LIBRARY_PATH to it... If you check out the master branch from my tree, it has now removed the commands from the Makefile, so it will no longer overwrite that file. You will still have to fix the path to the firmware files.

Another thing. You are running KStars with INDI in local mode. I don't do this since I don't run make install since I start my indiserver manually and connect to it using the remote option in KStars. You can start it from the directory where you built the qhy9 code "$ indiserver ./indi_qhy9_libqhyccd_ccd".

It's unfortunate that the code doesn't work for you. If you can run the indiserver manually and post the log, I might be able to help you sort it out. The first thing I'd try is to fix your udev rules.
9 years 8 months ago #1610

Please Log in or Create an account to join the conversation.

  • Posts: 155
  • Thank you received: 10
Hello Alex,
Forgive me, I must have go to wrong place, I obviously went to a different github yesterday. No wonder it compiled and did not work.
I will read and follow your direction here and get back to you on this forum with the results.

Thanks for your fine work and help with this. One question, why do you manually start the indiserver, yet, use Ekos? Is there a particular reason to not allow Ekos to "Start INDI"?

Best wishes,
Dan
9 years 8 months ago #1617

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 1
No worries. Please use the master (default) branches for both the QHY Linux SDK and the QHY9 driver now. I have just updated the QHY9 driver to have shutter control for dark and bias frames. Also binning seems to work, except 3x3 which produces a garbled image... Make sure your udev rules.d for QHY cameras don't get overwritten, if you already have some. Verify with lsusb that the device shows up with vid/pid 1618:8301 with firmware and 1618:8300 without firmware.

I run the indiserver manually since the driver is still in development and there is no point installing it, so it wouldn't be in a path that Ekos knows about. In addition, like I said, I am able to get logs out of my driver so I can see what's going on. Nothing prevents you from running make install and using Ekos to start INDI. Due to the naming, the driver shouldn't conflict with the already existing qhy_ccd driver. It should show up as "QHY 9" in your list of drivers.
9 years 8 months ago #1618

Please Log in or Create an account to join the conversation.

  • Posts: 155
  • Thank you received: 10
Thanks Alex, I will work on this today, and hopefully, get back to you later today. I have many of the QHY cameras to test with, so maybe this will be the breakthrough that many are waiting for.

As for starting the INDI, sounds ok to me, though, I do hope this integrates at some later time.

Best wishes,
Dan
9 years 8 months ago #1619

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 1
Unfortunately, it's mostly up to QHY to release a working SDK. As it stands, I've had to modify it to get it to work properly. It doesn't help that they don't have any code samples to give you an idea as to how it's intended to work... Most of it is guess work :(

For sure, when the driver is mature enough to be accepted to INDI upstream it will become part of the regular distribution. In the meanwhile, like I said, you could run sudo make install from the library and the driver and that way it should be picked up by Ekos. That being said, I don't know what happens to the logs (stderr) of the driver processes in that case.
9 years 8 months ago #1621

Please Log in or Create an account to join the conversation.

  • Posts: 155
  • Thank you received: 10
Hello Alex,
I must admit, I am a poor github / cmake user. I seem to be getting the files fouled into the wrong directories. Please, take a look at the error log and maybe you can suggest what gets merged into where.

Best wishes,
Dan
Last edit: 9 years 8 months ago by Dan Holler. Reason: log file did not appear attached.
9 years 8 months ago #1624

Please Log in or Create an account to join the conversation.

Time to create page: 0.993 seconds