Jump to content
  • Advertisement
Sign in to follow this  
haegarr

where is the hiddev node?

This topic is 3859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!