🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

where is the hiddev node?

Started by
2 comments, last by bobwrit 16 years, 8 months ago
Linux kernel grants 2 ways to interact with HID compliant USB hardware: By using the hiddev device or by using the evdev device. The latter one counts to the input sub-system and wraps the HID stuff to let it appear in the common input sub-system way. The system grants access to the devices by dynamically adding nodes to the /dev/input/ directory. I've got my code right to work with evdev so far. However, as far as I see, evdev hides some informations, e.g. the range of REL/ABS axes and such. Due to this and the fact, that windows and Mac OS X grant access in a kind closer to the USB HID specification, I actually don't want to use evdev but hiddev. AFAIK an input device can appear simultaneously under both hiddev and evdev. A look into the kernel sources (in fact drivers/usb/input/hid-core.c and associates) has fortified my assumption (if I interpreted the code correctly). There are several pre-conditions for using hiddev: (1) Perhaps the usbfs has to be mounted. (It is.) (2) udev is running for dynamic node creation. (It does.) (3) udev is to be configured so that it creates nodes as appropriate. I've tried to use (a) BUS="usb", KERNEL="hiddev*", NAME="usb/%k", MODE="660" (b) BUS="usb", SYSFS{idVendor}="2222", NAME="usb/hiddev%n" resp., in /etc/udev/rules.d/10-local.rules for that purpose. (The idVendor "2222" is for Macallay, since I test my code w/ an Airstick for now.) (4) The kernel has to be compiled with hiddev support. A cat /proc/config.gz | gzip -d | grep CONFIG_USB_HID shows CONFIG_USB_HID=m CONFIG_USB_HIDINPUT=y CONFIG_USB_HIDDEV=y so I assume it is okay. Also the usbhid module is correctly loaded. Nevertheless, using none of (3)(a) or (3)(b) the device appears under lsusb (although its Report Descriptors are listed as UNAVAILABLE, that seems me a hint), it appears under /proc/bus/usb/*, and a /dev/input/event* node as it should. But no /dev/usb/hiddev*. Using (3)(a) doesn't change anything. Using (3)(b) seems even to suppress the joystick to appear under lsusb! Can anybody please tell me why no hiddev* node appears? (And no, mknod doesn't help since it creates a node but the kernel still doesn't feel coerced to bind it.) [Edited by - haegarr on October 26, 2007 8:17:25 AM]
Advertisement
No one here who has worked with hiddev?
I think someone has, they just haven't seen this thread yet...
-------------------------------------------------my forum LINK: here
Also wait longer for a reply
-------------------------------------------------my forum LINK: here

This topic is closed to new replies.

Advertisement