]> sigrok.org Git - libsigrok.git/blame - README.devices
Drop link-mso19/nexus-osciprime in preparation for release.
[libsigrok.git] / README.devices
CommitLineData
c77ed446
UH
1-------------------------------------------------------------------------------
2README.devices
3-------------------------------------------------------------------------------
4
5This README contains various notes for users of libsigrok (or frontends
6that are based on libsigrok) about device- and/or driver-specific issues.
7
8
9Firmware
10--------
11
12Some devices supported by libsigrok need a firmware to be uploaded every time
13the device is connected to the PC (usually via USB), before it can be used.
14
15The default location where libsigrok expects the firmware files is:
16
17 $prefix/share/sigrok-firmware
18
19($prefix is usually /usr/local or /usr, depending on your ./configure options)
20
21For further information see the section below and also:
22
23 http://sigrok.org/wiki/Firmware
24
25
26Per-driver firmware requirements
27--------------------------------
28
29The following drivers/devices require a firmware upload upon connection:
30
31 - asix-sigma: The ASIX SIGMA and SIGMA2 require various firmware files,
32 depending on the settings used. These files are available from our
33 'sigrok-firmware' repository/project under a license which allows us
34 to redistribute them.
35
36 - fx2lafw: Logic analyzers based on the Cypress FX2(LP) chip need the
37 firmware files from the 'sigrok-firmware-fx2lafw' repository/project.
38 The firmware is written from scratch and licensed under the GPLv2+.
39
40 - hantek-dso: The Hantek DSO-2090 (and other supported models of the same
41 series of Hantek PC oscilloscopes) need firmware files.
42 These can be extracted from the vendor's Windows drivers using a tool
43 from our 'sigrok-util' repository/project.
44
c77ed446
UH
45The following drivers/devices do not need any firmware upload:
46
47 - agilent-dmm
48 - alsa
49 - brymen-dmm
50 - chronovu-la8
51 - colead-slm
52 - demo
53 - fluke-dmm
54 - lascar-el-usb
c77ed446
UH
55 - mic-985xx
56 - openbench-logic-sniffer
57 - rigol-ds1xx2
58 - serial-dmm
59 - tondaj-sl-814
60 - uni-t-dmm
61 - victor-dmm
62 - zeroplus-logic-cube
63
64
65Specifying serial ports
66-----------------------
67
68Many devices supported by libsigrok use serial port based cables (real RS232
69or USB-to-serial ones) to connect to a PC.
70
71For all these devices, you need to specify the serial port they are connected
72to (e.g. using the 'conn' option in sigrok-cli). It is not possible to scan
73for such devices without specifying a serial port.
74
75Example:
76
77 $ sigrok-cli --driver <somedriver>:conn=/dev/ttyUSB0 ...
78
79The following drivers/devices require a serial port specification:
80
81 - agilent-dmm
82 - brymen-dmm
83 - colead-slm
84 - fluke-dmm
c77ed446 85 - mic-985xx
c77ed446
UH
86 - openbench-logic-sniffer
87 - serial-dmm
88 - tondaj-sl-814
89
90The following drivers/devices do not require a serial port specification:
91
92 - alsa
93 - asix-sigma
94 - chronovu-la8
95 - demo
96 - fx2lafw
97 - hantek-dso
98 - lascar-el-usb
99 - rigol-ds1xx2
100 - uni-t-dmm
101 - victor-dmm
102 - zeroplus-logic-cube
103
104
105Permissions of serial port based devices
106----------------------------------------
107
108When using devices supported by libsigrok that use serial port based cables
109(real RS232 or USB-to-serial ones) to connect to a PC, you need to ensure
110that the user running the libsigrok frontend has (read/write) permissions to
111access the serial port device (e.g. /dev/ttyS0, /dev/ttyUSB0, and so on).
112
113You can use 'chmod' to apply permissions as you see fit, and/or 'chown' to
114change the owner of the serial port device to a certain user or group.
115
116For USB-to-serial based devices, we recommended using our udev rules file
117(see below for details).
118
119
120Permissions for USB devices (udev rules file)
121---------------------------------------------
122
123When using USB-based devices supported by libsigrok, the user running the
124libsigrok frontend (e.g. sigrok-cli) has to have (read/write) permissions
125for the respective USB device.
126
127On Linux, this is accomplished using either 'chmod' (not recommended) or
128using the udev rules file shipped with libsigrok (recommended).
129
130The file is available in contrib/z60_libsigrok.rules. It contains entries
131for all libsigrok-supported (USB-based) devices and changes their group
132to 'plugdev' and the permissions to '664'.
133
134When using a libsigrok package from your favorite Linux distribution, the
135packager will have already taken care of properly installing the udev file
136in the correct (distro-specific) place, and you don't have to do anything.
137The packager might also have adapted 'plugdev' and '664' as needed.
138
139If you're building from source, you need to copy the file to the place
140where your distro expects such files. This is beyond the scope of this README,
141but generally the location could be e.g. /etc/udev/rules.d, or maybe
142/lib/udev/rules.d, or something else. Afterwards you might have to restart
143udev, e.g. via '/etc/init.d/udev restart' or similar, and you'll have to
144re-attach your device via USB.
145
146Please consult the udev docs of your distro for details.
147
148
149Cypress FX2 based devices
150-------------------------
151
152Devices using the Cypress FX2(LP) chip without any specific USB VID/PID will
153be enumerated with VID/PID 04b4:8613 (the default for "unconfigured FX2").
154These are usually "FX2 eval boards" (that can also be used as LAs, though).
155
156On Linux, the 'usbtest' driver will usually grab such devices, and they will
157thus not be usable by libsigrok (and frontends).
158
159You can fix this by running 'rmmod usbtest' as root before using the device.
160
161
162UNI-T DMM (and rebranded models) cables
163---------------------------------------
164
165UNI-T multimeters (and rebranded devices, e.g. some Voltcraft models) can
166ship with different PC connectivity cables:
167
168 - UT-D04 (USB/HID cable with Hoitek HE2325U chip, USB VID/PID 04fa:2490)
169 - UT-D04 (USB/HID cable with WCH CH9325 chip, USB VID/PID 1a86:e008)
170 - UT-D02 (RS232 cable)
171
172The above cables are all physically compatible (same IR connector shape)
173with all/most currently known UNI-T multimeters. For example, you can
174use either of the UT-D04 USB/HID cables or the UT-D02 RS232 cable with
175the UNI-T UT61D multimeter.
176
177When using the UT-D02 RS232 cable with any of the supported UNI-T DMMs,
178you have to use the respective driver with a '-ser' drivername suffix
179(internally all of these models are handled by the 'serial-dmm' driver).
180
181You also need to specify the serial port via the 'conn' option, e.g.
182/dev/ttyUSB0 (attached via a USB-to-serial cable) or /dev/ttyS0 (actual
183RS232 port) on Linux (see above).
184
185Finally, the user running the frontend (e.g. sigrok-cli) also needs
186permissions to access the respective serial port (see above).
187
188Examples (sigrok-cli):
189
190 $ sigrok-cli --driver uni-t-ut61e-ser:conn=/dev/ttyUSB0 ...
191 $ sigrok-cli --driver voltcraft-vc820-ser:conn=/dev/ttyS0 ...
192
193When using any of the UT-D04 USB/HID cables you have to use the respective
194driver _without_ the '-ser' drivername suffix (internally all of these models
195are handled by the 'uni-t-dmm' driver).
196
197Since the UT-D04 cables are USB based (but don't use a USB-to-serial chip)
198there is no need to specify a serial port via 'conn', of course.
199However, the user running the frontend does also need to have permissions
200to access the respective USB device (see above).
201
202Examples (sigrok-cli):
203
204 $ sigrok-cli --driver uni-t-ut61e ...
205 $ sigrok-cli --driver voltcraft-vc820 ...
206
207
208UNI-T UT-D04 cable issue on Linux
209---------------------------------
210
211The UNI-T UT-D04 cable with Hoitek HE2325U (or WCH CH9325) chip seems to have
8d3764aa 212a very specific problem on Linux. Apparently it requires to be put into
c77ed446
UH
213suspend (and woken up again) before it is usable. This seems to be a
214Linux-only issue, Windows is not affected by this since apparently the
215Windows kernel does this for every USB device, always.
216
217Thus, if you want to use any of the UNI-T DMMs with this specific cable,
218you'll have to run the following script (as root) once, every time you attach
219the cable via USB. The script was written by Ralf Burger.
220
221See also: http://erste.de/UT61/index.html
222
223 #!/bin/bash
224 for dat in /sys/bus/usb/devices/*; do
225 if test -e $dat/manufacturer; then
226 grep "WCH.CN" $dat/manufacturer > /dev/null && echo auto > ${dat}/power/level && echo 0 > ${dat}/power/autosuspend
227 fi
228 done
229
230
231ALSA driver
232-----------
233
234The 'alsa' driver can be used to sample analog data using a PC's soundcard.
235I.e. the sound card can act as a simple oscilloscope (with some limitations)
236using commercial or DIY "sound card scope probe" cables.
237
238Since ALSA is a Linux-specific sound system, this driver will inherently
239only compile and work on Linux.
240
241We might write additional drivers to make a similar functionality available
242on other OSes at some point.
243
244
c77ed446
UH
245ChronoVu LA8 USB VID/PIDs
246-------------------------
247
248The ChronoVu LA8 logic analyzer is available in two revisions. Previously,
249the LA8 shipped with a USB VID/PID of 0403:6001, which is the standard ID
250for FTDI FT232 USB chips.
251
252Since this made it hard to distinguish the LA8 from any other device
253with this FTDI chip connected to the PC, the vendor later shipped the
254LA8 with a USB VID/PID of 0403:8867.
255
256The 'chronovu-la8' driver in libsigrok supports both VID/PID pairs and
257automatically finds devices with either VID/PID pair. However, currently
258the driver will assume any device with VID/PID 0403:6001 is a ChronoVu LA8.
259
260
261OLS
262---
263
264The Dangerous Prototypes Openbench Logic Sniffer (OLS) logic analyzer is
265supported by the 'ols' driver in libsigrok. This driver assumes a somewhat
266recent firmware has been flashed onto the OLS (it doesn't need a firmware
267upload every time it's attached via USB, since the firmware is stored in the
268device permanently).
269
270The most recent firmware version that is tested is 3.07.
271
272If you use any older firmware and your OLS is not found or is not working
273properly, please upgrade to at least this firmware version. Check the
274Dangerous Prototypes wiki for firmware upgrade instructions:
275
276 http://dangerousprototypes.com/docs/Logic_Sniffer_upgrade_procedure
277
278Also, you need to specify a serial port for the OLS in the frontends, e.g.
279using the 'conn' option in sigrok-cli, and you also need to have the
280permissions to access the serial port (see above).
281
282Example:
283
284 $ sigrok-cli --driver ols:conn=/dev/ttyACM0 ...
285
286
287Rigol DS1xx2 oscilloscopes
288--------------------------
289
290The 'rigol-ds1xx2' driver (for the Rigol DS1052E and some other, similar DSOs)
291currently uses the Linux usbtmc kernel driver. This means it can currently
292only be built and used on Linux (i.e., it's non-portable).
293
294The use of a kernel module also means it is dependent on the kernel version
295used, as well as on whether this specific module is available in the kernel.
296Additionally, the usbtmc kernel module has been known to have various bugs
297in some versions. These are some (but not all) drawbacks of using a kernel
298module as opposed to a libusb-based driver that works in user-space.
299
300We plan to change the driver to use the 'librevisa' user-space shared
301library (which uses libusb) soon, which will fix all these issues and make
302the driver portable at the same time.
303