Topic: building phidgets requires libhid requires libusb on infocast

I've been trying to use the on-board infocast 8 tools instead of using scratchbox and cross compilation. The infocast 8 is cool because it auto installs the gcc tools to /mnt/storage/gccthe first time you run make

I want to use a Phidget on the infocast.  The Phidgets library requires libhid.
libhid fails to build because usb.h can't be found, similar to another posting in this form.
The infocast comes with libusb 0.1 but no header files. The development environment on the infocast doesn't include the usb header files either. It seems like I need to build libusb to get the header files installed so I can build libhid so I can build the Phidgets library

I pulled down libhid-0.2.16, the current version, and configured with ./configure –prefix=/mnt/storage/local  run make and received a message that implies that I need to pull build libusb

 because there is a missing header file
In file included from linux.c:6:
../include/hid.h:5:17: error: usb.h: No such file or directory
cc1: warnings being treated as errors
In file included from linux.c:9:
../include/debug.h:23: error: 'struct usb_bus' declared inside parameter list

libusb 0.1.12 is available files.chumby.com.  I configured it with ./configure --prefix=/mnt/storage/local the ran make and which resulted in the message

grep: /lib/libstdc++.la: No such file or directory
sed: /lib/libstdc++.la: No such file or directory
libtool: link: `/lib/libstdc++.la' is not a valid libtool archive

which makes sense because it's actually in /mnt/storage/gcc/usr/lib

Is this the right path or is it a rat hole?  How do I tell the libhid to look somewhere else for the libstdc++.la files?

Re: building phidgets requires libhid requires libusb on infocast

An update in case this helps anyone else.

libusb compilation
/usr/lib/libstdc++.la has a bad path in it that points to /lib instead of /usr/lib.  I renamed that file so that ino longer exits and libusb compiled

libhid compilation
libhid compiled once libusb was compiled

libphidget
libphidget doesn't know about /mnt/storage/local/include so set CPPFLAGS to inlcude /mnt/storage/local/include. configure and compile both then worked

phidgetwebservice
the build script for phidgetmwebservice doesn't know about /mnt/storage/local/include or /mnt/storage/local/lib so I set the CPPFLAGS and LDFLAGS and built

./configure --prefix=/mnt/storage/local LIBS=/mnt/storage/local/lib/libphidget21.so CFLAGS=-pthread CPPFLAGS=-I/mnt/storage/local/include
make

dmesg shows

[19552.489338] usb 1-1.3:1.0: uevent
[19552.489476] usbhid 1-1.3:1.0: usb_probe_interface
[19552.489527] usbhid 1-1.3:1.0: usb_probe_interface - got id
[19552.490347] phidgetkit 1-1.3:1.0: usb_probe_interface
[19552.490369] phidgetkit 1-1.3:1.0: usb_probe_interface - got id
[19552.490533] usb 1-1.3: link qh8-0601/ff3aa300 start 7 [1/2 us]
[19552.490743] phidgetkit 1-1.3:1.0: USB PhidgetInterfaceKit 0/16/16 attached
[19552.498033] drivers/usb/core/inode.c: creating file '009'
[19552.498233] usb 1-1.3: New USB device found, idVendor=06c2, idProduct=0044
[19552.505273] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[19552.512592] usb 1-1.3: Product: PhidgetInterfaceKit
[19552.517592] usb 1-1.3: Manufacturer: Phidgets Inc.
[19552.522410] usb 1-1.3: SerialNumber: 81284
[19552.567779] usb 1-1.3: uevent

The manager and ifkit programs in the example directory work. showing the PhidgetInterfaceKit as it is plugged in and unplugged and flashing the relay lights

Windows clients can connect to the web service which thinks its doing something but the only status update it ever sends is to tell the windows client the device has diconnected if I unplug it.

Re: building phidgets requires libhid requires libusb on infocast

Another take on adding Phidgets is at:

http://joe.blog.freemansoft.com/2011/01 … ast-8.html

Re: building phidgets requires libhid requires libusb on infocast

I got the compile of the phidget drivers and library to work but the RFID reader wont read tags.  It reports its serial number and I can set the LED on and off but not the anntena sad   Has anyone got the phidget RFID reader to work on the chumby hacker board ?

Thanks