Thank you so much for sharing this, I have tried that on my Astroberry, now gain and offset will be adjustable. Meanwhile, the known problem of jamming will still appear after we make the change.
The jamming problem won't be resolved by reseting the USB port. I have tried the following when EKOS and KSTARS are on and off:
astroberry@astroberry:~ $ dmesg | grep -i qhy
[ 10.032707] usb 1-1.1.2: Product: QHY-8 S
[ 10.032721] usb 1-1.1.2: Manufacturer: QHY-CCD
astroberry@astroberry:~ $ sudo sh -c "echo 0 > /sys/bus/usb/devices/1-1.1.2/authorized"
[sudo] password for astroberry:
astroberry@astroberry:~ $ sudo sh -c "echo 1 > /sys/bus/usb/devices/1-1.1.2/authorized"
sh: 1: echo: echo: I/O error
However, since the camera technically is working now, thank you again for sharing your work.
Wow, that was quite an effort you made, I am currently using Astroberry + EKOS, I believe your work will solve my problem. If you don't mind, would you send me the driver first so I can get the camera to work on Astroberry?
Meanwhile, I am also curious to know what kind of modification you did to the driver to make it work, maybe I can look into the jammed connection problem with some digging and lucks.
I would keep watching this topic. I tried to replace the .HEX file with the one provided here. www.qhyccd.com/bbs/index.php?topic=5789.0 I was able to connect QHY8 afterward but there is no way for me to control the gain and offset of the camera.