-
Notifications
You must be signed in to change notification settings - Fork 42
/
section-transports.tex
147 lines (98 loc) · 5.64 KB
/
section-transports.tex
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
\chapter{Transports}
\label{sec:transports}
Libscopehal uses a ``transport" object in order to pass commands and data to instruments, in order to decouple the
specifics of LXI, USBTMC, etc. from individual instrument drivers. This section describes the supported transports and
their usage and limitations.
Not all transports are possible to use with any given driver due to hardware limitations or software/firmware quirks.
For details on which transport(s) are usable with a particular instrument, consult the documentation for that device's
driver.
\section{gpib}
SCPI over GPIB.
This transport takes up to four arguments: GPIB board index, primary address, secondary address, and timeout value.
Only board index and primary address are required. We currently support using a single GPIB device per GPIB board
(interface) in a ngscopeclient session. You cannot currently access multiple devices in the same or across instances.
Better support for multiple instrument on a single board is planned.
NOTE: The current implementation of this driver only works on Linux, using the linux-gpib library.
Example:
\begin{lstlisting}[language=sh, numbers=none]
ngscopeclient myscope:keysightdca:gpib:0:7
\end{lstlisting}
\section{lan}
SCPI over TCP with no further encapsulation.
This transport takes two arguments: hostname/IP and port number.
If port number is not specified, uses TCP port 5025 (IANA assigned) by default. Note that Rigol oscilloscopes use the
non-standard port 5555, not 5025, so the port number must always be specified when using a Rigol instrument.
Example:
\begin{lstlisting}[language=sh, numbers=none]
ngscopeclient myscope:rigol:lan:192.0.2.9:5555
\end{lstlisting}
\section{lxi}
SCPI over LXI VXI-11.
Note that due to the remote procedure call paradigm used by LXI, it is not possible to batch multiple outstanding
requests to an instrument when using this transport. Some instruments may experience reduced performance when using LXI
as the transport. Drivers which require command batching may not be able to use LXI VXI-11 as the transport even if the
instrument supports it.
Example:
\begin{lstlisting}[language=sh, numbers=none]
ngscopeclient myscope:tektronix:lxi:192.0.2.9
\end{lstlisting}
\section{null}
This transport does nothing, and is used as a placeholder for development simulations or non-SCPI instruments.
NOTE: Due to limitations of the current command line argument parsing code, an argument must be provided to all
transports, including this one, when connecting via the command line. Since the argument is ignored, any non-empty
string may be used.
Example:
\begin{lstlisting}[language=sh, numbers=none]
ngscopeclient sim:demo:null:blah
\end{lstlisting}
\section{socketcan}
This transport provides a bridge for accessing the native Linux SocketCAN API from the scopehal driver layer. When
paired with the ``socketcan" oscilloscope driver and a suitable CAN peripheral, it allows ngscopeclient to be used as a
CAN bus protocol analyzer. Since SocketCAN is a Linux-only API, this transport is not available on other platforms.
This transport takes one argument: the device name (e.g. ``can0")
\section{twinlan}
This transport is used by some Antikernel Labs oscilloscopes, as well as most of the bridge servers used for interfacing
libscopehal with USB oscilloscopes' SDKs. It takes three arguments: hostname/IP and two port numbers.
It uses two TCP sockets on different ports. The first carries SCPI text (as in the ``lan" transport), and the second is
for binary waveform data.
If port numbers are not specified, the SCPI port defaults to the IANA standard of 5025, and the data port defaults to
5026. If the SCPI port but not the data port is specified, the data port defaults to the SCPI port plus one.
\section{uart}
SCPI over RS-232 or USB-UART.
This transport takes 3 arguments: device path (required), baud rate (optional), and flags (optional). If baud rate is not specified, it
defaults to 115200.
Example:
\begin{lstlisting}[language=sh, numbers=none]
ngscopeclient myscope:rigol:uart:/dev/ttyUSB0:115200
\end{lstlisting}
Some devices, like the NanoVNA, need to activate the DTR line to communicate. This can be achieved by adding the DTR flag to the connection string.
Example:
\begin{lstlisting}[language=sh, numbers=none]
ngscopeclient NanoVNA-F:nanovna:uart:COM6:115200:DTR
\end{lstlisting}
\section{usbtmc}
SCPI over USB Test \& Measurement Class protocol.
This transport takes two arguments: the path to the usbtmc kernel device object and the TMC transfer size (optional). As Workaround for Siglent SDS1x04x-E set size to 48.
NOTE: The current implementation of this driver only works on Linux. There is currently no support for USBTMC on
Windows (\issue{scopehal}{301})
Example:
\begin{lstlisting}[language=sh, numbers=none]
ngscopeclient myscope:siglent:usbtmc:/dev/usbtmc0:48
\end{lstlisting}
\section{vicp}
SCPI over Teledyne LeCroy Virtual Instrument Control Protocol.
This transport takes two arguments: hostname/IP and port number.
If port number is not specified, uses TCP port 1861 (IANA assigned) by default.
Example:
\begin{lstlisting}[language=sh, numbers=none]
ngscopeclient myscope:lecroy:vicp:192.0.2.9
\end{lstlisting}
\section{hid}
This transport layer is usually used by binary drivers to communicate with Test \& Measurement equiment over USB.
This transport takes two arguments: vendor ID (hex) and product ID (hex).
Optionally a third argument can be added with the instrument's serial number.
If not provided, the instrument's serial number is automatically pulled at first connection and stored in the connection string.
Example:
\begin{lstlisting}[language=sh, numbers=none]
ngscopeclient AlientekDP100:alientek_dp:hid:2e3c:af01
\end{lstlisting}