×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

QHY5 not found by Ekos

  • Posts: 389
  • Thank you received: 15

Replied by John Robison on topic QHY5 not found by Ekos

Hello,

Success! I have both QHY5L-II and PoleMaster recognized by EKOS. I created custom rules from 85-QHYCCD.RULES and 85-QHY-CAMERAS.RULES. I preserved the original files in a specific folder. I updated the rules and rebooted the PI. EKOS picked both devices up using Device Manager.
The following user(s) said Thank You: Jasem Mutlaq
4 years 9 months ago #40296

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

Replied by Jasem Mutlaq on topic QHY5 not found by Ekos

What are the contents of the 2nd file?
4 years 9 months ago #40297

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

  • Posts: 61
  • Thank you received: 8

Replied by Odiug on topic QHY5 not found by Ekos

@AradoSKYindi:
Where are the INDI-QHYCCDcamera.rule and INDI- QHYCCD.rule coming from? The original INDI 3rdparty drivers come with a QHYCCD rule file called "85-qhyccd.rules".
In this file both pairs 1618:0920 and 1618:0921 can be found. For the first pair the firmware is loaded with the help of "fxload". Then the QHYCCD device renumerates and comes back as 1618:0921, which triggers the second rule which just sets the permission to read/write for everybody.
Same holds for 1618:0940 and 1618:0941.

Ideally there should not be any tinkering necessary with the rules files. I was suspecting that maybe another package or manual editing interfered with the original rules files.

Also a -D without an argument does not make sense. Something must be wrong there.

CS
Guido
4 years 9 months ago #40300

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

  • Posts: 61
  • Thank you received: 8

Replied by Odiug on topic QHY5 not found by Ekos

@AradoSKYindi:
You have both 85-QHYCCD.RULES and 85-QHY-CAMERAS.RULES?
Maybe one is a leftover from an older install or different package.

Ah, I see, Jasem also wonders what is in the second file...

CS
Guido
4 years 9 months ago #40301

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

  • Posts: 389
  • Thank you received: 15

Replied by John Robison on topic QHY5 not found by Ekos

Hello,

I downloaded AstroBerry from this site. Whatever is in the default package is what I have. I have since upgraded to Ubuntu-Mate 18.04.

The following are my two QHYCCD components that EKOS could not see after a KSTARS update. 1618:0921 is the QHY5L-II. 1618:0941 is the PoleMaster. I looked in /etc/udev/rules.d and found 85-QHYCCD.rules and 85-QHY-CAMERAS.rules. I searched both files for my hardware. I found older revisions 1 digit off.

I did notice a large section of Vendor provided stuff commented out. I looked for QHY5II entries. The family resemblance was 1 digit off. So, I decided to save off the originals, then pare down the file to put the Action and ATTR for both models. I also included turn off MTP check and and check not related to the devices.

I created an 85-QHYCCD-local.rules and an 85-QHY-CAMERAS-local.rules. This will keep my specific needs from being overwritten. I installed the rules , rebooted, and KSTARS worked. In fact, both products appeared under QHYCCD.
4 years 9 months ago #40304

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

  • Posts: 389
  • Thank you received: 15

Replied by John Robison on topic QHY5 not found by Ekos

Hello Oduig,

My version of both original rules files did have 0920 and 0940. The lone 0921 was commented off. No ACTION commands to FXLoad anything were attributed to 0921 or 0941.

I added/changed my files to focus exclusively on my two QHYCCD products. Both files are needed. One contains code. The other contains configuration settings. This worked.
Last edit: 4 years 9 months ago by John Robison.
4 years 9 months ago #40306

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

  • Posts: 61
  • Thank you received: 8

Replied by Odiug on topic QHY5 not found by Ekos

Be aware that udev executes ALL rules that match. Not only the first one.

However if the same rules filename exists in /etc/udev/rules.d and /lib/udev/rules.d only the one in /etc is used.
That allows you to disable rules files from /lib by creating symlinks to /dev/null under the same name in /etc, without interfering with the rules files installed by packages under /lib, who are subject to being updated.

Guido
4 years 9 months ago #40310

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

  • Posts: 94
  • Thank you received: 8
Hi,

I played around with "udevadm monitor" while plugging in the QHY5-II-M. I don't know what to make of it. It does seem to follow Guido's description of what happens when one of these cameras is plugged in, except for the fxload error. I'm including various logs for your scrutiny.

