×

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

Bi-monthly release with minor bug fixes and improvements

ZWO EFWmini (filter wheel)

  • Posts: 85
  • Thank you received: 40

Replied by Hans on topic ZWO EFWmini (filter wheel)

I run indiserver not as root and my ASI filter wheel works fine.
So there must be something wrong with your udev rules where you need to run it as root.

Oh, and I also do not have to make sure the wheel is at position 1 when starting indiserver.

-- Hans
The following user(s) said Thank You: Adrian
Last edit: 7 years 3 months ago by Hans. Reason: add wheel remark
7 years 3 months ago #13315

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

  • Posts: 89
  • Thank you received: 16

Replied by Adrian on topic ZWO EFWmini (filter wheel)

Thanks for the suggestion regarding permissions.

I am fighting to fix my permissions problem but still don't know what is wrong.

I wonder if indi is doing something weird. I can access and control the filter wheel as my ordinary user using the SDK, but
I can only use it in indi if I start indiserver as the super user.

Server:Raspberry Pi III on jessie and latest indi
indi on server started on cli after ssh to box, see examples below

Client:Kstars 2.7.2 Arch Linux (kstars 16.12.0-1)
Indi on client started via EKOS in Kstars, profile set to CCD Simulator as you
cannot start without specifying at least CCD Simulator.

2016-12-28 20:08 REBOOT Raspberry PI 3

Have a quick peek around
pi@astropie:~ $ more /lib/udev/rules.d/99-efw.rules 
# FILTER WHEELS
KERNEL=="hidraw*", ATTRS{idVendor}=="03c3", ATTRS{idProduct}=="1f01", GROUP="users", MODE="0666"
 
pi@astropie:~ $ dmesg | grep EFW
[    3.282382] usb 1-1.4.2.3: Product: ZWO EFW
[    3.292212] hid-generic 0003:03C3:1F01.0001: hiddev0,hidraw0: USB HID v1.01 Device [ZW0 ZWO EFW] on usb-3f980000.usb-1.4.2.3/input0
 
pi@astropie:~ $ lsusb
Bus 001 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 010: ID 03c3:1f01  
Bus 001 Device 009: ID 1618:0921  
Bus 001 Device 008: ID 03c3:1603  
Bus 001 Device 007: ID 04b4:6572 Cypress Semiconductor Corp. 
Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 
pi@astropie:~ $ ls -l /dev/usb
total 0
crw------- 1 root root 180, 96 Dec 28 20:06 hiddev0
 
pi@astropie:~ $ ls -l /dev/hidraw0
crw-rw-rw- 1 root users 247, 0 Dec 28 20:06 /dev/hidraw0
 

hidev0 is root:root with 0600
hidraw0 is root:users with 0666

I am not sure here if the permissions on hiddev0 should be the same as those on hidraw0
pi@astropie:~ $ groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi
pi@astropie:~ $ cat /etc/group | grep users
users:x:100:pi
 

The users group exists in /etc/group and pi is a member of users

Now try to run indiserver
pi@astropie:~ $ indiserver -v indi_asi_wheel indi_asi_ccd indi_moonlite_focus indi_eqmod_telescop
 

Get the EFWOpen(): Error as usual if trying to connect to the filter wheel.

Poke Around
pi@astropie:~ $ ls -l /dev/usb
total 0
crw------- 1 root root 180, 96 Dec 28 20:06 hiddev0
 
pi@astropie:~ $ ls -l /dev/hidraw0
crw-rw-rw- 1 root users 247, 0 Dec 28 20:06 /dev/hidraw0
 

Now shut indiserver down and restart as root

According to Jasem

ATTENTION: Never ever run indiserver or KStars as root user. Not only it is a bad practice security-wise, but it can lead sometimes to unexpected behavior and poor performance. Only run as root when strictly necessary and you know what you are doing.
pi@astropie:~ $ sudo indiserver -v indi_asi_wheel indi_asi_ccd indi_moonlite_focus indi_eqmod_telescop
 

The filter wheel connects and we can work away

Poke around in a terminal
pi@astropie:~ $ ls -l /dev/usb
ls: cannot access /dev/usb: No such file or directory
pi@astropie:~ $ ls -l /dev/hidraw0 
ls: cannot access /dev/hidraw0: No such file or directory


