Like a lot of Chinese devices, my TEMPer clone creates two HID interfaces. This isn’t how TEMPer is supposed to work but this unit is a knock-off. It was purchsed from Amazon and I tried to get an authentic part (Got from Amazon. The brand looked right and it wasn’t the cheapest TEMPer, by far, but turned out to be a junky knock-off).
Right now, the app only works with root permission. I need to get it completely into the user space
Anyway, it creates two HIDRAW dev interfaces. The first one does not work. It responds on the second one. It always seems to show up on /dev/hidraw3 but I understand this cannot be counted on after re-plug, reboot, or other installs.
How can I create a udev rule that will allow my app to find the device (either scan with HIDAPI or libusb) and create symlink under /dev with user space access that my app can interface with?
Or, perhaps there is a better way?
I’m trying to write a driver that anyone can use with a knock-off TEMPer.
I’ve previously found OpenRGB’s udev rules to be a really good example since there’s a bit of everything in there: https://openrgb.org/releases/release_0.9/60-openrgb.rules
But I think you’d want something like:
SUBSYSTEMS=="usb|hidraw", ATTRS{idVendor}=="REPLACE WITH USB VENDOR", ATTRS{idProduct}=="REPLACE WITH USB PRODUCT", TAG+="uaccess"
Thank you. I really appreciate it, on both counts!
Thanks. He has the core done. It could have saved me some time. I’m quite a bit further along with auto discovery and a couple of minor conveniences.
If I can get it to install with a UDEV rule so it runs at user privilege level, it’ll be all set and I’ll push it into the AUR.