This is the syslog as I plugged in the device:
Jun 18 21:55:27 indi-pi kernel: usb 1-1.3.5.4: new high-speed USB device number 14 using dwc_otg
Jun 18 21:55:27 indi-pi kernel: usb 1-1.3.5.4: New USB device found, idVendor=1618, idProduct=0920, bcdDevice= 0.00
Jun 18 21:55:27 indi-pi kernel: usb 1-1.3.5.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jun 18 21:55:27 indi-pi mtp-probe[890]: checking bus 1, device 14: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.5/1-1.3.5.4"
Jun 18 21:55:27 indi-pi mtp-probe[890]: bus: 1, device: 14 was not an MTP device
Jun 18 21:55:27 indi-pi systemd-udevd[889]: Process '/sbin/fxload -t fx2 -I /lib/firmware/qhy/QHY5II.HEX -D ' failed with exit code 255.
Jun 18 21:55:27 indi-pi kernel: usb 1-1.3.5.4: USB disconnect, device number 14
Jun 18 21:55:29 indi-pi kernel: usb 1-1.3.5.4: new high-speed USB device number 15 using dwc_otg
Jun 18 21:55:29 indi-pi kernel: usb 1-1.3.5.4: config 1 interface 0 altsetting 0 bulk endpoint 0x81 has invalid maxpacket 64
Jun 18 21:55:29 indi-pi kernel: usb 1-1.3.5.4: config 1 interface 0 altsetting 0 bulk endpoint 0x1 has invalid maxpacket 64
Jun 18 21:55:29 indi-pi kernel: usb 1-1.3.5.4: New USB device found, idVendor=1618, idProduct=0921, bcdDevice= 0.00
Jun 18 21:55:29 indi-pi kernel: usb 1-1.3.5.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jun 18 21:55:29 indi-pi kernel: usb 1-1.3.5.4: Product: QHY5-II          
Jun 18 21:55:29 indi-pi kernel: usb 1-1.3.5.4: Manufacturer: QHY-CCD  
Jun 18 21:55:30 indi-pi mtp-probe[896]: checking bus 1, device 15: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.5/1-1.3.5.4"
Jun 18 21:55:30 indi-pi mtp-probe[896]: bus: 1, device: 15 was not an MTP device

This is the brief output from udevadm:
udevadm monitor -k -u
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
 
KERNEL[10242.584954] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.5/1-1.3.5.4 (usb)
KERNEL[10242.587013] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.5/1-1.3.5.4/1-1.3.5.4:1.0 (usb)
UDEV  [10242.716144] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.5/1-1.3.5.4 (usb)
UDEV  [10242.737332] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.5/1-1.3.5.4/1-1.3.5.4:1.0 (usb)
KERNEL[10242.902631] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.5/1-1.3.5.4/1-1.3.5.4:1.0 (usb)
KERNEL[10242.903221] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.5/1-1.3.5.4 (usb)
UDEV  [10242.912296] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.5/1-1.3.5.4/1-1.3.5.4:1.0 (usb)
UDEV  [10242.917210] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.5/1-1.3.5.4 (usb)
KERNEL[10244.879284] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.5/1-1.3.5.4 (usb)
KERNEL[10244.881772] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.5/1-1.3.5.4/1-1.3.5.4:1.0 (usb)
UDEV  [10245.000575] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.5/1-1.3.5.4 (usb)
UDEV  [10245.013969] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.5/1-1.3.5.4/1-1.3.5.4:1.0 (usb)

I plugged in a second time with more extensive logging (udevadm -k -u -p). That output is in the attached file. From above, it looks like the device attaches, removes, then reattaches. In the attached log, it looks like the first group of ADD events have something to do with the product ID "0920" and the second bunch of ADD events are related to product ID "0921".

Mind you, the camera works in Ekos. I am happy to provide any other info if you think it will help figure out why there's an fxload error in the syslog. Otherwise, I'm calling this "fixed"...

Thanks for all the help,

Charles
Ubuntu 18.04 and Raspbian Jessie; INDI 1.7.4
Mounts: CEM-60 chiefly; iEQ45
Cameras: Atik 383L+, QHY5-II-M
Focuser: Moonlite
4 years 9 months ago #40314
Attachments:

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

  • Posts: 389
  • Thank you received: 15

Replied by John Robison on topic QHY5 not found by Ekos

Hello CRW4096,

The two rule files for QHYCCD are out of sync with the QHY5LII. The driver cannot load because other configuration steps are missing. The -D has this string {env(DEVNAME)}.

This session variable is setup in 85-QHY-Cameras.rules. The 85-QHYCCD.rules has the device parameters. Check the Cameras rule first. Then, check the QHYCCD rule next. Only search in QHY and enable only QHY5II 1618 and 0921 lines. This should help you get this running.
4 years 9 months ago #40319

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

  • Posts: 61
  • Thank you received: 8

Replied by Odiug on topic QHY5 not found by Ekos

