The labjack u3 is a usb device with a linux kernel 2.6 driver. I am in no way associated with labjack other than being a customer. Here is a product link: http://www.labjack.com/labjack_u3.php
I did not have any luck using the device with a Netgear WGT634U (labjack did not power up). However, I do have it working with an Asus WLHDD running a 2.6 kernel.
Here is a brief summary of what I did:
- started with a fresh Debian distro on a virtual machine
- followed OpenWRT build instructions, ie: get build software, svn checkout latest kamikaze trunk
- selected target brcm947xx [2.6] and usb support in make menuconfig
- ran make
- copied the labjack driver (Linux_C_NativeUSB_U3U9/U3) into build_dir/linux-brcm47xx/linux-2.6.23.1/drivers/labjack (I know this is not ideal)
- added obj-m += labjack/ to build_dir/linux-brcm47xx/linux-2.6.23.1/drivers/Makefile (again, I know this is not ideal)
- ran make again
- installed the firmware onto the router, and copied the labjacku3.ko files to it via scp (also usbcore.ko and ohci-hcd.ko but that's because I lied about when I toggled on usb support)
- added staging_dir/toolchain-mipsel_gcc4.1.2/bin to my PATH
- modified liblabjack and the labjack example Makefiles to include:
CROSS=mipsel-linux-uclibc-
CC=$(CROSS)gcc
LD=$(CROSS)ld
AR=$(CROSS)ar
RANLIB=$(CROSS)ranlib
- make'd those, and copied binaries to router
- loaded driver, mounted usbfs, made dev device, ran example:
root@OpenWrt:~/u3# insmod /lib/modules/2.6.23.1/usbcore.ko
root@OpenWrt:~/u3# insmod /lib/modules/2.6.23.1/ohci-hcd.ko
root@OpenWrt:~/u3# insmod /lib/modules/2.6.23.1/labjacku3.ko
root@OpenWrt:~/u3# mount -t usbfs none /proc/bus/usb
root@OpenWrt:~/u3# mkdir /dev/usb
root@OpenWrt:~/u3# mknod -m=a=rw /dev/usb/labjacku3_0 c 180 208
root@OpenWrt:~/u3# LD_LIBRARY_PATH=. ./u3Easy
Calling eDAC to set DAC0 to 2.1 V
Calling eAIN to read voltage from AIN3
AIN3 value = 0.405
Calling eDO to set FIO3 to output-high
Calling eDI to read the state of FIO2
FIO2 state = 1
Calling eTCConfig to enable and configure 1 output timer (Timer0) and 1 input timer (Timer1), and enable counter0
Waiting for 1 second...
Calling eTCValues to read and reset the input Timer1 and Counter0, and update the value (duty-cycle) of the output Timer0
Timer1 value = 0
Counter0 value = 0
Calling eTCConfig to disable all timers and counters
update: with a powered usb hub I have the Labjack working on both a WGT634U and WL500W.
(Last edited by matthewhandau on 30 Jan 2008, 10:31)