Skip to content

Commit 54e1b63

Browse files
[3.13] gh-132099: Fix documentation for the BTPROTO_HCI protocol (GH-132118) (GH-132482)
(cherry picked from commit 1d97488)
1 parent 1dcdac6 commit 54e1b63

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

Doc/library/socket.rst

+13-8
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,20 @@ created. Socket addresses are represented as follows:
143143
- :const:`BTPROTO_RFCOMM` accepts ``(bdaddr, channel)`` where ``bdaddr``
144144
is the Bluetooth address as a string and ``channel`` is an integer.
145145

146-
- :const:`BTPROTO_HCI` accepts ``(device_id,)`` where ``device_id`` is
147-
either an integer or a string with the Bluetooth address of the
148-
interface. (This depends on your OS; NetBSD and DragonFlyBSD expect
149-
a Bluetooth address while everything else expects an integer.)
146+
- :const:`BTPROTO_HCI` accepts a format that depends on your OS.
147+
148+
- On Linux it accepts a tuple ``(device_id,)`` where ``device_id``
149+
is an integer specifying the number of the Bluetooth device.
150+
- On FreeBSD, NetBSD and DragonFly BSD it accepts ``bdaddr`` where ``bdaddr``
151+
is a :class:`bytes` object containing the Bluetooth address in a
152+
string format. (ex. ``b'12:23:34:45:56:67'``)
150153

151154
.. versionchanged:: 3.2
152155
NetBSD and DragonFlyBSD support added.
153156

157+
.. versionchanged:: 3.13.3
158+
FreeBSD support added.
159+
154160
- :const:`BTPROTO_SCO` accepts ``bdaddr`` where ``bdaddr`` is a
155161
:class:`bytes` object containing the Bluetooth address in a
156162
string format. (ex. ``b'12:23:34:45:56:67'``) This protocol is not
@@ -630,10 +636,9 @@ Constants
630636
HCI_TIME_STAMP
631637
HCI_DATA_DIR
632638

633-
For use with :const:`BTPROTO_HCI`. :const:`HCI_FILTER` is not
634-
available for NetBSD or DragonFlyBSD. :const:`HCI_TIME_STAMP` and
635-
:const:`HCI_DATA_DIR` are not available for FreeBSD, NetBSD, or
636-
DragonFlyBSD.
639+
For use with :const:`BTPROTO_HCI`. :const:`!HCI_FILTER` is only
640+
available on Linux and FreeBSD. :const:`!HCI_TIME_STAMP` and
641+
:const:`!HCI_DATA_DIR` are only available on Linux.
637642

638643
.. data:: AF_QIPCRTR
639644

0 commit comments

Comments
 (0)