File: README.Devices

package info (click to toggle)
brltty 6.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 35,776 kB
  • sloc: ansic: 150,447; java: 13,484; sh: 9,667; xml: 5,702; tcl: 2,634; makefile: 2,328; awk: 713; lisp: 366; python: 321; ml: 301
file content (290 lines) | stat: -rw-r--r-- 11,726 bytes parent folder | download | duplicates (5)
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
~~~~~~~~~~~~~~~~~~
Device Identifiers
~~~~~~~~~~~~~~~~~~

.. include:: prologue.rst

Description
===========

The general syntax of a device identifier is:

.. parsed-literal:: qualifier:parameter=value+...

More specifically, with [brackets] meaning optional, the syntax is:

.. parsed-literal:: [qualifier:][parameter=]value[+parameter=value]...

The qualifier specifies which class of device is being identified.
It is separated from the rest of the device identifier by a colon (``:``).
It may be one of:

   ==========  =======================
   Qualifier   Assumed First Parameter
   ----------  -----------------------
   serial:     name=
   usb:        serialNumber=
   bluetooth:  address=
   hid:        address=
   null:
   ==========  =======================

The qualifier is case insensitive, and any abbreviation may be used.
For backward compatibility (to when a device identifier was
strictly interpreted as the absolute path to a serial device),
the qualifier (along with its colon delimiter) is optional,
and, if it isn't supplied, ``serial`` is assumed.

One or more parameters may be supplied after the qualifier.
Each parameter is specified as its name and its value,
in that order, separated by an equals (``=``) sign.
Parameters are separated from one another by a plus (``+``) sign.
Parameter names are case insensitive, and any abbreviation may be used.
Supplying a zero-length value means to use the parameter's default value.

For backward compatibility
(to when device identifier parameters weren't supported),
the first supplied parameter is special
in that its name (along with its equals sign delimiter) is optional.
If the name of the first parameter isn't supplied then the
class-dependent parameter that most specifically identifies the device is assumed.
See the table above for which parameter is assumed for each class.

It isn't possible to supply no parameters at all.
Specifying only the qualifier is equivalent to also specifying
a zero-length value for the assumed first parameter for that class.
For example, specifying ``usb:`` is equivalent to specifying ``usb:serialNumber=``.

An example to illustrate the optionality of both the qualifier
and the name of the first supplied parameter:

* On Linux, the name of the first serial device is ``ttyS0``.
  All of the following device identifiers refer to the same serial device::

    serial:name=ttyS0
    serial:ttyS0
    ttyS0
    name=ttyS0

Serial Device Identifiers
-------------------------

Serial device identifiers support the following parameters:

   ===============  =========================================================
   Name             Value
   ---------------  ---------------------------------------------------------
   ``name``         name of, relative path to, or absolute path to the device
   ``baud``         the data transmission/reception rate (bits per second)
   ``dataBits``     the number of data bits per character
   ``stopBits``     the number of stop bits per character
   ``parity``       ``none``, ``odd``, ``even``, ``space``, ``mark``
   ``flowControl``  ``none``, ``hardware``
   ===============  =========================================================

All of the parameters are optional,
although the ``name=`` parameter should be supplied.
It shouldn't normally be necessary to supply any of the others,
especially since, in most cases, the braille driver overrides them.

``name=``
   Specify the host device to use. It must be the name of the device, the
   relative path to the device, or the absolute path to the device. If it's either
   a name or a relative path then the host's device directory (usually ``/dev``
   on Unix-based platforms) is used. If this parameter isn't supplied then the
   primary (first) serial device is assumed.

``baud=``
   Specify the speed, in bits per second, at which to communicate with the
   device. It must be a positive integer. Typical values are: ``9600``, ``19200``,
   ``38400``, ``57600``, ``115200``. If this parameter isn't supplied then
   ``9600`` is assumed.

``dataBits=``
   Specify the number of bits to use to represent a character, not including
   any metadata (start bit, stop bit(s), parity, etc). It must be a positive integer,
   and is usually within the range ``5``-``8``. If this parameter isn't
   supplied then ``8`` is assumed.

``stopBits=``
   Specify the number of stop bits to inject after a character has been
   transmitted and to expect after a character has been received. It must be
   a positive integer, and is usually either ``1`` (for higher speeds) or ``2`` (for
   lower speeds). If this parameter isn't supplied then ``1`` is assumed.

``parity=``
   Specify the type of error detection to use. It must be one of: ``none``,
   ``odd``, ``even``, ``space``, ``mark``. If this parameter isn't supplied
   then ``none`` is assumed.

``flowControl=``
   Specify the kind of flow control to use. It must be one of: ``none``,
   ``hardware``. If this parameter isn't supplied then ``none`` is assumed.

USB Device Identifiers
----------------------

USB device identifiers support the following parameters:

   ======================  ===================================================
   Name                    Value
   ----------------------  ---------------------------------------------------
   ``serialNumber=``       one or more arbitrary characters
   ``vendorIdentifier=``   an integer within the range 1-65535 (0X0001-0XFFFF)
   ``productIdentifier=``  an integer within the range 1-65535 (0X0001-0XFFFF)
   ``genericDevices=``     ``yes``, ``no``
   ======================  ===================================================

