I'm trying to get OWPDK (a 1-wire library) to access an USB to 1-wire adapter (DS9490R, based on the DS2490 USB-to-1-wire bridge chip).
This library uses libusb to enumerate devices (using usb_get_busses, then exploring bus->devices for each bus). It will then get the first device that matches vendor and product ID (I only have one plugged in), and call usb_open on it, and then usb_set_configuration on the returned handle.
On my Debian 10 system, when I run this program as root, it works fine.
However, I'd like to run the program as user onewire from group onewire which would get access only to this USB device.
So, I created this file: /etc/udev/rules.d/90-onewire.rules which contains this single line :
SUBSYSTEMS=="usb", ATTRS{vendor}=="04fa", GROUP="onewire", MODE="0660" I then reload rules with sudo udevadm control --reload
While usb_open works for that user, usb_set_configuration doesn't (returns a non-zero result).
I've tried various combinations in the rule, such as SUBSYSTEM (without S), removing the ATTRS condition, etc, with no luck. What am I missing?