USB Host
Contents |
USB Host
- create new modules. From the Linux Kernel Configuration:
- Support for Host-side USB
- USB device filesystem
- SL811HS HCD support
- CF/PCMCIA support for SL811HS HCD
- create modules
cd gumstix-buildroot/build_arm_nofpu/linux-<the version of linux you're using>
make ARCH=arm CROSS_COMPILE=`pwd`/../staging_dir/bin/arm-linux- menuconfig
make ARCH=arm CROSS_COMPILE=`pwd`/../staging_dir/bin/arm-linux-
- if modules were chosen as a built-in it's necessary to recompile the kernel
../../make
and replace the filesystem image on the gumstix
- add modules, if not built-in (in this order!):
#insmod usbcore.ko
#insmod sl811-hcd.ko
#insmod sl811_cs.ko
LabJackU3
- The U3 driver was written for the 2.6 kernel only.
- Before starting the installation, switch to the root user. Go to the Driver/U3 directory. To build the device driver, run make in the Driver/U3 directory:
$ make
- To install the device driver copy labjacku3.ko to your kernel module directory, run depmod and then run modprobe:
$ cp labjacku3.ko /lib/modules/`uname -r`/kernel/drivers/usb/misc/labjacku3.ko $ depmod -a $ modprobe labjacku3
- You should see a message on the console (use dmesg to view the messages if you are in X).
- If /dev/usb/labjacku3_0 is not created automatically in the /dev/usb folder, then you must create the device node with the following commands:
$ mkdir /dev/usb $ mknod --mode=a=rw /dev/usb/labjacku3_0 c 180 208 NOTES: You only need to make the device node once. For multiple LabJack U3's, run the mknod command again incrementing labjacku3_n and 208 by 1.
Examples:
$ mknod --mode=a=rw /dev/usb/labjacku3_1 c 180 209
$ mknod --mode=a=rw /dev/usb/labjacku3_2 c 180 210
.
.
.
$ mknod --mode=a=rw /dev/usb/labjacku3_15 c 180 223
- Go to the liblabjackusb directory and run make to build the liblabjackusb.so library:
$ make
- After the liblabjackusb library (liblabjackusb.so) is built, copy it to the /usr/lib directory. This library's header is labjackusb.h and is also in the
liblabjackusb directory.
- labjacku3 module needs linux/config.h library which is replaced with linux/configfs.h in the newest kernel
Tango Device Server settings
#---------------------------------------------------------
# SERVER LabJackU3/gumstix, LabJackU3 device declaration
#---------------------------------------------------------
LabJackU3/gumstix/DEVICE/LabJackU3: "gumstix/labjacku3/1"
Device Server
Commands
- ReadAnalogInput
- WriteAnalogOutput
- ReadTemperature
- ReadVreg


