Files
2025-02-08 18:23:08 -05:00

2445 lines
46 KiB
HTML

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="prev" href="console.html">
<link rel="next" href="speaker.html">
<link rel="icon" href="../images/favicon.ico">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.1">
<title>Bench - Bumble</title>
<link rel="stylesheet" href="../assets/stylesheets/main.a40c8224.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
<link rel="stylesheet" href="../assets/_mkdocstrings.css">
<script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
</head>
<body dir="ltr">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#bench-tool" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../index.html" title="Bumble" class="md-header__button md-logo" aria-label="Bumble" data-md-component="logo">
<img src="../images/logo.png" alt="logo">
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
Bumble
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Bench
</span>
</div>
</div>
</div>
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<div class="md-header__source">
<a href="https://github.com/google/bumble" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../index.html" title="Bumble" class="md-nav__button md-logo" aria-label="Bumble" data-md-component="logo">
<img src="../images/logo.png" alt="logo">
</a>
Bumble
</label>
<div class="md-nav__source">
<a href="https://github.com/google/bumble" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../index.html" class="md-nav__link">
<span class="md-ellipsis">
Introduction
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../getting_started.html" class="md-nav__link">
<span class="md-ellipsis">
Getting Started
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
<span class="md-ellipsis">
Development
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3">
<span class="md-nav__icon md-icon"></span>
Development
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../development/python_environments.html" class="md-nav__link">
<span class="md-ellipsis">
Python Environments
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../development/contributing.html" class="md-nav__link">
<span class="md-ellipsis">
Contributing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../development/code_style.html" class="md-nav__link">
<span class="md-ellipsis">
Code Style
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" >
<div class="md-nav__link md-nav__container">
<a href="../use_cases/index.html" class="md-nav__link ">
<span class="md-ellipsis">
Use Cases
</span>
</a>
<label class="md-nav__link " for="__nav_4" id="__nav_4_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4">
<span class="md-nav__icon md-icon"></span>
Use Cases
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../use_cases/use_case_1.html" class="md-nav__link">
<span class="md-ellipsis">
Use Case 1
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../use_cases/use_case_2.html" class="md-nav__link">
<span class="md-ellipsis">
Use Case 2
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../use_cases/use_case_3.html" class="md-nav__link">
<span class="md-ellipsis">
Use Case 3
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../use_cases/use_case_4.html" class="md-nav__link">
<span class="md-ellipsis">
Use Case 4
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../use_cases/use_case_5.html" class="md-nav__link">
<span class="md-ellipsis">
Use Case 5
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../use_cases/use_case_6.html" class="md-nav__link">
<span class="md-ellipsis">
Use Case 6
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >
<label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
<span class="md-ellipsis">
Components
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5">
<span class="md-nav__icon md-icon"></span>
Components
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../components/controller.html" class="md-nav__link">
<span class="md-ellipsis">
Controller
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../components/host.html" class="md-nav__link">
<span class="md-ellipsis">
Host
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../components/gatt.html" class="md-nav__link">
<span class="md-ellipsis">
GATT
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../components/security_manager.html" class="md-nav__link">
<span class="md-ellipsis">
Security Manager
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" >
<div class="md-nav__link md-nav__container">
<a href="../transports/index.html" class="md-nav__link ">
<span class="md-ellipsis">
Transports
</span>
</a>
<label class="md-nav__link " for="__nav_6" id="__nav_6_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_6">
<span class="md-nav__icon md-icon"></span>
Transports
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../transports/serial.html" class="md-nav__link">
<span class="md-ellipsis">
Serial
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../transports/usb.html" class="md-nav__link">
<span class="md-ellipsis">
USB
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../transports/pty.html" class="md-nav__link">
<span class="md-ellipsis">
PTY
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../transports/udp.html" class="md-nav__link">
<span class="md-ellipsis">
UDP
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../transports/tcp_client.html" class="md-nav__link">
<span class="md-ellipsis">
TCP Client
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../transports/tcp_server.html" class="md-nav__link">
<span class="md-ellipsis">
TCP Server
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../transports/ws_client.html" class="md-nav__link">
<span class="md-ellipsis">
WebSocket Client
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../transports/ws_server.html" class="md-nav__link">
<span class="md-ellipsis">
WebSocket Server
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../transports/vhci.html" class="md-nav__link">
<span class="md-ellipsis">
VHCI
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../transports/hci_socket.html" class="md-nav__link">
<span class="md-ellipsis">
HCI Socket
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../transports/android_emulator.html" class="md-nav__link">
<span class="md-ellipsis">
Android Emulator
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../transports/file.html" class="md-nav__link">
<span class="md-ellipsis">
File
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_7" >
<div class="md-nav__link md-nav__container">
<a href="../drivers/index.html" class="md-nav__link ">
<span class="md-ellipsis">
Drivers
</span>
</a>
<label class="md-nav__link " for="__nav_7" id="__nav_7_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_7">
<span class="md-nav__icon md-icon"></span>
Drivers
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../drivers/realtek.html" class="md-nav__link">
<span class="md-ellipsis">
Realtek
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../drivers/intel.html" class="md-nav__link">
<span class="md-ellipsis">
Intel
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8" >
<label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex="0">
<span class="md-ellipsis">
API
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_8_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_8">
<span class="md-nav__icon md-icon"></span>
API
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../api/guide.html" class="md-nav__link">
<span class="md-ellipsis">
Guide
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../api/examples.html" class="md-nav__link">
<span class="md-ellipsis">
Examples
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../api/reference.html" class="md-nav__link">
<span class="md-ellipsis">
Reference
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_9" checked>
<div class="md-nav__link md-nav__container">
<a href="index.html" class="md-nav__link ">
<span class="md-ellipsis">
Apps & Tools
</span>
</a>
<label class="md-nav__link " for="__nav_9" id="__nav_9_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_9_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_9">
<span class="md-nav__icon md-icon"></span>
Apps & Tools
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="auracast.html" class="md-nav__link">
<span class="md-ellipsis">
Auracast
</span>
</a>
</li>
<li class="md-nav__item">
<a href="console.html" class="md-nav__link">
<span class="md-ellipsis">
Console
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<a href="bench.html" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
Bench
</span>
</a>
</li>
<li class="md-nav__item">
<a href="speaker.html" class="md-nav__link">
<span class="md-ellipsis">
Speaker
</span>
</a>
</li>
<li class="md-nav__item">
<a href="hci_bridge.html" class="md-nav__link">
<span class="md-ellipsis">
HCI Bridge
</span>
</a>
</li>
<li class="md-nav__item">
<a href="gg_bridge.html" class="md-nav__link">
<span class="md-ellipsis">
Golden Gate Bridge
</span>
</a>
</li>
<li class="md-nav__item">
<a href="show.html" class="md-nav__link">
<span class="md-ellipsis">
Show
</span>
</a>
</li>
<li class="md-nav__item">
<a href="gatt_dump.html" class="md-nav__link">
<span class="md-ellipsis">
GATT Dump
</span>
</a>
</li>
<li class="md-nav__item">
<a href="pair.html" class="md-nav__link">
<span class="md-ellipsis">
Pair
</span>
</a>
</li>
<li class="md-nav__item">
<a href="unbond.html" class="md-nav__link">
<span class="md-ellipsis">
Unbond
</span>
</a>
</li>
<li class="md-nav__item">
<a href="usb_probe.html" class="md-nav__link">
<span class="md-ellipsis">
USB Probe
</span>
</a>
</li>
<li class="md-nav__item">
<a href="link_relay.html" class="md-nav__link">
<span class="md-ellipsis">
Link Relay
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_10" >
<div class="md-nav__link md-nav__container">
<a href="../hardware/index.html" class="md-nav__link ">
<span class="md-ellipsis">
Hardware
</span>
</a>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_10_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_10">
<span class="md-nav__icon md-icon"></span>
Hardware
</label>
<ul class="md-nav__list" data-md-scrollfix>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_11" >
<div class="md-nav__link md-nav__container">
<a href="../platforms/index.html" class="md-nav__link ">
<span class="md-ellipsis">
Platforms
</span>
</a>
<label class="md-nav__link " for="__nav_11" id="__nav_11_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_11_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_11">
<span class="md-nav__icon md-icon"></span>
Platforms
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../platforms/macos.html" class="md-nav__link">
<span class="md-ellipsis">
macOS
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../platforms/linux.html" class="md-nav__link">
<span class="md-ellipsis">
Linux
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../platforms/windows.html" class="md-nav__link">
<span class="md-ellipsis">
Windows
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../platforms/android.html" class="md-nav__link">
<span class="md-ellipsis">
Android
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../platforms/zephyr.html" class="md-nav__link">
<span class="md-ellipsis">
Zephyr
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_12" >
<div class="md-nav__link md-nav__container">
<a href="../examples/index.html" class="md-nav__link ">
<span class="md-ellipsis">
Examples
</span>
</a>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_12_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_12">
<span class="md-nav__icon md-icon"></span>
Examples
</label>
<ul class="md-nav__list" data-md-scrollfix>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_13" >
<div class="md-nav__link md-nav__container">
<a href="../extras/index.html" class="md-nav__link ">
<span class="md-ellipsis">
Extras
</span>
</a>
<label class="md-nav__link " for="__nav_13" id="__nav_13_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_13_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_13">
<span class="md-nav__icon md-icon"></span>
Extras
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../extras/android_remote_hci.html" class="md-nav__link">
<span class="md-ellipsis">
Android Remote HCI
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../extras/android_bt_bench.html" class="md-nav__link">
<span class="md-ellipsis">
Android BT Bench
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_14" >
<div class="md-nav__link md-nav__container">
<a href="../hive/index.html" class="md-nav__link ">
<span class="md-ellipsis">
Hive
</span>
</a>
<label class="md-nav__link " for="__nav_14" id="__nav_14_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_14_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_14">
<span class="md-nav__icon md-icon"></span>
Hive
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../hive/web/speaker/speaker.html" class="md-nav__link">
<span class="md-ellipsis">
Speaker
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../hive/web/scanner/scanner.html" class="md-nav__link">
<span class="md-ellipsis">
Scanner
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../hive/web/heart_rate_monitor/heart_rate_monitor.html" class="md-nav__link">
<span class="md-ellipsis">
Heart Rate Monitor
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1 id="bench-tool">BENCH TOOL<a class="headerlink" href="#bench-tool" title="Permanent link">&para;</a></h1>
<p>The "bench" tool implements a number of different ways of measuring the
throughput and/or latency between two devices.</p>
<h1 id="general-usage">General Usage<a class="headerlink" href="#general-usage" title="Permanent link">&para;</a></h1>
<div class="highlight"><pre><span></span><code>Usage: bumble-bench [OPTIONS] COMMAND [ARGS]...
Options:
--device-config FILENAME Device configuration file
--scenario [send|receive|ping|pong]
--mode [gatt-client|gatt-server|l2cap-client|l2cap-server|rfcomm-client|rfcomm-server]
--att-mtu MTU GATT MTU (gatt-client mode) [23&lt;=x&lt;=517]
--extended-data-length TEXT Request a data length upon connection,
specified as tx_octets/tx_time
--role-switch [central|peripheral]
Request role switch upon connection (central
or peripheral)
--rfcomm-channel INTEGER RFComm channel to use (specify 0 for channel
discovery via SDP)
--rfcomm-uuid TEXT RFComm service UUID to use (ignored if
--rfcomm-channel is not 0)
--rfcomm-l2cap-mtu INTEGER RFComm L2CAP MTU
--rfcomm-max-frame-size INTEGER
RFComm maximum frame size
--rfcomm-initial-credits INTEGER
RFComm initial credits
--rfcomm-max-credits INTEGER RFComm max credits
--rfcomm-credits-threshold INTEGER
RFComm credits threshold
--l2cap-psm INTEGER L2CAP PSM to use
--l2cap-mtu INTEGER L2CAP MTU to use
--l2cap-mps INTEGER L2CAP MPS to use
--l2cap-max-credits INTEGER L2CAP maximum number of credits allowed for
the peer
-s, --packet-size SIZE Packet size (send or ping scenario)
[8&lt;=x&lt;=8192]
-c, --packet-count COUNT Packet count (send or ping scenario)
-sd, --start-delay SECONDS Start delay (send or ping scenario)
--repeat N Repeat the run N times (send and ping
scenario)(0, which is the fault, to run just
once)
--repeat-delay SECONDS Delay, in seconds, between repeats
--pace MILLISECONDS Wait N milliseconds between packets (0,
which is the fault, to send as fast as
possible)
--linger Don&#39;t exit at the end of a run (receive and
pong scenarios)
--help Show this message and exit.
Commands:
central Run as a central (initiates the connection)
peripheral Run as a peripheral (waits for a connection)
</code></pre></div>
<h2 id="options-for-the-central-command">Options for the <code>central</code> Command<a class="headerlink" href="#options-for-the-central-command" title="Permanent link">&para;</a></h2>
<div class="highlight"><pre><span></span><code>Usage: bumble-bench central [OPTIONS] TRANSPORT
Run as a central (initiates the connection)
Options:
--peripheral ADDRESS_OR_NAME Address or name to connect to
--connection-interval, --ci CONNECTION_INTERVAL
Connection interval (in ms)
--phy [1m|2m|coded] PHY to use
--authenticate Authenticate (RFComm only)
--encrypt Encrypt the connection (RFComm only)
--help Show this message and exit.
</code></pre></div>
<p>To test once device against another, one of the two devices must be running
the <code>peripheral</code> command and the other the <code>central</code> command. The device
running the <code>peripheral</code> command will accept connections from the device
running the <code>central</code> command.
When using Bluetooth LE (all modes except for <code>rfcomm-server</code> and <code>rfcomm-client</code>utils),
the default addresses configured in the tool should be sufficient. But when using
Bluetooth Classic, the address of the Peripheral must be specified on the Central
using the <code>--peripheral</code> option. The address will be printed by the Peripheral when
it starts.</p>
<p>Independently of whether the device is the Central or Peripheral, each device selects a
<code>mode</code> and and <code>scenario</code> to run as. The <code>mode</code> and <code>scenario</code> of the Central and Peripheral
must be compatible.</p>
<table>
<thead>
<tr>
<th>Device 1 scenario</th>
<th>Device 2 scenario</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>gatt-client</code></td>
<td><code>gatt-server</code></td>
</tr>
<tr>
<td><code>l2cap-client</code></td>
<td><code>l2cap-server</code></td>
</tr>
<tr>
<td><code>rfcomm-client</code></td>
<td><code>rfcomm-server</code></td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Device 1 scenario</th>
<th>Device 2 scenario</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>send</code></td>
<td><code>receive</code></td>
</tr>
<tr>
<td><code>ping</code></td>
<td><code>pong</code></td>
</tr>
</tbody>
</table>
<h1 id="examples">Examples<a class="headerlink" href="#examples" title="Permanent link">&para;</a></h1>
<p>In the following examples, we have two USB Bluetooth controllers, one on <code>usb:0</code> and
the other on <code>usb:1</code>, and two consoles/terminals. We will run a command in each.</p>
<div class="admonition example">
<p class="admonition-title">GATT Throughput</p>
<p>Using the default mode and scenario for the Central and Peripheral.</p>
<p>In the first console/terminal:
<div class="highlight"><pre><span></span><code>$ bumble-bench peripheral usb:0
</code></pre></div></p>
<p>In the second console/terminal:
<div class="highlight"><pre><span></span><code>$ bumble-bench central usb:1
</code></pre></div></p>
<p>In this default configuration, the Central runs a Sender, as a GATT client,
connecting to the Peripheral running a Receiver, as a GATT server.</p>
</div>
<div class="admonition example">
<p class="admonition-title">L2CAP Throughput</p>
<p>In the first console/terminal:
<div class="highlight"><pre><span></span><code>$ bumble-bench --mode l2cap-server peripheral usb:0
</code></pre></div></p>
<p>In the second console/terminal:
<div class="highlight"><pre><span></span><code>$ bumble-bench --mode l2cap-client central usb:1
</code></pre></div></p>
</div>
<div class="admonition example">
<p class="admonition-title">RFComm Throughput</p>
<p>In the first console/terminal:
<div class="highlight"><pre><span></span><code>$ bumble-bench --mode rfcomm-server peripheral usb:0
</code></pre></div></p>
<p>NOTE: the BT address of the Peripheral will be printed out, use it with the
<code>--peripheral</code> option for the Central.</p>
<p>In this example, we use a larger packet size and packet count than the default.</p>
<p>In the second console/terminal:
<div class="highlight"><pre><span></span><code>$ bumble-bench --mode rfcomm-client --packet-size 2000 --packet-count 100 central --peripheral 00:16:A4:5A:40:F2 usb:1
</code></pre></div></p>
</div>
<div class="admonition example">
<p class="admonition-title">Ping/Pong Latency</p>
<p>In the first console/terminal:
<div class="highlight"><pre><span></span><code>$ bumble-bench --scenario pong peripheral usb:0
</code></pre></div></p>
<p>In the second console/terminal:
<div class="highlight"><pre><span></span><code>$ bumble-bench --scenario ping central usb:1
</code></pre></div></p>
</div>
<div class="admonition example">
<p class="admonition-title">Reversed modes with GATT and custom connection interval</p>
<p>In the first console/terminal:
<div class="highlight"><pre><span></span><code>$ bumble-bench --mode gatt-client peripheral usb:0
</code></pre></div></p>
<p>In the second console/terminal:
<div class="highlight"><pre><span></span><code>$ bumble-bench --mode gatt-server central --ci 10 usb:1
</code></pre></div></p>
</div>
<div class="admonition example">
<p class="admonition-title">Reversed modes with L2CAP and custom PHY</p>
<p>In the first console/terminal:
<div class="highlight"><pre><span></span><code>$ bumble-bench --mode l2cap-client peripheral usb:0
</code></pre></div></p>
<p>In the second console/terminal:
<div class="highlight"><pre><span></span><code>$ bumble-bench --mode l2cap-server central --phy 2m usb:1
</code></pre></div></p>
</div>
<div class="admonition example">
<p class="admonition-title">Reversed scenarios with L2CAP</p>
<p>In the first console/terminal:
<div class="highlight"><pre><span></span><code>$ bumble-bench --mode l2cap-client --scenario send peripheral usb:0
</code></pre></div></p>
<p>In the second console/terminal:
<div class="highlight"><pre><span></span><code>$ bumble-bench --mode l2cap-server --scenario receive central usb:1
</code></pre></div></p>
</div>
</article>
</div>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
<a href="console.html" title="Console" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Previous
</span>
Console
</span>
</div>
</a>
<a href="speaker.html" title="Speaker" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Next
</span>
Speaker
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
</div>
</a>
</nav>
</div>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
Copyright 2021-2023 Google LLC
</div>
</div>
<div class="md-social">
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "..", "features": ["navigation.indexes"], "search": "../assets/javascripts/workers/search.f8cc74c7.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
<script src="../assets/javascripts/bundle.5090c770.min.js"></script>
</body>
</html>