@CRW4096:
BTW, thanks for the pictures, but I would actually need to get close up shots of all PCBs from both sides, so I can see the traces.

Anybody else who has a QHY5-II and could make detailled PCB pictures? Maybe I should post this as a seperate topic...
I am interested in the differences in wiring between QHY5 and QHY5-II.

Regards
Guido
4 years 9 months ago #40326

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

  • Posts: 94
  • Thank you received: 8

There *is* no "85-QHY-Cameras.rules" file. There is only "/lib/udev/rules.d/85-qhyccd.rules". I have grep'd the entire system:
<code>$ sudo find / \( -name '*QHY*.rules' -o -name '*qhy*.rules' \) -print
/lib/udev/rules.d/85-qhyccd.rules
/home/pi/git/indi/3rdparty/libqhy/85-qhyccd.rules</code>
These are the only rules file for QHY products, and as you can see, one of them is in my copy of the git repo and hence not active. I am attaching this file for your scrutiny.

Charles

(Sorry - looks like I forgot to attach the file. I'll get it later when I'm home)
Ubuntu 18.04 and Raspbian Jessie; INDI 1.7.4
Mounts: CEM-60 chiefly; iEQ45
Cameras: Atik 383L+, QHY5-II-M
Focuser: Moonlite
Last edit: 4 years 9 months ago by Charles Wright.
4 years 9 months ago #40341

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

  • Posts: 389
  • Thank you received: 15

Replied by John Robison on topic QHY5 not found by Ekos

Hello CRW4096,

This is how I approached the problem. I look at the RULES files on my systems for QHYCCD. I had two.

I created this one. It had specific actions of setup for the QHY5LII-C. Looked over each 1618:0920 with QHY5II.hex entry. I used this template to configur the device.

85-qhy-camera-rules-local.rules

ACTION!="add", GOTO="qhy_end"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="qhy_test"
SUBSYSTEM!="usb_device", GOTO="qhy_end"

LABEL="qhy_test"

ATTRS{idVendor}=="1618", ATTRS{idProduct}=="0921", RUN+="/sbin/fxload -t fx2 -I /usr/local/openastro/lib/firmware/qhy/QHY5II.HEX -D $env{DEVNAME}"

ATTRS{idVendor}=="1618", ATTRS{idProduct}=="0941", RUN+="/sbin/fxload -t fx2 -I /usr/local/openastro/lib/firmware/qhy/POLEMASTER.HEX -D $env{DEVNAME}"

LABEL="qhy_end"

# This section is reached after the device has loaded the firmware and reset

ACTION!="add", GOTO="qhy_fw_end"
SUBSYSTEMS=="usb", GOTO="qhy_fw"
GOTO="qhy_fw_end"

LABEL="qhy_fw"

ATTRS{idVendor}=="1618", ATTRS{idProduct}=="0921*", OWNER="root", GROUP="users", MODE="0660", PROGRAM="/bin/sh -c 'i=0;while [ -e QHY5L-$i ]; do i=$(($i+1)); done; echo $i'", SYMLINK+="QHY5L-%c"

LABEL="qhy_fw_end"

This file sets up the USB communications and SYMLINK.

The next file has these additional commands. They could be combined together. I stuck with what I had. Besides, the code had terminations arleady setup. It works.

85-qhyccd.local.rules

#===============================================================================
# 1. Pre-enumerated device IDs:
#===============================================================================

# QHY
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1618", ATTRS{idProduct}=="0921", RUN+="/sbin/fxload -t fx2 -I /usr/local/lib/qhy/firmware/QHY5II.HEX -D $env{DEVNAME}"

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1618", ATTRS{idProduct}=="0941", RUN+="/sbin/fxload -t fx2lp -I /usr/local/lib/qhy/firmware/POLEMASTER.HEX -D $env{DEVNAME}"

#===============================================================================
# 2. Post-enumeration device IDs:
#===============================================================================


# QHYCCD
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1618", ATTRS{idProduct}=="0921", MODE="0666", GROUP="plugdev"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1618", ATTRS{idProduct}=="0941", MODE="0666", GROUP="plugdev"

# Stock QHY
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1618", ATTRS{idProduct}=="0921", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1618", ATTRS{idProduct}=="0941", MODE="0666"
ATTRS{idVendor}=="1618",ATTRS{idProduct}=="0921", ENV[ID_MM_DEVICE}="1"
ATTRS{idVendor}=="1618",ATTRS{idProduct}=="0921", ENV{MTP_NO_PROBE="1"

LABEL="qhy-rules-end"


I separated out the originals and created new local files. This will prevent the orginals from being overwritten.

Clear skies.
Last edit: 4 years 9 months ago by John Robison.
4 years 9 months ago #40366

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

Time to create page: 1.217 seconds