×

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

Bi-monthly release with minor bug fixes and improvements

Indi and QHY 183C [Solved]

  • Posts: 335
  • Thank you received: 19

Replied by MORELLI on topic Indi and QHY 183C

I'm continuing my investigations. I installed a Win10 on my laptop, broadcast driver wdm, ascom driver and system driver.
EZCAP seems to runs.
Firecapture recognises the camera but do anything.
Sharpcap runs with the ascom driver, slowly.

It seems to be an OS problem of Ubuntu. I don't know how to do.
4 years 2 months ago #48786

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

  • Posts: 5
  • Thank you received: 0
Hi! Same problem here with a Polemaster and Astroberry Server. I finally tracked it to a permissions issue. When I run kstars as root, it connects to the camera.

I suspect it has something to do with the QHY SDK, as in the QHYCCD web they state that the Polemaster software for rpi has to run as root. That's what I have done to temporary patch this issue:

1- Go to /usr/bin and rename driver file indi_qhy_ccd to something else. In my case, indi_qhy_ccd_binary:

#cd /usr/bin
#sudo mv indi_qhy_ccd indi_qhy_ccd_binary

2- Edit a new shell script file named indi_qhy_ccd. I used vi, you can use a fancier editor if you like it more. I'm afraid I'm old school ;)

#sudo vi indi_qhy_ccd

with these contents:

#!/bin/bash
sudo indi_qhy_ccd_binary

3- Make it executable:

#sudo chmod 755 indi_qhy_ccd

4- Modify /etc/sudoers to not ask for password when executing the script. This has to be done using the "visudo" command. DO NOT use any other editor or you risk losing root access to the computer if file ends with syntax errors.

#sudo visudo

Best way to do this will depend on distro. But adding to the end of the file this should work in most, if not any of them:

ALL ALL = (root) NOPASSWD:/usr/bin/indi_qhy_ccd_binary

In my case, what I did is:

%sudo ALL = (root) NOPASSWD:/usr/bin/indi_qhy_ccd_binary

This means that members of group sudo can execute /usr/bin/indi_qhy_ccd_binary as root without being asked for password.

After that, I'm able to connect to my polemaster executing kstars as non-privileged user.

Please note that this approach has some problems/limitations. In first place, we will be calling the closed-source QHYSDK as root. If you have any problem with that and still want to go ahead, you should do it in a machine only used for imaging and disconnected from the Internet, or in a virtual machine or docker container. And secondly, the next indi_qhy_ccd update will overwrite the newly created shell script. It can solve the issue, or not. In case not, we always could rename it again and re-create the shell script (or keep a copy in our homedir)

Note for developers: First approach I tried was setting the setuid bit in indi_qhy_ccd. For some reason, it dit not work. But setting it in qhy_ccd_test did.
4 years 2 months ago #48817

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

  • Posts: 5
  • Thank you received: 0
Hi! Wrote a long and detailed answer and got lost when tried to send it... So I'll make it short this time...

Same problem with Polemaster and Astroberry server. Tracked down to permissions problem (probably within the QHY SDK?). One solution is to run kstars as root. A more elegant one is to run only indi_qhy_ccd as root. What I did is rename indi_qhy_ccd (i.e. indi_qhy_ccd_binary), create a shell script with this name that calls "sudo indi_qhy_ccd_binary", and add the script to the sudoers file with no password flags. Line could be something like this:

ALL = (root) NOPASSWD:/usr/bin/indi_qhy_ccd_binary
Please note that sudoers file should only be edited by using the "visudo" command, or you risk losing privileged access to the computer if you make any mistakes.

Then it works. It will be rewritten by next driver update, of course, and leaving indi_qhy_ccd_binary file. If the new driver works without issue, that's it, you can delete this file. If not you can still delete it, rename the new indi_qhy_ccd, and re-create the shell script.

As a note to developers, I also tried setting the setuid bit of indi_qhy_ccd, but that did not work. It worked setting it in qhy_ccd_test though...
4 years 2 months ago #48818

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

  • Posts: 335
  • Thank you received: 19

Replied by MORELLI on topic Indi and QHY 183C

Finaly, the issue is caused by the power of the USB port not enought on this laptop and others. I try the camera with the laptop newer than mine and the result was the same.
So I bought this afternoon an usb3 hub powered 2A, and the camera becames a c184 type.
It runs well with Firecapture. With Kstars I have the connection. I can modify the parameter panel. But it fails to capture an image. The field "Exposition" into the panel Progression inits with the specified exposition, but does not move. And Ekos seems to circle until I stop the capture.
Not enought power ?

File Attachment:

File Name: log_17-10-07.txt
File Size:1,394 KB


