Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1d97488

Browse files
gh-132099: Fix documentation for the BTPROTO_HCI protocol (GH-132118)
1 parentc7f6535 commit1d97488

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

‎Doc/library/socket.rst

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -149,19 +149,25 @@ created. Socket addresses are represented as follows:
149149
:const:`BDADDR_LE_RANDOM`.
150150

151151
..versionchanged::3.14
152-
Added ``cid`` and ``bdaddr_type`` fields.
152+
Added ``cid`` and ``bdaddr_type`` fields.
153153

154154
-:const:`BTPROTO_RFCOMM` accepts ``(bdaddr, channel)`` where ``bdaddr``
155155
is the Bluetooth address as a string and ``channel`` is an integer.
156156

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

162165
..versionchanged::3.2
163166
NetBSD and DragonFlyBSD support added.
164167

168+
..versionchanged::3.13.3
169+
FreeBSD support added.
170+
165171
-:const:`BTPROTO_SCO` accepts ``bdaddr`` where ``bdaddr`` is a
166172
:class:`bytes` object containing the Bluetooth address in a
167173
string format. (ex. ``b'12:23:34:45:56:67'``)
@@ -662,16 +668,15 @@ Constants
662668
These constants describe the Bluetooth address type when binding or
663669
connecting a:const:`BTPROTO_L2CAP` socket.
664670

665-
..versionadded::3.14
671+
..versionadded::3.14
666672

667673
..data::HCI_FILTER
668674
HCI_TIME_STAMP
669675
HCI_DATA_DIR
670676

671-
For use with:const:`BTPROTO_HCI`.:const:`HCI_FILTER` is not
672-
available for NetBSD or DragonFlyBSD.:const:`HCI_TIME_STAMP` and
673-
:const:`HCI_DATA_DIR` are not available for FreeBSD, NetBSD, or
674-
DragonFlyBSD.
677+
For use with:const:`BTPROTO_HCI`.:const:`!HCI_FILTER` is only
678+
available on Linux and FreeBSD.:const:`!HCI_TIME_STAMP` and
679+
:const:`!HCI_DATA_DIR` are only available on Linux.
675680

676681
..data::AF_QIPCRTR
677682

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp