mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 00:04:29 +08:00
8ff103f993
This adds an additional command line option for the Broadcast exercise, so that the user can indicate the number of BISes to create as part of a BIG (Broadcast Source), or the number of BISes to synchronize to (Broadcast Sink). For the Broadcast Source exercise, issue the following command, in order to create a BIG with handle 0x01, associated with the advertising handle 0x01, with 2 BISes: tools/isotest -i hci0 -s 00:00:00:00:00:00 -N 2 -G 1 -T 1 The isotest and btmon logs will look something like this: isotest[7178]: mgmt socket: fd 3 isotest[7178]: mgmt_set_le: err 0 isotest[7178]: mgmt_set_experimental: err 0 isotest[7179]: Exit isotest[7178]: Connecting 00:00:00:00:00:00 ... isotest[7178]: Connected [00:00:00:00:00:00] isotest[7178]: QoS [BIG 0x01 BIS 0x01 Packing 0x00 Framing 0x00 Encryption 0x00] isotest[7178]: Input QoS [Interval 10000 us Latency 10 ms SDU 0 PHY 0x00 RTN 2] isotest[7178]: Output QoS [Interval 10000 us Latency 10 ms SDU 40 PHY 0x02 RTN 2] isotest[7178]: Connecting 00:00:00:00:00:00 ... isotest[7178]: Connected [00:00:00:00:00:00] isotest[7178]: QoS [BIG 0x01 BIS 0x01 Packing 0x00 Framing 0x00 Encryption 0x00] isotest[7178]: Input QoS [Interval 10000 us Latency 10 ms SDU 0 PHY 0x00 RTN 2] isotest[7178]: Output QoS [Interval 10000 us Latency 10 ms SDU 40 PHY 0x02 RTN 2] isotest[7183]: Sending ... isotest[7183]: Number of packets: 1 isotest[7183]: Socket jitter buffer: 80 buffer isotest[7183]: [seq 0] 40 bytes buffered 92 (3712 bytes) isotest[7184]: Sending ... isotest[7184]: Number of packets: 1 isotest[7184]: Socket jitter buffer: 80 buffer isotest[7184]: [seq 0] 40 bytes buffered 92 (3712 bytes) isotest[7178]: Exit < HCI Command: LE Create Broadcast Isochronous Group (0x08|0x0068) plen 31 Handle: 0x01 Advertising Handle: 0x01 Number of BIS: 2 SDU Interval: 10000 us (0x002710) Maximum SDU size: 40 Maximum Latency: 10 ms (0x000a) RTN: 0x02 PHY: LE 2M (0x02) Packing: Sequential (0x00) Framing: Unframed (0x00) Encryption: 0x00 Broadcast Code: 00000000000000000000000000000000 > HCI Event: Command Status (0x0f) plen 4 LE Create Broadcast Isochronous Group (0x08|0x0068) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 23 LE Broadcast Isochronous Group Complete (0x1b) Status: Success (0x00) Handle: 0x01 BIG Synchronization Delay: 1974 us (0x0007b6) Transport Latency: 1974 us (0x0007b6) PHY: LE 2M (0x02) NSE: 3 BN: 1 PTO: 1 IRC: 3 Maximum PDU: 40 ISO Interval: 10.00 msec (0x0008) Connection Handle #0: 10 Connection Handle #1: 11 < HCI Command: LE Setup Isochronous Data Path (0x08|0x006e) plen 13 Handle: 10 Data Path Direction: Input (Host to Controller) (0x00) Data Path: HCI (0x00) Coding Format: Transparent (0x03) Company Codec ID: Ericsson Technology Licensing (0) Vendor Codec ID: 0 Controller Delay: 0 us (0x000000) Codec Configuration Length: 0 Codec Configuration: > HCI Event: Command Complete (0x0e) plen 6 LE Setup Isochronous Data Path (0x08|0x006e) ncmd 1 Status: Success (0x00) Handle: 10 < HCI Command: LE Setup Isochronous Data Path (0x08|0x006e) plen 13 Handle: 11 Data Path Direction: Input (Host to Controller) (0x00) Data Path: HCI (0x00) Coding Format: Transparent (0x03) Company Codec ID: Ericsson Technology Licensing (0) Vendor Codec ID: 0 Controller Delay: 0 us (0x000000) Codec Configuration Length: 0 Codec Configuration: > HCI Event: Command Complete (0x0e) plen 6 LE Setup Isochronous Data Path (0x08|0x006e) ncmd 1 Status: Success (0x00) Handle: 11 < ISO Data TX: Handle 10 flags 0x02 dlen 44 < ISO Data TX: Handle 11 flags 0x02 dlen 44 > HCI Event: Number of Completed Packets (0x13) plen 5 Num handles: 1 Handle: 10 Count: 1 > HCI Event: Number of Completed Packets (0x13) plen 5 Num handles: 1 Handle: 11 Count: 1 For the Broadcast Sink exercise, issue the following command, in order to synchronize to the BISes created by the source: tools/isotest -i hci1 -r 36:13:00:E1:1B:F0 -V le_random -N 2 -G 1 The flow is shown by the isotest log and the filtered btmon snippet below: isotest[4033]: mgmt socket: fd 3 isotest[4034]: Exit isotest[4033]: mgmt_set_le: err 0 isotest[4033]: mgmt_set_experimental: err 0 isotest[4033]: Waiting for connection 36:13:00:E1:1B:F0... isotest[4036]: Connected [36:13:00:E1:1B:F0] isotest[4036]: QoS [BIG 0x01 BIS 0x00 Packing 0x00 Framing 0x00 Encryption 0x00] isotest[4036]: Input QoS [Interval 1974 us Latency 10 ms SDU 40 PHY 0x00 RTN 0] isotest[4036]: Output QoS [Interval 0 us Latency 0 ms SDU 0 PHY 0x00 RTN 0] isotest[4036]: Receiving ... isotest[4037]: Connected [36:13:00:E1:1B:F0] isotest[4037]: QoS [BIG 0x01 BIS 0x00 Packing 0x00 Framing 0x00 Encryption 0x00] isotest[4037]: Input QoS [Interval 1974 us Latency 10 ms SDU 40 PHY 0x00 RTN 0] isotest[4037]: Output QoS [Interval 0 us Latency 0 ms SDU 0 PHY 0x00 RTN 0] isotest[4037]: Receiving ... isotest[4037]: [seq 0] 280 bytes in 6.48 sec speed 0.34 kb/s isotest[4036]: [seq 0] 280 bytes in 6.54 sec speed 0.33 kb/s isotest[4037]: [seq 1] 280 bytes in 7.01 sec speed 0.31 kb/s isotest[4036]: [seq 1] 280 bytes in 7.02 sec speed 0.31 kb/s isotest[4037]: [seq 2] 280 bytes in 7.06 sec speed 0.31 kb/s isotest[4036]: [seq 2] 280 bytes in 7.04 sec speed 0.31 kb/s < HCI Command: LE Periodic Advertising Create Sync (0x08|0x0044) plen 14 Options: 0x0000 Use advertising SID, Advertiser Address Type and address Reporting initially enabled SID: 0x00 Adv address type: Random (0x01) Adv address: 36:13:00:E1:1B:F0 (Non-Resolvable) Skip: 0x0000 Sync timeout: 163840 msec (0x4000) Sync CTE type: 0x0000 > HCI Event: Command Status (0x0f) plen 4 LE Periodic Advertising Create Sync (0x08|0x0044) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Extended Scan Parameters (0x08|0x0041) plen 13 Own address type: Public (0x00) Filter policy: Ignore not in accept list (0x01) PHYs: 0x05 Entry 0: LE 1M Type: Passive (0x00) Interval: 60.000 msec (0x0060) Window: 30.000 msec (0x0030) Entry 1: LE Coded Type: Passive (0x00) Interval: 60.000 msec (0x0060) Window: 30.000 msec (0x0030) > HCI Event: Command Complete (0x0e) plen 4 LE Set Extended Scan Parameters (0x08|0x0041) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Extended Scan Enable (0x08|0x0042) plen 6 Extended scan: Enabled (0x01) Filter duplicates: Enabled (0x01) Duration: 0 msec (0x0000) Period: 0.00 sec (0x0000) > HCI Event: Command Complete (0x0e) plen 4 LE Set Extended Scan Enable (0x08|0x0042) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 16 LE Periodic Advertising Sync Established (0x0e) Status: Success (0x00) Sync handle: 0 Advertising SID: 0x00 Advertiser address type: Random (0x01) Advertiser address: 36:13:00:E1:1B:F0 (Non-Resolvable) Advertiser PHY: LE 2M (0x02) Periodic advertising interval: 10.00 msec (0x0008) Advertiser clock accuracy: 0x00 > HCI Event: LE Meta Event (0x3e) plen 8 LE Periodic Advertising Report (0x0f) Sync handle: 0 TX power: 127 dbm (0x7f) RSSI: -47 dBm (0xd1) CTE Type: No Constant Tone Extension (0xff) Data status: Complete Data length: 0x00 > HCI Event: LE Meta Event (0x3e) plen 20 LE Broadcast Isochronous Group Info Advertising Report (0x22) Sync Handle: 0x0000 Number BIS: 2 NSE: 3 ISO Interval: 10.00 msec (0x0008) BN: 1 PTO: 1 IRC: 3 Maximum PDU: 40 SDU Interval: 10000 us (0x002710) Maximum SDU: 40 PHY: LE 2M (0x02) Framing: Unframed (0x00) Encryption: 0x00 < HCI Command: LE Broadcast Isochronous Group Create Sync (0x08|0x006b) plen 26 BIG Handle: 0x01 BIG Sync Handle: 0x0000 Encryption: Unencrypted (0x00) Broadcast Code: 00000000000000000000000000000000 Maximum Number Subevents: 0x00 Timeout: 163840 ms (0x4000) Number of BIS: 2 BIS ID: 0x01 BIS ID: 0x02 > HCI Event: LE Meta Event (0x3e) plen 19 LE Broadcast Isochronous Group Sync Estabilished (0x1d) Status: Success (0x00) BIG Handle: 0x01 Transport Latency: 1974 us (0x0007b6) NSE: 3 BN: 1 PTO: 1 IRC: 3 Maximum PDU: 40 ISO Interval: 10.00 msec (0x0008) Connection Handle #0: 10 Connection Handle #1: 11 < HCI Command: LE Setup Isochronous Data Path (0x08|0x006e) plen 13 Handle: 10 Data Path Direction: Output (Controller to Host) (0x01) Data Path: HCI (0x00) Coding Format: Transparent (0x03) Company Codec ID: Ericsson Technology Licensing (0) Vendor Codec ID: 0 Controller Delay: 0 us (0x000000) Codec Configuration Length: 0 Codec Configuration: > HCI Event: Command Complete (0x0e) plen 6 LE Setup Isochronous Data Path (0x08|0x006e) ncmd 1 Status: Success (0x00) Handle: 10 < HCI Command: LE Setup Isochronous Data Path (0x08|0x006e) plen 13 Handle: 11 Data Path Direction: Output (Controller to Host) (0x01) Data Path: HCI (0x00) Coding Format: Transparent (0x03) Company Codec ID: Ericsson Technology Licensing (0) Vendor Codec ID: 0 Controller Delay: 0 us (0x000000) Codec Configuration Length: 0 Codec Configuration: > HCI Event: Command Complete (0x0e) plen 6 LE Setup Isochronous Data Path (0x08|0x006e) ncmd 1 Status: Success (0x00) Handle: 11 > ISO Data RX: Handle 10 flags 0x06 dlen 48 > ISO Data RX: Handle 11 flags 0x06 dlen 48
226 lines
4.2 KiB
ReStructuredText
226 lines
4.2 KiB
ReStructuredText
=======
|
|
isotest
|
|
=======
|
|
|
|
-----------
|
|
ISO testing
|
|
-----------
|
|
|
|
:Authors: - Luiz Augusto Von Dentz <luiz.von.dentz@intel.com>
|
|
:Version: BlueZ
|
|
:Copyright: Free use of this software is granted under ther terms of the GNU
|
|
Lesser General Public Licenses (LGPL).
|
|
:Date: May 4, 2022
|
|
:Manual section: 1
|
|
:Manual group: Linux System Administration
|
|
|
|
SYNOPSIS
|
|
========
|
|
|
|
**isotest** <*MODE*> [*OPTIONS*] [*bdaddr*] [*bdaddr1*]...
|
|
|
|
DESCRIPTION
|
|
===========
|
|
|
|
**isotest(1)** is used to test Isochronous (CIS/BIS) communications on the
|
|
BlueZ stack
|
|
|
|
MODES
|
|
=====
|
|
|
|
-d, --dump=[FILE] Listen and dump incoming data
|
|
(CIS server/BIS broadcaster) and optionally save the
|
|
contents to *FILE*.
|
|
|
|
-c, --reconnect Reconnect (CIS client).
|
|
|
|
-m, --multiple Multiple connects (CIS client).
|
|
|
|
-r, --receive=[FILE] Receive (CIS server/BIS broadcast receiver) and
|
|
optionally save the contents to *FILE*.
|
|
|
|
-s, --send=[FILE] Connect and send (CIS client/BIS broadcaster), can
|
|
optionally use contents from *FILE*.
|
|
|
|
-n, --silent Connect and be silent (CIS client/BIS broadcaster).
|
|
|
|
OPTIONS
|
|
=======
|
|
|
|
-b, --bytes=<SIZE> Send or Receive packet size
|
|
|
|
-i, --index=<NUM> Select the specified HCI device index. *hciNUM* is
|
|
also acceptable.
|
|
|
|
-j, --jitter=<JITTER> Socket jitter buffer.
|
|
|
|
-h, --help
|
|
|
|
-q, --quiet Disables packet logging.
|
|
|
|
-t, --timeout=<USEC> Socket send timeout.
|
|
|
|
-C, --continue Continuously send packets starting over in case of a
|
|
file.
|
|
|
|
-W, --defer=<SEC> Enable deferred setup.
|
|
|
|
-M, --mtu=<SDU> Socket QoS SDU.
|
|
|
|
-S, --sca/adv-interval=<SCA/INTERVAL>
|
|
Socket QoS CIS SCA/BIS advertising interval.
|
|
|
|
-P, --packing=<PACKING> Socket QoS Packing.
|
|
|
|
.. list-table::
|
|
:header-rows: 1
|
|
:widths: auto
|
|
:stub-columns: 1
|
|
:align: left
|
|
|
|
* - *PACKING*
|
|
- Description
|
|
|
|
* - **0x00**
|
|
- Sequential
|
|
|
|
* - **0x01**
|
|
- Interleaved
|
|
|
|
-F, --framing=<FRAMING> Socket QoS Framing.
|
|
|
|
.. list-table::
|
|
:header-rows: 1
|
|
:widths: auto
|
|
:stub-columns: 1
|
|
:align: left
|
|
|
|
* - *FRAMING*
|
|
- Description
|
|
|
|
* - **0x00**
|
|
- Unframed
|
|
|
|
* - **0x01**
|
|
- Framed
|
|
|
|
-I, --interval=<USEC> Socket QoS Interval.
|
|
|
|
-L, --latency=<MSEC> Socket QoS Latency.
|
|
|
|
-Y, --phy=<PHY> Socket QoS PHY.
|
|
|
|
.. list-table::
|
|
:header-rows: 1
|
|
:widths: auto
|
|
:stub-columns: 1
|
|
:align: left
|
|
|
|
* - *PHY*
|
|
- Description
|
|
|
|
* - **0x01**
|
|
- LE 1M
|
|
|
|
* - **0x02**
|
|
- LE 2M
|
|
|
|
* - **0x03**
|
|
- LE Coded
|
|
|
|
-R, --rtn=<NUM> Socket QoS retransmissions.
|
|
|
|
-B, --preset=<PRESET> Socket QoS preset.
|
|
|
|
-G, --CIG/BIG=<ID> Socket QoS CIG/BIG ID.
|
|
|
|
-T, --CIS/BIS=<ID> Socket QoS CIS/BIS ID.
|
|
|
|
-V, --type=<TYPE> Socket destination address type:
|
|
|
|
.. list-table::
|
|
:header-rows: 1
|
|
:widths: auto
|
|
:stub-columns: 1
|
|
:align: left
|
|
|
|
* - *TYPE*
|
|
- Description
|
|
|
|
* - **le_public**
|
|
- LE Public Address
|
|
|
|
* - **le_random**
|
|
- LE Random Address
|
|
|
|
-e, --enc=<ENCRYPTION> Socket QoS BIG Encryption
|
|
|
|
.. list-table::
|
|
:header-rows: 1
|
|
:widths: auto
|
|
:stub-columns: 1
|
|
:align: left
|
|
|
|
* - *ENCRYPTION*
|
|
- Description
|
|
|
|
* - **0x00**
|
|
- BIG unencrypted
|
|
|
|
* - **0x01**
|
|
- BIG encrypted
|
|
|
|
-k, --bcode=<BCODE> Socket QoS Broadcast Code
|
|
|
|
-N, --nbis=<NBIS> Number of BISes to create as part of a
|
|
BIG (BIS broadcaster) or to synchronize
|
|
to (BIS broadcast receiver)
|
|
|
|
EXAMPLES
|
|
========
|
|
|
|
Unicast Central
|
|
---------------
|
|
|
|
.. code-block::
|
|
|
|
$ tools/isotest -s XX:XX:XX:XX:XX:XX
|
|
|
|
Unicast Central connecting to 2 peers using CIG 0x01
|
|
----------------------------------------------------
|
|
|
|
.. code-block::
|
|
|
|
$ tools/isotest -G 0x01 -s XX:XX:XX:XX:XX:XX YY:YY:YY:YY:YY:YY
|
|
|
|
Unicast Peripheral
|
|
------------------
|
|
|
|
.. code-block::
|
|
|
|
$ tools/isotest -d
|
|
|
|
Broadcaster
|
|
-----------
|
|
|
|
.. code-block::
|
|
|
|
$ tools/isotest -s 00:00:00:00:00:00
|
|
|
|
Broadcast Receiver using hci1
|
|
-----------------------------
|
|
|
|
.. code-block::
|
|
|
|
$ tools/isotest -i hci1 -d XX:XX:XX:XX:XX:XX
|
|
|
|
RESOURCES
|
|
=========
|
|
|
|
http://www.bluez.org
|
|
|
|
REPORTING BUGS
|
|
==============
|
|
|
|
linux-bluetooth@vger.kernel.org
|