One day later. Test on HP Pavilion DV7 with USB2, Ubuntu-Mate 18.04.3LTS. Kstars runs perfectely. I have to change my laptop ? But I would want to understand all these issues before.
Last edit: 4 years 2 months ago by MORELLI.
4 years 2 months ago #48826
Attachments:

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

  • Posts: 335
  • Thank you received: 19

Replied by MORELLI on topic Indi and QHY 183C

One day later. I install an Indigo server. With Kstars, no change, same issue. But the camera runs perfectly with the Indigo Control Panel ???????? And more, I can take pictures with the laptop only on battery without usb3 hub powered.



I am feeling a little bit alone. Help Jasem !
Last edit: 4 years 2 months ago by MORELLI.
4 years 2 months ago #48927
Attachments:

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

Replied by Jasem Mutlaq on topic Indi and QHY 183C

There shouldn't be a permission issue since the 85-qhyccd.rules file would correctly set the USB permission for all QHY cameras. I have the 168C and it works fine with the latest drivers. Not sure why would 183C would be any different.
4 years 2 months ago #48936

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

  • Posts: 335
  • Thank you received: 19

Replied by MORELLI on topic Indi and QHY 183C

Hi Jasem,

thank for your help. Could you be more specific about your answer please ? What should I do ?
4 years 2 months ago #48937

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

  • Posts: 5
  • Thank you received: 0
I don't think either the problem are USB permissions. What I think is the QHY closed source library is trying to do something for which it needs superuser privileges. No idea what could it be. Accessing shared memory, system calls... Who knows. You not having the problem could be because of different kernel, or even different distros or releases. The fact remains that I can't open the Polemaster when running indi_qhy or qhy_ccd_test as a normal user, and that happened after an update that upgraded the libqhy version. On the other side, they happily run as root, or with the SETUID bit enabled in the case of qhy_ccd_test. No problem opening the stream or capturing frames as root. I do not have access to the hardware today, I'll try to grab it tomorrow, run some tests and dig into the logs...

You could try running kstars as root and see if that does the trick. You probably know how to do it, but just in case you don't, open a terminal and execute the following:
sudo kstars
4 years 2 months ago #48976

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

  • Posts: 335
  • Thank you received: 19

Replied by MORELLI on topic Indi and QHY 183C

Thank you for your message. I try as su, but no way. At the connection I have a windows with the message "Indi driver crashed , Continue - No".
I had installed the last skf from QHY website. Now the driver crashed every time. I try to come back to the previous one.

With the previous SDK, no crash the first time, but no capture. When I deconnecte and stop indi, the indi server is not closed in memory. I lauch again Kstars, same crash as above. I need to reboot the computer.

All the computer I tested , run with the same OS, Ubuntu-Mate 18.04.3LTS. I 'll try with an another distribution as Debian.

File Attachment:

File Name: log_13-49-49.txt
File Size:156 KB
Last edit: 4 years 2 months ago by MORELLI.
4 years 2 months ago #49015
Attachments:

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

  • Posts: 5
  • Thank you received: 0
You are probably right, and the driver is crashing because of the updated SDK. But now it sees your camera and tries to initialize it, and that's good. I think the fastest way to get the proper sdk would be to get it from indi repository again. And the driver also, just to be sure... You could try this:
sudo apt install --reinstall -y indi-qhy libqhy

And lets see what happens then when running kstars as root...

On the other hand, I tried to run some tests and see if there are system messages related to the driver being unable to open the camera when running unprivileged, but none at all. The only I can say is that trying to run as non-root fails:
qhy_ccd_test 
QHY Test CCD using SingleFrameMode, Version: 1.00
QHYCCD|QHYCCD.CPP|InitQHYCCDResource| START
QHYCCD|QHYCCD.CPP|InitQHYCCDResourceInside|InitQHYCCDResourceInside   START
QHYCCD|QHYCCD.CPP|InitQHYCCDResourceInside|    InitQHYCCDResourceInside   END
QHYCCD|QHYCCD.CPP|ScanQHYCCD|START
QHYCCD|QHYCCD.CPP|DeviceIsLIBUSBQHYCCD|vid = 1618 pid = 941
Open QHYCCD error
QHYCCD|QHYCCD.CPP|InitQHYCCDResource| END
SDK resources initialized.
No QHYCCD camera found, please check USB or power.

The same as root, succeeds. So I'll stick with the crude shell script solution, that is working so far...
4 years 2 months ago #49044

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

  • Posts: 335
  • Thank you received: 19

Replied by MORELLI on topic Indi and QHY 183C

ALELUIA ! It runs ! I installed the SDK as you say. Thank you very very very much. I can keep my computer with its real 10-hour battery life !

Robert MORELLI
France
4 years 2 months ago #49090

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

  • Posts: 5
  • Thank you received: 0
Glad to know you got it running. Clear skies!
4 years 2 months ago #49093

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

Time to create page: 3.416 seconds