Can someone check if they have /dev/usb/hidev0 and its permissions?

Has anyone else seen /dev/hidraw0 and /dev/usb/hiddev0 disappear?
Last edit: 7 years 3 months ago by Adrian. Reason: Typo on hidraw0 as 0600 when it is 0666
7 years 3 months ago #13335

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

  • Posts: 85
  • Thank you received: 40

Replied by Hans on topic ZWO EFWmini (filter wheel)

I use a different udev rule :
# ZWO filterwheel
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03c3", ATTRS{idProduct}=="1f01", MODE="0666", SYMLINK+="ZWO_EFW"

and I've seen that the symlink (which is only there for decorative purposes) may point to various things. I'm curious, can you try these udev rules and report back ?

-- Hans
7 years 3 months ago #13337

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

  • Posts: 89
  • Thank you received: 16

Replied by Adrian on topic ZWO EFWmini (filter wheel)

Reboot Pi III
Kernel 4.4.38-v7+
Wed Dec 28 22:16:42 GMT 2016

Poke around
pi@astropie:~ $ dmesg | grep ZWO
[    2.890026] usb 1-1.4.2.1: Manufacturer: ZWO
[    3.251430] usb 1-1.4.2.3: Product: ZWO EFW
[    3.257686] hid-generic 0003:03C3:1F01.0001: hiddev0,hidraw0: USB HID v1.01 Device [ZW0 ZWO EFW] on usb-3f980000.usb-1.4.2.3/input0
 
pi@astropie:~ $ ls -l /dev/hidraw0
crw------- 1 root root 247, 0 Dec 28 22:14 /dev/hidraw0
pi@astropie:~ $ ls -l /dev/usb/
total 0
crw------- 1 root root 180, 96 Dec 28 22:14 hiddev0
 
pi@astropie:/lib/udev/rules.d $ grep EFW *
99-efw.rules:SUBSYSTEMS=="usb", ATTRS{idVendor}=="03c3", ATTRS{idProduct}=="1f01", MODE"0666", SYMLINK+="ZWO_EFW"
 

Note
  • The kernel recognises the EFW with hid-generic hiddev0,hidraw0
  • /dev/hidraw0 and /dev/usb/hiddev0 are created
  • Permissions have changed from root:users 0666 to root:root 0600
  • The rule that I tried is in there in /lib/udev/rules.d/99-efw.rules

I start indiserver as a normal user and try to connect to the wheel
2016-12-28T22:26:14: Connect(): EFWOpen() = 4

I start indiserver with sudo and
I can connect to the EFW and rotate the filters no problem.

I note that the symlink ZWO_EFW did NOT appear in /dev

What kernel are you using?
7 years 3 months ago #13341

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

  • Posts: 79
  • Thank you received: 23

Replied by rumen on topic ZWO EFWmini (filter wheel)

The rules you have looks old. asi changed the sdk at some pint and since this rule shuld be used:
KERNEL=="hidraw*", ATTRS{idVendor}=="03c3", ATTRS{idProduct}=="1f01", GROUP="users", MODE="0666"

Please try and report please!

Rumen
7 years 3 months ago #13348

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

  • Posts: 89
  • Thank you received: 16

Replied by Adrian on topic ZWO EFWmini (filter wheel)

Rumen

Many kudos for the contributions to the driver, lin_guider etc.

Thanks for the suggestion about the rules.

Hans suggested the old rules as they are working for him.

I was already using those new rules from the SDK and the posts above but the problem was that I had to use sudo to run indiserver otherwise the efw wheel wouldn't work EFOpen() = 4.

I also noticed that /dev/usb/hiddev0 and /dev/hiddraw0 disappear after using the wheel with sudo indiserver. ( With the new rules)

Stranger still I can use the wheel with the demo program from the SDK, as an ordinary user.

Weird.
7 years 3 months ago #13350

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

  • Posts: 271
  • Thank you received: 72

Replied by Magnus on topic ZWO EFWmini (filter wheel)

Hi procras. I got my ZWO EFW 7 slot yesterday, and had same problem as you (must run with sudo).

