mirror of
https://github.com/google/bumble.git
synced 2026-04-18 00:45:32 +00:00
1514 lines
36 KiB
HTML
1514 lines
36 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="icon" href="../images/favicon.ico">
|
|
<meta name="generator" content="mkdocs-1.3.1, mkdocs-material-8.4.0">
|
|
|
|
|
|
|
|
<title>Android - Bumble</title>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../assets/stylesheets/main.69437709.min.css">
|
|
|
|
|
|
<link rel="stylesheet" href="../assets/stylesheets/palette.cbb835fc.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" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none">
|
|
|
|
|
|
|
|
<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="#android-platform" class="md-skip">
|
|
Skip to content
|
|
</a>
|
|
|
|
</div>
|
|
<div data-md-component="announce">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<header class="md-header" 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 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></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">
|
|
|
|
Android
|
|
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<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.1.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 2022 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.81z"/></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.1.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 2022 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.81z"/></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">
|
|
Introduction
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../getting_started.html" class="md-nav__link">
|
|
Getting Started
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" >
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_3">
|
|
Development
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" aria-label="Development" data-md-level="1">
|
|
<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">
|
|
Python Environments
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../development/contributing.html" class="md-nav__link">
|
|
Contributing
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../development/code_style.html" class="md-nav__link">
|
|
Code Style
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" >
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_4">
|
|
Use Cases
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" aria-label="Use Cases" data-md-level="1">
|
|
<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/index.html" class="md-nav__link">
|
|
Overview
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../use_cases/use_case_1.html" class="md-nav__link">
|
|
Use Case 1
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../use_cases/use_case_2.html" class="md-nav__link">
|
|
Use Case 2
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../use_cases/use_case_3.html" class="md-nav__link">
|
|
Use Case 3
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../use_cases/use_case_4.html" class="md-nav__link">
|
|
Use Case 4
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../use_cases/use_case_5.html" class="md-nav__link">
|
|
Use Case 5
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../use_cases/use_case_6.html" class="md-nav__link">
|
|
Use Case 6
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" >
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5">
|
|
Components
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" aria-label="Components" data-md-level="1">
|
|
<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">
|
|
Controller
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../components/host.html" class="md-nav__link">
|
|
Host
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../components/gatt.html" class="md-nav__link">
|
|
GATT
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../components/security_manager.html" class="md-nav__link">
|
|
Security Manager
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" >
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_6">
|
|
Transports
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" aria-label="Transports" data-md-level="1">
|
|
<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/index.html" class="md-nav__link">
|
|
Overview
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../transports/serial.html" class="md-nav__link">
|
|
Serial
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../transports/usb.html" class="md-nav__link">
|
|
USB
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../transports/pty.html" class="md-nav__link">
|
|
PTY
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../transports/udp.html" class="md-nav__link">
|
|
UDP
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../transports/tcp_client.html" class="md-nav__link">
|
|
TCP Client
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../transports/tcp_server.html" class="md-nav__link">
|
|
TCP Server
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../transports/ws_client.html" class="md-nav__link">
|
|
WebSocket Client
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../transports/ws_server.html" class="md-nav__link">
|
|
WebSocket Server
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../transports/vhci.html" class="md-nav__link">
|
|
VHCI
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../transports/hci_socket.html" class="md-nav__link">
|
|
HCI Socket
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../transports/android_emulator.html" class="md-nav__link">
|
|
Android Emulator
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../transports/file.html" class="md-nav__link">
|
|
File
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" >
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_7">
|
|
API
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" aria-label="API" data-md-level="1">
|
|
<label class="md-nav__title" for="__nav_7">
|
|
<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">
|
|
Guide
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../api/examples.html" class="md-nav__link">
|
|
Examples
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../api/reference.html" class="md-nav__link">
|
|
Reference
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" >
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_8">
|
|
Apps & Tools
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" aria-label="Apps & Tools" data-md-level="1">
|
|
<label class="md-nav__title" for="__nav_8">
|
|
<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="../apps_and_tools/index.html" class="md-nav__link">
|
|
Overview
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../apps_and_tools/console.html" class="md-nav__link">
|
|
Console
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../apps_and_tools/bench.html" class="md-nav__link">
|
|
Bench
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../apps_and_tools/hci_bridge.html" class="md-nav__link">
|
|
HCI Bridge
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../apps_and_tools/gg_bridge.html" class="md-nav__link">
|
|
Golden Gate Bridge
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../apps_and_tools/show.html" class="md-nav__link">
|
|
Show
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../apps_and_tools/gatt_dump.html" class="md-nav__link">
|
|
GATT Dump
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../apps_and_tools/pair.html" class="md-nav__link">
|
|
Pair
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../apps_and_tools/unbond.html" class="md-nav__link">
|
|
Unbond
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../apps_and_tools/usb_probe.html" class="md-nav__link">
|
|
USB Probe
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../apps_and_tools/link_relay.html" class="md-nav__link">
|
|
Link Relay
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" >
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_9">
|
|
Hardware
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" aria-label="Hardware" data-md-level="1">
|
|
<label class="md-nav__title" for="__nav_9">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Hardware
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../hardware/index.html" class="md-nav__link">
|
|
Overview
|
|
</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" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" checked>
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_10">
|
|
Platforms
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" aria-label="Platforms" data-md-level="1">
|
|
<label class="md-nav__title" for="__nav_10">
|
|
<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="index.html" class="md-nav__link">
|
|
Overview
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="macos.html" class="md-nav__link">
|
|
macOS
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="linux.html" class="md-nav__link">
|
|
Linux
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="windows.html" class="md-nav__link">
|
|
Windows
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--active">
|
|
|
|
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
|
|
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__link md-nav__link--active" for="__toc">
|
|
Android
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<a href="android.html" class="md-nav__link md-nav__link--active">
|
|
Android
|
|
</a>
|
|
|
|
|
|
|
|
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__title" for="__toc">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Table of contents
|
|
</label>
|
|
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#launching-the-emulator" class="md-nav__link">
|
|
Launching the Emulator
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#connecting-to-netsim" class="md-nav__link">
|
|
Connecting to Netsim
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Connecting to Netsim">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#multiple-instances" class="md-nav__link">
|
|
Multiple Instances
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#connecting-a-custom-virtual-controller" class="md-nav__link">
|
|
Connecting a Custom Virtual Controller
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#other-tools" class="md-nav__link">
|
|
Other Tools
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_11" type="checkbox" id="__nav_11" >
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_11">
|
|
Examples
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" aria-label="Examples" data-md-level="1">
|
|
<label class="md-nav__title" for="__nav_11">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Examples
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../examples/index.html" class="md-nav__link">
|
|
Overview
|
|
</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">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__title" for="__toc">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Table of contents
|
|
</label>
|
|
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#launching-the-emulator" class="md-nav__link">
|
|
Launching the Emulator
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#connecting-to-netsim" class="md-nav__link">
|
|
Connecting to Netsim
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Connecting to Netsim">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#multiple-instances" class="md-nav__link">
|
|
Multiple Instances
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#connecting-a-custom-virtual-controller" class="md-nav__link">
|
|
Connecting a Custom Virtual Controller
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#other-tools" class="md-nav__link">
|
|
Other Tools
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="md-content" data-md-component="content">
|
|
<article class="md-content__inner md-typeset">
|
|
|
|
|
|
|
|
|
|
<h1 id="android-platform"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.61 15.15c-.46 0-.84-.37-.84-.83s.38-.82.84-.82c.46 0 .84.36.84.82 0 .46-.38.83-.84.83m-9.2 0c-.46 0-.84-.37-.84-.83 0-.46.38-.82.84-.82.46 0 .83.36.83.82 0 .46-.37.83-.83.83m9.5-5.01 1.67-2.88c.09-.17.03-.38-.13-.47-.17-.1-.38-.04-.45.13l-1.71 2.91A10.15 10.15 0 0 0 12 8.91c-1.53 0-3 .33-4.27.91L6.04 6.91a.334.334 0 0 0-.47-.13c-.17.09-.22.3-.13.47l1.66 2.88C4.25 11.69 2.29 14.58 2 18h20c-.28-3.41-2.23-6.3-5.09-7.86Z"/></svg></span> ANDROID PLATFORM<a class="headerlink" href="#android-platform" title="Permanent link">¶</a></h1>
|
|
<p>Using Bumble with Android is not about running the Bumble stack on the Android
|
|
OS itself, but rather using Bumble with the Bluetooth support of the Android
|
|
emulator.</p>
|
|
<p>The two main use cases are:</p>
|
|
<ul>
|
|
<li>Connecting the Bumble host stack to the Android emulator's virtual controller.</li>
|
|
<li>Using Bumble as an HCI bridge to connect the Android emulator to a physical
|
|
Bluetooth controller, such as a USB dongle, or other HCI transport.</li>
|
|
</ul>
|
|
<div class="admonition warning">
|
|
<p class="admonition-title">Warning</p>
|
|
<p>Bluetooth support in the Android emulator is a recent feature that may still
|
|
be evolving. The information contained here be somewhat out of sync with the
|
|
version of the emulator you are using.
|
|
You will need version 33.1.4.0 or later.</p>
|
|
</div>
|
|
<p>The Android emulator supports Bluetooth in two ways: either by exposing virtual
|
|
Bluetooth controllers to which you can connect a virtual Bluetooth host stack, or
|
|
by exposing a way to connect your own virtual controller to the Android Bluetooth
|
|
stack via a virtual HCI interface.
|
|
Both ways are controlled via gRPC requests to the Android emulator controller and/or
|
|
from the Android emulator.</p>
|
|
<h2 id="launching-the-emulator">Launching the Emulator<a class="headerlink" href="#launching-the-emulator" title="Permanent link">¶</a></h2>
|
|
<p>If the version of the emulator you are running does not yet support enabling
|
|
Bluetooth support by default or automatically, you must launch the emulator from
|
|
the command line.</p>
|
|
<div class="admonition tip">
|
|
<p class="admonition-title">Tip</p>
|
|
<p>For details on how to launch the Android emulator from the command line,
|
|
visit <a href="https://developer.android.com/studio/run/emulator-commandline">this Android Studio user guide page</a></p>
|
|
</div>
|
|
<p>The <code>-packet-streamer-endpoint <endpoint></code> command line option may be used to enable
|
|
Bluetooth emulation and tell the emulator which virtual controller to connect to. </p>
|
|
<h2 id="connecting-to-netsim">Connecting to Netsim<a class="headerlink" href="#connecting-to-netsim" title="Permanent link">¶</a></h2>
|
|
<p>If the emulator doesn't have Bluetooth emulation enabled by default, use the
|
|
<code>-packet-streamer-endpoint default</code> option to tell it to connect to Netsim.
|
|
If Netsim is not running, the emulator will start it automatically.</p>
|
|
<p>The Android emulator's virtual Bluetooth controller is called <strong>Netsim</strong>.
|
|
Netsim runs as a background process and allows multiple clients to connect to it,
|
|
each connecting to its own virtual controller instance hosted by Netsim. All the
|
|
clients connected to the same Netsim process can then "talk" to each other over a
|
|
virtual radio link layer.
|
|
Netsim supports other wireless protocols than Bluetooth, but the relevant part here
|
|
is Bluetooth. The virtual Bluetooth controller used by Netsim is sometimes referred to
|
|
as <strong>Root Canal</strong>.</p>
|
|
<p>Configuring a Bumble Device instance to use netsim as a virtual controller
|
|
allows that virtual device to communicate with the Android Bluetooth stack, and
|
|
through it with Android applications as well as system-managed profiles.
|
|
To connect a Bumble host stack to a netsim virtual controller instance, use
|
|
the Bumble <code>android-netsim</code> transport in <code>host</code> mode (the default).</p>
|
|
<div class="admonition example">
|
|
<p class="admonition-title">Run the example GATT server connected to the emulator via Netsim</p>
|
|
<div class="highlight"><pre><span></span><code>$ python run_gatt_server.py device1.json android-netsim
|
|
</code></pre></div>
|
|
</div>
|
|
<p>By default, the Bumble <code>android-netsim</code> transport will try to automatically discover
|
|
the port number on which the netsim process is exposing its gRPC server interface. If
|
|
that discovery process fails, or if you want to specify the interface manually, you
|
|
can pass a <code>hostname</code> and <code>port</code> as parameters to the transport, as: <code>android-netsim:<host>:<port></code>.</p>
|
|
<div class="admonition example">
|
|
<p class="admonition-title">Run the example GATT server connected to the emulator via Netsim on a localhost, port 8877</p>
|
|
<div class="highlight"><pre><span></span><code>$ python run_gatt_server.py device1.json android-netsim:localhost:8877
|
|
</code></pre></div>
|
|
</div>
|
|
<h3 id="multiple-instances">Multiple Instances<a class="headerlink" href="#multiple-instances" title="Permanent link">¶</a></h3>
|
|
<p>If you want to connect multiple Bumble devices to netsim, it may be useful to give each one
|
|
a netsim controller with a specific name. This can be done using the <code>name=<name></code> transport option.
|
|
For example: <code>android-netsim:localhost:8877,name=bumble1</code></p>
|
|
<h2 id="connecting-a-custom-virtual-controller">Connecting a Custom Virtual Controller<a class="headerlink" href="#connecting-a-custom-virtual-controller" title="Permanent link">¶</a></h2>
|
|
<p>This is an advanced use case, which may not be officially supported, but should work in recent
|
|
versions of the emulator.</p>
|
|
<p>The first step is to run the Bumble HCI bridge, specifying netsim as the "host" end of the
|
|
bridge, and another controller (typically a USB Bluetooth dongle, but any other supported
|
|
transport can work as well) as the "controller" end of the bridge.</p>
|
|
<p>To connect a virtual controller to the Android Bluetooth stack, use the bumble <code>android-netsim</code> transport in <code>controller</code> mode. For example, with port number 8877, the transport name would be: <code>android-netsim:_:8877,mode=controller</code>.</p>
|
|
<div class="admonition example">
|
|
<p class="admonition-title">Connect the Android emulator to the first USB Bluetooth dongle, using the <code>hci_bridge</code> application</p>
|
|
<div class="highlight"><pre><span></span><code>$ bumble-hci-bridge android-netsim:_:8877,mode<span class="o">=</span>controller usb:0
|
|
</code></pre></div>
|
|
</div>
|
|
<p>Then, you can start the emulator and tell it to connect to this bridge, instead of netsim.
|
|
You will likely need to start the emulator from the command line, in order to specify the <code>-packet-streamer-endpoint <hostname>:<port></code> option (unless the emulator offers a way to control that feature from a user/ui menu).</p>
|
|
<div class="admonition example">
|
|
<p class="admonition-title">Launch the emulator with a netsim replacement</p>
|
|
<p>In this example, we launch an emulator AVD named "Tiramisu", with a Bumble HCI bridge running
|
|
on port 8877.
|
|
<div class="highlight"><pre><span></span><code>$ emulator -packet-streamer-endpoint localhost:8877 -avd Tiramisu
|
|
</code></pre></div></p>
|
|
</div>
|
|
<div class="admonition tip">
|
|
<p class="admonition-title">Tip</p>
|
|
<p>Attaching a virtual controller while the Android Bluetooth stack is running may not be well supported. So you may need to disable Bluetooth in your running Android guest
|
|
before attaching the virtual controller, then re-enable it once attached.</p>
|
|
</div>
|
|
<h2 id="other-tools">Other Tools<a class="headerlink" href="#other-tools" title="Permanent link">¶</a></h2>
|
|
<p>The <code>show</code> application that's included with Bumble can be used to parse and pretty-print the HCI packets
|
|
from an Android HCI "snoop log" (see <a href="https://source.android.com/devices/bluetooth/verifying_debugging">this page</a>
|
|
for details on how to obtain HCI snoop logs from an Android device).
|
|
Use the <code>--format snoop</code> option to specify that the file is in that specific format.</p>
|
|
<div class="admonition example">
|
|
<p class="admonition-title">Analyze an Android HCI snoop log file</p>
|
|
<div class="highlight"><pre><span></span><code>$ bumble-show --format snoop btsnoop_hci.log
|
|
</code></pre></div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</main>
|
|
|
|
|
|
<footer class="md-footer">
|
|
|
|
<div class="md-footer-nav">
|
|
<nav class="md-footer-nav__inner md-grid">
|
|
|
|
<a href="windows.html" title="Windows" 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>
|
|
Windows
|
|
</span>
|
|
</div>
|
|
</a>
|
|
|
|
|
|
<a href="../examples/index.html" title="Overview" 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>
|
|
Overview
|
|
</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": [], "search": "../assets/javascripts/workers/search.ecf98df9.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "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.title": "Select version"}}</script>
|
|
|
|
|
|
<script src="../assets/javascripts/bundle.9c69f0bc.min.js"></script>
|
|
|
|
|
|
</body>
|
|
</html> |