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.

Read More...