]> sigrok.org Git - libsigrok.git/blob - README.devices
Drop link-mso19/nexus-osciprime in preparation for release.
[libsigrok.git] / README.devices
1 -------------------------------------------------------------------------------
2 README.devices
3 -------------------------------------------------------------------------------
4
5 This README contains various notes for users of libsigrok (or frontends
6 that are based on libsigrok) about device- and/or driver-specific issues.
7
8
9 Firmware
10 --------
11
12 Some devices supported by libsigrok need a firmware to be uploaded every time
13 the device is connected to the PC (usually via USB), before it can be used. 
14
15 The 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
21 For further information see the section below and also:
22
23   http://sigrok.org/wiki/Firmware
24
25
26 Per-driver firmware requirements
27 --------------------------------
28
29 The 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
45 The 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
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
65 Specifying serial ports
66 -----------------------
67
68 Many devices supported by libsigrok use serial port based cables (real RS232
69 or USB-to-serial ones) to connect to a PC.
70
71 For all these devices, you need to specify the serial port they are connected
72 to (e.g. using the 'conn' option in sigrok-cli). It is not possible to scan
73 for such devices without specifying a serial port.
74
75 Example:
76
77  $ sigrok-cli --driver <somedriver>:conn=/dev/ttyUSB0 ...
78
79 The following drivers/devices require a serial port specification:
80
81  - agilent-dmm
82  - brymen-dmm
83  - colead-slm
84  - fluke-dmm
85  - mic-985xx
86  - openbench-logic-sniffer
87  - serial-dmm
88  - tondaj-sl-814
89
90 The 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
105 Permissions of serial port based devices
106 ----------------------------------------
107
108 When 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
110 that the user running the libsigrok frontend has (read/write) permissions to
111 access the serial port device (e.g. /dev/ttyS0, /dev/ttyUSB0, and so on).
112
113 You can use 'chmod' to apply permissions as you see fit, and/or 'chown' to
114 change the owner of the serial port device to a certain user or group.
115
116 For USB-to-serial based devices, we recommended using our udev rules file
117 (see below for details).
118
119
120 Permissions for USB devices (udev rules file)
121 ---------------------------------------------
122
123 When using USB-based devices supported by libsigrok, the user running the
124 libsigrok frontend (e.g. sigrok-cli) has to have (read/write) permissions
125 for the respective USB device.
126
127 On Linux, this is accomplished using either 'chmod' (not recommended) or
128 using the udev rules file shipped with libsigrok (recommended).
129
130 The file is available in contrib/z60_libsigrok.rules. It contains entries
131 for all libsigrok-supported (USB-based) devices and changes their group
132 to 'plugdev' and the permissions to '664'.
133
134 When using a libsigrok package from your favorite Linux distribution, the
135 packager will have already taken care of properly installing the udev file
136 in the correct (distro-specific) place, and you don't have to do anything.
137 The packager might also have adapted 'plugdev' and '664' as needed.
138
139 If you're building from source, you need to copy the file to the place
140 where your distro expects such files. This is beyond the scope of this README,
141 but 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
143 udev, e.g. via '/etc/init.d/udev restart' or similar, and you'll have to
144 re-attach your device via USB.
145
146 Please consult the udev docs of your distro for details.
147
148
149 Cypress FX2 based devices
150 -------------------------
151
152 Devices using the Cypress FX2(LP) chip without any specific USB VID/PID will
153 be enumerated with VID/PID 04b4:8613 (the default for "unconfigured FX2").
154 These are usually "FX2 eval boards" (that can also be used as LAs, though).
155
156 On Linux, the 'usbtest' driver will usually grab such devices, and they will
157 thus not be usable by libsigrok (and frontends).
158
159 You can fix this by running 'rmmod usbtest' as root before using the device.
160
161
162 UNI-T DMM (and rebranded models) cables
163 ---------------------------------------
164
165 UNI-T multimeters (and rebranded devices, e.g. some Voltcraft models) can
166 ship 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
172 The above cables are all physically compatible (same IR connector shape)
173 with all/most currently known UNI-T multimeters. For example, you can
174 use either of the UT-D04 USB/HID cables or the UT-D02 RS232 cable with
175 the UNI-T UT61D multimeter.
176
177 When using the UT-D02 RS232 cable with any of the supported UNI-T DMMs,
178 you 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
181 You 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
183 RS232 port) on Linux (see above).
184
185 Finally, the user running the frontend (e.g. sigrok-cli) also needs
186 permissions to access the respective serial port (see above).
187
188 Examples (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
193 When using any of the UT-D04 USB/HID cables you have to use the respective
194 driver _without_ the '-ser' drivername suffix (internally all of these models
195 are handled by the 'uni-t-dmm' driver).
196
197 Since the UT-D04 cables are USB based (but don't use a USB-to-serial chip)
198 there is no need to specify a serial port via 'conn', of course.
199 However, the user running the frontend does also need to have permissions
200 to access the respective USB device (see above).
201
202 Examples (sigrok-cli):
203
204  $ sigrok-cli --driver uni-t-ut61e ...
205  $ sigrok-cli --driver voltcraft-vc820 ...
206
207
208 UNI-T UT-D04 cable issue on Linux
209 ---------------------------------
210
211 The UNI-T UT-D04 cable with Hoitek HE2325U (or WCH CH9325) chip seems to have
212 a very specific problem on Linux. Apparently it requires to be put into
213 suspend (and woken up again) before it is usable. This seems to be a
214 Linux-only issue, Windows is not affected by this since apparently the
215 Windows kernel does this for every USB device, always.
216
217 Thus, if you want to use any of the UNI-T DMMs with this specific cable,
218 you'll have to run the following script (as root) once, every time you attach
219 the cable via USB. The script was written by Ralf Burger.
220
221 See 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
231 ALSA driver
232 -----------
233
234 The 'alsa' driver can be used to sample analog data using a PC's soundcard.
235 I.e. the sound card can act as a simple oscilloscope (with some limitations)
236 using commercial or DIY "sound card scope probe" cables.
237
238 Since ALSA is a Linux-specific sound system, this driver will inherently
239 only compile and work on Linux.
240
241 We might write additional drivers to make a similar functionality available
242 on other OSes at some point.
243
244
245 ChronoVu LA8 USB VID/PIDs
246 -------------------------
247
248 The ChronoVu LA8 logic analyzer is available in two revisions. Previously,
249 the LA8 shipped with a USB VID/PID of 0403:6001, which is the standard ID
250 for FTDI FT232 USB chips.
251
252 Since this made it hard to distinguish the LA8 from any other device
253 with this FTDI chip connected to the PC, the vendor later shipped the
254 LA8 with a USB VID/PID of 0403:8867.
255
256 The 'chronovu-la8' driver in libsigrok supports both VID/PID pairs and
257 automatically finds devices with either VID/PID pair. However, currently
258 the driver will assume any device with VID/PID 0403:6001 is a ChronoVu LA8.
259
260
261 OLS
262 ---
263
264 The Dangerous Prototypes Openbench Logic Sniffer (OLS) logic analyzer is
265 supported by the 'ols' driver in libsigrok. This driver assumes a somewhat
266 recent firmware has been flashed onto the OLS (it doesn't need a firmware
267 upload every time it's attached via USB, since the firmware is stored in the
268 device permanently).
269
270 The most recent firmware version that is tested is 3.07.
271
272 If you use any older firmware and your OLS is not found or is not working
273 properly, please upgrade to at least this firmware version. Check the
274 Dangerous Prototypes wiki for firmware upgrade instructions:
275
276  http://dangerousprototypes.com/docs/Logic_Sniffer_upgrade_procedure
277
278 Also, you need to specify a serial port for the OLS in the frontends, e.g.
279 using the 'conn' option in sigrok-cli, and you also need to have the
280 permissions to access the serial port (see above).
281
282 Example:
283
284  $ sigrok-cli --driver ols:conn=/dev/ttyACM0 ...
285
286
287 Rigol DS1xx2 oscilloscopes
288 --------------------------
289
290 The 'rigol-ds1xx2' driver (for the Rigol DS1052E and some other, similar DSOs)
291 currently uses the Linux usbtmc kernel driver. This means it can currently
292 only be built and used on Linux (i.e., it's non-portable).
293
294 The use of a kernel module also means it is dependent on the kernel version
295 used, as well as on whether this specific module is available in the kernel.
296 Additionally, the usbtmc kernel module has been known to have various bugs
297 in some versions. These are some (but not all) drawbacks of using a kernel
298 module as opposed to a libusb-based driver that works in user-space.
299
300 We plan to change the driver to use the 'librevisa' user-space shared
301 library (which uses libusb) soon, which will fix all these issues and make
302 the driver portable at the same time.
303