4

I have a Qt application running on Ubuntu (14.04) and Fedora (20) that needs to communicate with a USB HID device without root permissions (running the application as root works fine, so no problems there). On ubuntu, this works fine with following rule that adds the HID device to the plugdev group.

SUBSYSTEM=="usb", ATTR{idVendor}=="0600", ATTR{idProduct}=="0070", MODE="0660", GROUP="plugdev"
SUBSYSTEM=="hidraw" , ATTRS{idVendor}=="0600", ATTRS{idProduct}=="0070", MODE="0660", GROUP="plugdev"

But adding this rule into Fedora does not seem to work to access the HID device from the application. This partially because the plugdev group is not present on Fedora.

But I cannot seem to find an equivalent for plugdev on Fedora or the proper way to enable the application to access the HID device.

Any ideas?

EDIT >>
Tried removing the GROUP permission like @askb suggested. This didn't resolve anything. But as a test, I've added RUN+="/udevtest.sh" to the SUBSYSTEM=="hidraw" which logs something into /tmp/udev.log and this seems to react just fine. So the udev rule passes. But still my application (using libusb) can only access it when running sudo...

Mathieu
  • 41
  • 3

1 Answers1

0

The group 'plugdev' is a Ubuntu-only feature to solve hotplug device permissions. Other distributions does not need this, and should not start using any group assignments IMHU. I would recommend removing GROUP="plugdev" in the udev rules file for fedora, and have a diff rules file for both distributions as an alternatively. The udev rules file should work as expected as long as the product/vendor id should match.

askb
  • 6,501
  • 30
  • 43