I tried everything in this thread, and noting worked. I did however notice the KERNEL=="hidraw*" and remembered I had issues getting a USBRelay hid device working a while back. So I copied the rule from that device, and now it works without sudo :)

It only works when starting with
indiserver indi_asi_wheel
and not by starting local from ekos, but I never use that anyways.

Try this:
1. rebuild indi-asi (this replaces changes you have made with original udev rules)
2. remove /etc/udev/rules.d/99-asi.rules and /etc/udev/rules.d/99-efw.rules (if you moved anything to /etc)
3. edit /lib/udev/rules.d/99-efw.rules
3.1. komment out or remove:
KERNEL=="hidraw*", ATTRS{idVendor}=="03c3", ATTRS{idProduct}=="1f01", GROUP="users", MODE="0666"
3.2. add:
ACTION=="add", ATTR{idVendor}=="03c3", ATTR{idProduct}=="1f01", MODE="0666"
4. Just to be sure reboot with EFW attached (could probably just reload udev rules)
5. run
indiserver indi_asi_wheel
6. connect EKOS to localhost with default port.

This worked for me on two recently installed Kubuntu systems.

Good luck, Magnus :)
Proud owner of Observatory 17b - A remote Linux observatory.
Website: Observatory 17b
Build thread @ SGL: Starting summers observatory project
The following user(s) said Thank You: Adrian
7 years 2 months ago #13492

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

  • Posts: 79
  • Thank you received: 23

Replied by rumen on topic ZWO EFWmini (filter wheel)

Hi Magnus,
can you please paste the output of "lsusb" with the 7 slot EFW plugged. I doubt both 5 and 7 slot wheels share the same product ID....

Rumen
7 years 2 months ago #13591

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

  • Posts: 271
  • Thank you received: 72

Replied by Magnus on topic ZWO EFWmini (filter wheel)


Well, I had to check... But it's the same.
I had just guessed it is the same because the ZWO site says it is the same driver for both. The driver could have checked what dev id was connected, but as the hardware part (controller and motor) is the same, then it's virtually the same device.


File Attachment:

File Name: efw-7.txt
File Size:1 KB


File Attachment:

File Name: no-efw-7.txt
File Size:1 KB


// Edit: The 7 slot 36mm FW also comes in a 8 slot 1.25" version, and on the ZWO site someone asked if they could by the carousel and convert it. The answer was yes.

Will the filter carousel be available separately? If I purchase the 8×1.25″ version as a started, is it possible to purchase only the carousel if I should upgrade to 36mm filters?

The answer was actually:
of course, the 36mm filter will be provide separately
So not sure if I would try :huh:
Proud owner of Observatory 17b - A remote Linux observatory.
Website: Observatory 17b
Build thread @ SGL: Starting summers observatory project
Last edit: 7 years 2 months ago by Magnus.
7 years 2 months ago #13604
Attachments:

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

  • Posts: 79
  • Thank you received: 23

Replied by rumen on topic ZWO EFWmini (filter wheel)

This is quite strange but they do share the same product ID.
So my theory was wrong and the same rule should work for both versions.
7 years 2 months ago #13605

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

  • Posts: 89
  • Thank you received: 16

Replied by Adrian on topic ZWO EFWmini (filter wheel)

Hi Rumen and Magnus,

I am please to say that if I use the rule

ACTION=="add", ATTR{idVendor}=="03c3", ATTR{idProduct}=="1f01", MODE="0666"

for my ZWO EFWmini that I can use the wheel by running indiserver as a normal user.

This is on the desktop, I will also try on my Pi III and let you know. :-)
The following user(s) said Thank You: Magnus
7 years 2 months ago #13606

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

  • Posts: 271
  • Thank you received: 72

Replied by Magnus on topic ZWO EFWmini (filter wheel)

Would be nice if anyone that has everything working would try with
ACTION=="add", ATTR{idVendor}=="03c3", ATTR{idProduct}=="1f01", MODE="0666"

If it works for everyone, then perhaps it's a more suited rule for the repository?
Proud owner of Observatory 17b - A remote Linux observatory.
Website: Observatory 17b
Build thread @ SGL: Starting summers observatory project
7 years 2 months ago #13607

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

Time to create page: 0.866 seconds