All of the parameters are optional. It shouldn't normally be necessary to
supply any of them.

``serialNumber=`` 
   Specify the serial number that the device must have. The match is case
   sensitive and must be exact. If this parameter isn't supplied then the
   serial number of the device isn't verified.

``vendorIdentifier=``
   Specify the vendor identifier that the device must have. It must be an
   integer within the range ``1``-``65535`` (or, in hexadecimal,
   ``0X0001``-``0XFFFF``). If this parameter isn't supplied then the vendor
   identifier of the device isn't verified.

``productIdentifier=``
   Specify the product identifier that the device must have. It must be an
   integer within the range ``1``-``65535`` (or, in hexadecimal,
   ``0X0001``-``0XFFFF``). If this parameter isn't supplied then the product
   identifier of the device isn't verified.
``genericDevices=``
   Specify whether or not a device that has a generic vendor/product identifier
   pair may be used. It's value must be either ``yes`` or ``no``. The check is
   case insensitive, and any abbreviation may be used. If this parameter isn't
   supplied then ``yes`` is assumed.

Bluetooth Device Identifiers
----------------------------

Bluetooth device identifiers support the following parameters:

   =============  =============================================================
   Name           Value
   -------------  -------------------------------------------------------------
   ``address=``   six two-digit hexadecimal numbers separated by ``:`` or ``-``
   ``name=``      one or more arbitrary characters
   ``channel=``   an integer within the range ``1``-``30``
   ``discover=``  ``yes``, ``no``
   ``timeout=``   an integer within the range ``1``-``59``
   =============  =============================================================

All of the parameters are optional except that
the ``address=`` parameter is required on platforms where
BRLTTY can't yet detect a Bluetooth device based on its name.
It shouldn't normally be necessary to supply any of the others.

BRLTTY can detect a Bluetooth device by name on the following platforms:

* Android
* Linux (if the Bluetooth version is at least 5)
* Windows

``address=``
   Specify the MAC address of the device. It must be six two-digit
   hexadecimal numbers (the "letter" digits may be in either case) separated
   from one another by either a colon (``:``) or a minus (``-``) sign.

``name=``
   Specify the name of the device. It must be one or more
   arbitrary characters. They need only match the beginning (so not
   necessarily all) of the name. Case is significant.
   Only the names of paired devices are considered.
   This parameter is ignored if the ``address=`` parameter has been specified.

``channel=``
   Specify the RFCOMM channel to use. It must be an integer within the range
   ``1``-``30``. If this parameter isn't supplied then either a driver-supplied
   default channel number is assumed or service discovery is performed.

``discover=``
   Specify whether or not service discovery is to be performed. In other words,
   this parameter specifies whether or not the device is to be "asked" for the
   RFCOMM channel number. It must be either ``yes`` or ``no``. The check is
   case insensitive, and any abbreviation may be used. If this parameter isn't
   supplied then whether or not service discovery is performed is decided
   according to the following sequence of tests:

   1) If the ``channel=`` parameter has been supplied, then **no**.
   2) If the driver has requested service discovery, then **yes**.
   3) If the driver has specified a default channel number, then **no**.
   4) Otherwise, **no**.

``timeout=``
   Specify the number of seconds to wait for a connection to the device to be
   acquired. It must be an integer within the range ``1``-``59``. If this
   parameter isn't supplied then a reasonable default is assumed.

HID Device Identifiers
----------------------

HID device identifiers support the following parameters:

   =================  ============================
   Name               Value
   -----------------  ----------------------------
   ``address=``       Bluetooth MAC address
   ``name=``          Bluetooth device name
   ``manufacturer=``  USB device manufacturer
   ``description=``   USB product description
   ``serialNumber=``  USB serial number
   ``vendor=``        four hexadecimal digits
   ``product=``       four hexadecimal digits
   =================  ============================

All of the parameters are optional, although, in most cases,
either the ``serialNumber=`` parameter (for a USB device)
or the ``address=`` parameter (for a Bluetooth device)
should be supplied.
USB-specific and Bluetooth-specific parameters may not be combined.

``address=``
   The MAC address of a Bluetooth device.
   It must be six two-digit hexadecimal numbers
   separated from one another by a colon (``:``).
   The letter digits may be in either case.

``name=``
   The name of a Bluetooth device.
   Only the start of the name is matched.
   Matching is case insensitive.

``manufacturer=``
   The name of the manufacturer of a USB device.
   Only the start of the name is matched.
   Matching is case insensitive.

``description=``
   The product description of a USB device.
   Only the start of the description is matched.
   Matching is case insensitive.

``serialNumber=``
   The serial number of a USB device.
   Only the start of the serial number is matched.
   Matching is case insensitive.

``vendor=``
   The vendor identifier of the device.
   It must be four hexadecimal digits.
   The letter digits may be in either case.

``product=``
   The product identifier of the device.
   It must be four hexadecimal digits.
   The letter digits may be in either case.

Null Device Identifiers
-----------------------
A ``null`` endpoint has the following properties:

* It always indicates that input is available.
* Reading from it always yields end-of-file.
* Writing to it is always successful but does nothing.