Here is an alpha test release of the cross-platform, unified [hid]
object. It uses a event type/code naming scheme taken from the Linux
input event system, since it is much cleaner than Microsoft DirectX,
Apple HID Manager, or the USB HID schemes.
http://at.or.at/hans/pd/hid.html
In this version, I cleaned up the code a bit and added a number of
new mapping objects. Keyboards are supported under GNU/Linux thanks to
Georg Holzmann. Standard joysticks and mice are supported almost
exactly the same in GNU/Linux and MacOS X. Tablets are supported in
GNU/Linux, but Wacom wrote a whack driver for MacOS X, so tablets are
not yet supported in MacOS X.
.hc
http://at.or.at/hans/
Hi HC,
the binary included in your download for Linux doesn't work for me on Gentoo Athlon system:
/usr/local/lib/pd/extra/hid.pd_linux: /usr/local/lib/pd/extra/hid.pd_linux: ELF file data encoding not little-endian
And following your compile instructions only brings me grief as well:
bash-2.05b$ make INCLUDE=../puredata/pd-0.38-0/src/
PDEXECUTABLE=/usr/local/bin/pd/
./make-arrays-from-input.h.pl
gcc -DUNIX -DPD -O2 -funroll-loops -fomit-frame-pointer -Wall -W
-Wshadow -Wstrict-prototypes -Wno-unused -Wno-parentheses -Wno-switch
../puredata/pd-0.38-0/src/ -c *.c
hid_linux.c: In function hid_convert_linux_buttons_to_numbers': hid_linux.c:57: error:
BTN_WHEEL' undeclared (first use in this function)
hid_linux.c:57: error: (Each undeclared identifier is reported only once
hid_linux.c:57: error: for each function it appears in.)
hid_linux.c:59: error: KEY_OK' undeclared (first use in this function) hid_linux.c: In function
hid_print_element_list':
hid_linux.c:142: error: EV_SYN' undeclared (first use in this function) hid_linux.c:151: error:
EV_PWR' undeclared (first use in this function)
hid_linux.c:152: error: EV_FF_STATUS' undeclared (first use in this function) hid_linux.c:170: error:
KEY_OK' undeclared (first use in this function)
hid_linux.c: In function `hid_open_device':
hid_linux.c:325: warning: int format, t_int arg (arg 3)
make: *** [hid.o] Error 1
rm hid.o
bash-2.05b$ /usr/local/bin/pd -version set it Pd version 0.38.0 compiled 21:36:32 Jan 27 2005
bash-2.05b$ uname -a Linux hovercraft 2.6.10-rc3-love1 #8 SMP Thu Apr 7 14:34:13 CEST 2005 i686 AMD Athlon 64 Processor 3400+ AuthenticAMD GNU/Linux
I'm using 32bit system, not 64, just in case you were wondering ;-)
Any other clues???
d.
Hans-Christoph Steiner wrote:
Here is an alpha test release of the cross-platform, unified [hid] object. It uses a event type/code naming scheme taken from the Linux input event system, since it is much cleaner than Microsoft DirectX, Apple HID Manager, or the USB HID schemes.
http://at.or.at/hans/pd/hid.html
In this version, I cleaned up the code a bit and added a number of new mapping objects. Keyboards are supported under GNU/Linux thanks to Georg Holzmann. Standard joysticks and mice are supported almost exactly the same in GNU/Linux and MacOS X. Tablets are supported in GNU/Linux, but Wacom wrote a whack driver for MacOS X, so tablets are not yet supported in MacOS X.
UPDATE:
derek holzer wrote:
And following your compile instructions only brings me grief as well
I compiled the one from CVS instead of from the website, and it worked fine. Which brings me to the next problem:
My Gamepad shows up on /dev/input/js0, and the HID kernel drivers don't create any /dev/input/event nodes. So the [hid] object cannot read the gamepad, even though it is there. I don't know how exactly this happens, perhaps it has something to do with the Udev system. But searching around on various forums, it seems like lots of people have gamepads at /dev/input/jsX nodes, so perhaps it would make sense that [hid] could accomodate that?
best, derek
hi derek,
I read:
My Gamepad shows up on /dev/input/js0, and the HID kernel drivers don't create any /dev/input/event nodes. So the [hid] object cannot read the gamepad, even though it is there. I don't know how exactly this happens,
maybe you have to create the eventXX nodes yourself but the problem is that /dev/[event/]jsX gives you a cooked joystick output AFAIK this is a different protocol from what one expects from /dev/input/eventXX which is a generic hid device.
HTH
x
Howdy and thanks for the reply,
the answer, of course, was that I needed to STFA myself and see that there was already a whole thread on HID joysticks ;-)
In my case, what was missing was the actual evdev module in my kernel. I'm now happily joysticking away, however I will need to go and create a Udev rule to allow non-root use of the /dev/input/eventX nodes.
best, derek
CK wrote:
hi derek,
I read:
My Gamepad shows up on /dev/input/js0, and the HID kernel drivers don't create any /dev/input/event nodes. So the [hid] object cannot read the gamepad, even though it is there. I don't know how exactly this happens,
maybe you have to create the eventXX nodes yourself but the problem is that /dev/[event/]jsX gives you a cooked joystick output AFAIK this is a different protocol from what one expects from /dev/input/eventXX which is a generic hid device.
HTH
x
Hmm, I'll be releasing a new version soon, so I'll check the compiling
then. FYI: the included hid.pd_linux is compiling for PowerPC since
that's the platform that I am on.
.hc
On May 19, 2005, at 6:10 AM, derek holzer wrote:
UPDATE:
derek holzer wrote:
And following your compile instructions only brings me grief as well
I compiled the one from CVS instead of from the website, and it worked
fine. Which brings me to the next problem:My Gamepad shows up on /dev/input/js0, and the HID kernel drivers
don't create any /dev/input/event nodes. So the [hid] object cannot
read the gamepad, even though it is there. I don't know how exactly
this happens, perhaps it has something to do with the Udev system. But
searching around on various forums, it seems like lots of people have
gamepads at /dev/input/jsX nodes, so perhaps it would make sense that
[hid] could accomodate that?best, derek
--
derek holzer ::: http://www.umatic.nl ---Oblique Strategy # 59: "Don't avoid what is easy"
If you are not part of the solution, you are part of the problem. - Eldridge Cleaver