Phidgets are small, hobbyist USB devices for sensing and control, sold by www.phidgets.com and www.phidgetsusa.com. Unfortunately, the Phidgets Inc. did not support Linux, but they were cool enough to make the interface library source code available, and even had a stub file for the Linux-specific code to be written into.
libusb is a cross-platform interface library for interfacing with usb devices without a device driver.
This project is (was) a port of the beta phidget20 library to libusb. I saw was because it succeded... as of 8 Jul 2005, Phidgets Inc. released a beta version of the library that supported linux based on my work. I do not anticipate doing further work on this project.
The linux (really libusb) code is highly experimental. To compile, you need libusb installed. Run 'make -f Makefile.linux'.
I've only tested with the Accelerometer and Servo controller so far. This tests both the ReadPacket and SendPacket code, so I'm pretty confident that the libusb code is working, but I'd like more feedback and testing from folks with other devices.
Since libusb can be built for linux, OS X, darwin, Win32, NetBSD, FreeBSD, and OpenBSD, in theory this code will work for those OSes also. It might have problems on big-endian architectures, I'm not sure.
To compile the library, do:
make -f Makefile.linux
To compile my example program do:
make -f Makefile.linux test
NOTE 1: For this to work, the linux kernel HID driver cannot claim the USB devices. In the very recent linux kernels, (I'm using 18.104.22.168) Phidget devices are "blacklisted" and won't be claimed by the generic HID driver. But in older kernels they will. It's possible to work around that in various non-portable ways, but I haven't implemented that.
NOTE 2: To work, of course, the program must be run by a user who has permission to talk to the USB devices. I short-cut this process by running my test program as root. There are much better configurations than this, but I'm to lazy to figure them out right now and document them.
Projects page, Dan Risacher