forked from labjack/exodriver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathINSTALL.Linux
More file actions
153 lines (109 loc) · 5.06 KB
/
Copy pathINSTALL.Linux
File metadata and controls
153 lines (109 loc) · 5.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
Exodriver (liblabjackusb) Library Installation Instructions
============================================================
Linux Requirements
------------------
1. GNU C compiler (gcc).
2. The libusb-1.0 library. Download it here:
http://sourceforge.net/projects/libusb/
3. Linux kernel 2.6.28 or higher. To use older 2.6.x kernels, you must upgrade
your firmware. These are the required firmware versions when using older
2.6 kernels:
* U3 with hardware version 1.30 or higher - Firmware 1.18 and higher
* U3 with hardware version less than 1.30 - Only kernel 2.6.28 and higher
supported. Unsupported on older kernels.
* U6 - Firmware 0.81 and greater
* UE9 - Comm Firmware 1.49 and greater
4. Uninstall any old U3 and UE9 kernel-module based drivers. The old driver
and custom kernel modules conflict with the current liblabjackusb library.
See the "Uninstalling the Old U3 and UE9 Driver" section for more
information.
For Ubuntu 10.04, see the section titled
Up and running with LabJackPython and the Exodriver on Ubuntu 10.04
later in this document.
liblabjackusb Library Installation
----------------------------------
In the liblabjackusb/ directory, run the following commands to compile and
install the library.
$ cd liblabjackusb/
$ make
$ sudo make install
Programs that use the liblabjackusb will need to access the USB device bus
at /dev/bus/usb/, typically with root permission. On Debian-based
distributions, we provide udev rules that allow members of the "adm" group
to access the LabJack. To install the udev rules, run the following commands
in the root directory of this package.
$ sudo cp 10-labjack.rules /etc/udev/rules.d
$ sudo udevadm control --reload-rules
Older vesions of udevadm (e.g., the version included in Ubuntu 8.04) use an
underscore instead of a dash: "--reload_rules" instead of "--reload-rules"
$ sudo udevadm control --reload_rules
On Debian-based distributions, the above two commands are sufficient. If
your distribution does not have udevadm, restart udev or restart your
computer. On a Fedora machine run:
$ sudo /etc/init.d/udev-post reload
Also be sure to add yourself to the "adm" group. Type:
$ groups
to list what groups you are a member of. Add yourself to the adm group by
running:
$ sudo usermod -a -G adm USERNAME
Log out and log back in for the new group to take effect. Re-run "groups" to
double check.
Compiling and Running the Example Programs
------------------------------------------
The example code/programs use the liblabjackusb library and the labjackusb.h
header files in the liblabjackusb/ directory.
The examples are located in the U3, U6, and UE9 subdirectories in the examples/
directory. To compile the programs go to your device's directory and run
$ cd examples/U6/
$ make
Run one of example programs like this:
$ ./u6BasicConfigU6
Uninstalling the Old U3 and UE9 Driver
--------------------------------------
The old U3 and UE9 driver used custom kernel modules, and will conflict with
with the current liblabjackusb library. To uninstall the old driver please
unload and delete the U3 and/or UE9 kernel modules, delete the liblabjackusb.so
library and remove any scripts or udev rules you may have been using to load
the kernel module's device nodes. The following commands, or similar depending
on the directories you copied files to, should help prepare your system for the
new liblabjackusb 2.0 library:
$ rmmod labjacku3
$ rm labjacku3.ko /lib/modules/`uname -r`/kernel/drivers/usb/misc/labjacku3.ko
$ depmod -a
$ rm /usr/lib/liblabjackusb.so
These commands remove the udev rules we provided on the forums:
$ rm /etc/udev/rules.d/10-labjack.rules
$ sudo udevadm control --reload-rules
Up and running with LabJackPython and the Exodriver on Ubuntu 10.04
-------------------------------------------------------------------
As we detailed in May 2010:
http://labjack.com/blog/running-labjackpython-and-exodriver-ubuntu-1004
Ubuntu 10.04 comes with a binary release of libusb-1.0, so building the
Exodriver is easier than ever. Install the dependencies with apt-get,
checkout the Exodriver source code, and build it. Here are the complete
steps, along with a handful of steps at the end that build LabJackPython:
http://labjack.com/support/labjackpython
which is our Python module that works well with the Exodriver:
$ sudo apt-get install build-essential
$ sudo apt-get install libusb-1.0-0-dev
$ sudo apt-get install git-core
$ git clone git://github.com/labjack/exodriver.git
$ cd exodriver/liblabjackusb/
$ make
$ sudo make install
$ cd ..
$ sudo cp 10-labjack.rules /etc/udev/rules.d/.
$ sudo udevadm control --reload-rules
$ cd
$ git clone git://github.com/labjack/LabJackPython.git
$ cd LabJackPython/src/
$ sudo python setup.py install
$ python
>>> import u3
>>> d = u3.U3()
>>> d.configU3()
Machines Using VirtualBox
-------------------------
Customers using Oracle's VirtualBox software should add themselves to the
vboxusers group, either through their distribution's GUI interface or through
the command: sudo usermod -a -G vboxusers USERNAME