@@ -137,8 +137,19 @@ created. Socket addresses are represented as follows:
137137- :const: `AF_BLUETOOTH ` supports the following protocols and address
138138 formats:
139139
140- - :const: `BTPROTO_L2CAP ` accepts ``(bdaddr, psm) `` where ``bdaddr `` is
141- the Bluetooth address as a string and ``psm `` is an integer.
140+ - :const: `BTPROTO_L2CAP ` accepts a tuple
141+ ``(bdaddr, psm[, cid[, bdaddr_type]]) `` where:
142+
143+ - ``bdaddr `` is a string specifying the Bluetooth address.
144+ - ``psm `` is an integer specifying the Protocol/Service Multiplexer.
145+ - ``cid `` is an optional integer specifying the Channel Identifier.
146+ If not given, defaults to zero.
147+ - ``bdaddr_type `` is an optional integer specifying the address type;
148+ one of :const: `BDADDR_BREDR ` (default), :const: `BDADDR_LE_PUBLIC `,
149+ :const: `BDADDR_LE_RANDOM `.
150+
151+ .. versionchanged :: next
152+ Added ``cid `` and ``bdaddr_type `` fields.
142153
143154 - :const: `BTPROTO_RFCOMM ` accepts ``(bdaddr, channel) `` where ``bdaddr ``
144155 is the Bluetooth address as a string and ``channel `` is an integer.
@@ -626,6 +637,14 @@ Constants
626637 This constant contains a boolean value which indicates if IPv6 is supported on
627638 this platform.
628639
640+ .. data :: AF_BLUETOOTH
641+ BTPROTO_L2CAP
642+ BTPROTO_RFCOMM
643+ BTPROTO_HCI
644+ BTPROTO_SCO
645+
646+ Integer constants for use with Bluetooth addresses.
647+
629648.. data :: BDADDR_ANY
630649 BDADDR_LOCAL
631650
@@ -634,6 +653,15 @@ Constants
634653 any address when specifying the binding socket with
635654 :const: `BTPROTO_RFCOMM `.
636655
656+ .. data :: BDADDR_BREDR
657+ BDADDR_LE_PUBLIC
658+ BDADDR_LE_RANDOM
659+
660+ These constants describe the Bluetooth address type when binding or
661+ connecting a :const: `BTPROTO_L2CAP ` socket.
662+
663+ .. versionadded :: next
664+
637665.. data :: HCI_FILTER
638666 HCI_TIME_STAMP
639667 HCI_DATA_DIR
0 commit comments