bt-avdtp-tool
sends AVDTP commands to a peer that is connected using the fuchsia.bluetooth.avdtp
protocol of a running component. This tool supports both A2DP sink and source.
The primary use of this tool is to provide user prompted commands to a Fuchsia device under test for passing PTS certification tests.
Before running, make sure you've included the tool and the a2dp profiles in your fx set
.
--with //src/connectivity/bluetooth/profiles/bt-a2dp-sink --with //src/connectivity/bluetooth/profiles/bt-a2dp-source --with //src/connectivity/bluetooth/tools/bt-avdtp-tool
Please look at the README's for a2dp-sink and a2dp-source for any additional dependencies that may be needed.
Note: bt-avdtp-tool
launches the required A2DP component. If an A2DP component is already running (bt-a2dp-sink.cmx
or bt-a2dp-source.cmx
), stop it before following the instructions below.
$ bt-cli
and make sure the adapter is discoverable using discoverable
.$ bt-avdtp-tool -p sink
. For A2DP source: $ bt-avdtp-tool -p source
. This should spawn a command line interface for sending avdtp commands to the peer.bt-cli
tool.help
in the CLI.help _CommandName_
in the CLI.fx syslog
for the mapping of peer to generic id. The generic id starts at 0, and is incremented after every PTS test that is run. TODO(fxbug.dev/37089): Deprecate this id scheme and use the underlying peer_id
.peers
printing the list of generic ids mapped to the connected peers.This tool is not meant to be used in a production environment; it is sending out-of-band AVDTP commands to the A2DP profile. This can cause A2DP to get into a bad or irrecoverable state. It is recommended to restart the tool every few commands to refresh A2DP back to its original state.