bumble 0.0.212__py3-none-any.whl → 0.0.213__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bumble/_version.py +2 -2
- bumble/a2dp.py +6 -0
- bumble/apps/README.md +0 -3
- bumble/apps/auracast.py +11 -9
- bumble/apps/bench.py +480 -31
- bumble/apps/console.py +3 -3
- bumble/apps/controller_info.py +47 -10
- bumble/apps/controller_loopback.py +7 -3
- bumble/apps/controllers.py +2 -2
- bumble/apps/device_info.py +2 -2
- bumble/apps/gatt_dump.py +2 -2
- bumble/apps/gg_bridge.py +2 -2
- bumble/apps/hci_bridge.py +2 -2
- bumble/apps/l2cap_bridge.py +2 -2
- bumble/apps/lea_unicast/app.py +6 -1
- bumble/apps/pair.py +19 -11
- bumble/apps/pandora_server.py +2 -2
- bumble/apps/rfcomm_bridge.py +1 -1
- bumble/apps/scan.py +2 -2
- bumble/apps/show.py +4 -2
- bumble/apps/speaker/speaker.html +1 -0
- bumble/apps/speaker/speaker.js +113 -62
- bumble/apps/speaker/speaker.py +126 -18
- bumble/at.py +4 -4
- bumble/att.py +2 -6
- bumble/avc.py +7 -7
- bumble/avctp.py +3 -3
- bumble/avdtp.py +16 -20
- bumble/avrcp.py +41 -53
- bumble/colors.py +2 -2
- bumble/controller.py +84 -23
- bumble/device.py +348 -182
- bumble/drivers/__init__.py +2 -2
- bumble/drivers/common.py +0 -2
- bumble/drivers/intel.py +37 -40
- bumble/drivers/rtk.py +28 -35
- bumble/gatt.py +4 -4
- bumble/gatt_adapters.py +4 -5
- bumble/gatt_client.py +26 -31
- bumble/gatt_server.py +7 -11
- bumble/hci.py +2601 -2909
- bumble/helpers.py +4 -5
- bumble/hfp.py +32 -37
- bumble/host.py +94 -35
- bumble/keys.py +5 -5
- bumble/l2cap.py +310 -394
- bumble/link.py +6 -270
- bumble/pairing.py +23 -20
- bumble/pandora/__init__.py +1 -1
- bumble/pandora/config.py +2 -2
- bumble/pandora/device.py +6 -6
- bumble/pandora/host.py +27 -28
- bumble/pandora/l2cap.py +2 -2
- bumble/pandora/security.py +6 -6
- bumble/pandora/utils.py +3 -3
- bumble/profiles/ascs.py +132 -131
- bumble/profiles/asha.py +2 -2
- bumble/profiles/bap.py +3 -4
- bumble/profiles/csip.py +2 -2
- bumble/profiles/device_information_service.py +2 -2
- bumble/profiles/gap.py +2 -2
- bumble/profiles/hap.py +34 -33
- bumble/profiles/le_audio.py +4 -4
- bumble/profiles/mcp.py +4 -4
- bumble/profiles/vcs.py +3 -5
- bumble/rfcomm.py +10 -10
- bumble/rtp.py +1 -2
- bumble/sdp.py +2 -2
- bumble/smp.py +57 -61
- bumble/tools/rtk_util.py +2 -2
- bumble/transport/__init__.py +2 -16
- bumble/transport/android_netsim.py +5 -5
- bumble/transport/common.py +4 -4
- bumble/transport/pyusb.py +2 -2
- bumble/utils.py +2 -5
- bumble/vendor/android/hci.py +118 -200
- bumble/vendor/zephyr/hci.py +32 -27
- {bumble-0.0.212.dist-info → bumble-0.0.213.dist-info}/METADATA +2 -2
- {bumble-0.0.212.dist-info → bumble-0.0.213.dist-info}/RECORD +83 -86
- {bumble-0.0.212.dist-info → bumble-0.0.213.dist-info}/WHEEL +1 -1
- {bumble-0.0.212.dist-info → bumble-0.0.213.dist-info}/entry_points.txt +0 -1
- bumble/apps/link_relay/__init__.py +0 -0
- bumble/apps/link_relay/link_relay.py +0 -289
- bumble/apps/link_relay/logging.yml +0 -21
- {bumble-0.0.212.dist-info → bumble-0.0.213.dist-info}/licenses/LICENSE +0 -0
- {bumble-0.0.212.dist-info → bumble-0.0.213.dist-info}/top_level.txt +0 -0
bumble/apps/console.py
CHANGED
|
@@ -55,7 +55,7 @@ from prompt_toolkit.layout import (
|
|
|
55
55
|
from bumble import __version__
|
|
56
56
|
import bumble.core
|
|
57
57
|
from bumble import colors
|
|
58
|
-
from bumble.core import UUID, AdvertisingData
|
|
58
|
+
from bumble.core import UUID, AdvertisingData
|
|
59
59
|
from bumble.device import (
|
|
60
60
|
ConnectionParametersPreferences,
|
|
61
61
|
ConnectionPHY,
|
|
@@ -64,7 +64,7 @@ from bumble.device import (
|
|
|
64
64
|
Peer,
|
|
65
65
|
)
|
|
66
66
|
from bumble.utils import AsyncRunner
|
|
67
|
-
from bumble.transport import
|
|
67
|
+
from bumble.transport import open_transport
|
|
68
68
|
from bumble.gatt import Characteristic, Service, CharacteristicDeclaration, Descriptor
|
|
69
69
|
from bumble.gatt_client import CharacteristicProxy
|
|
70
70
|
from bumble.hci import (
|
|
@@ -291,7 +291,7 @@ class ConsoleApp:
|
|
|
291
291
|
async def run_async(self, device_config, transport):
|
|
292
292
|
rssi_monitoring_task = asyncio.create_task(self.rssi_monitor_loop())
|
|
293
293
|
|
|
294
|
-
async with await
|
|
294
|
+
async with await open_transport(transport) as (hci_source, hci_sink):
|
|
295
295
|
if device_config:
|
|
296
296
|
self.device = Device.from_config_file_with_hci(
|
|
297
297
|
device_config, hci_source, hci_sink
|
bumble/apps/controller_info.py
CHANGED
|
@@ -58,7 +58,7 @@ from bumble.hci import (
|
|
|
58
58
|
HCI_Read_Local_Version_Information_Command,
|
|
59
59
|
)
|
|
60
60
|
from bumble.host import Host
|
|
61
|
-
from bumble.transport import
|
|
61
|
+
from bumble.transport import open_transport
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
# -----------------------------------------------------------------------------
|
|
@@ -242,28 +242,43 @@ async def get_codecs_info(host: Host) -> None:
|
|
|
242
242
|
|
|
243
243
|
|
|
244
244
|
# -----------------------------------------------------------------------------
|
|
245
|
-
async def async_main(
|
|
245
|
+
async def async_main(
|
|
246
|
+
latency_probes, latency_probe_interval, latency_probe_command, transport
|
|
247
|
+
):
|
|
246
248
|
print('<<< connecting to HCI...')
|
|
247
|
-
async with await
|
|
249
|
+
async with await open_transport(transport) as (hci_source, hci_sink):
|
|
248
250
|
print('<<< connected')
|
|
249
251
|
|
|
250
252
|
host = Host(hci_source, hci_sink)
|
|
251
253
|
await host.reset()
|
|
252
254
|
|
|
253
255
|
# Measure the latency if requested
|
|
256
|
+
# (we add an extra probe at the start, that we ignore, just to ensure that
|
|
257
|
+
# the transport is primed)
|
|
254
258
|
latencies = []
|
|
255
259
|
if latency_probes:
|
|
256
|
-
|
|
260
|
+
if latency_probe_command:
|
|
261
|
+
probe_hci_command = HCI_Command.from_bytes(
|
|
262
|
+
bytes.fromhex(latency_probe_command)
|
|
263
|
+
)
|
|
264
|
+
else:
|
|
265
|
+
probe_hci_command = HCI_Read_Local_Version_Information_Command()
|
|
266
|
+
|
|
267
|
+
for iteration in range(1 + latency_probes):
|
|
268
|
+
if latency_probe_interval:
|
|
269
|
+
await asyncio.sleep(latency_probe_interval / 1000)
|
|
257
270
|
start = time.time()
|
|
258
|
-
await host.send_command(
|
|
259
|
-
|
|
271
|
+
await host.send_command(probe_hci_command)
|
|
272
|
+
if iteration:
|
|
273
|
+
latencies.append(1000 * (time.time() - start))
|
|
260
274
|
print(
|
|
261
275
|
color('HCI Command Latency:', 'yellow'),
|
|
262
276
|
(
|
|
263
277
|
f'min={min(latencies):.2f}, '
|
|
264
278
|
f'max={max(latencies):.2f}, '
|
|
265
|
-
f'average={sum(latencies)/len(latencies):.2f}'
|
|
279
|
+
f'average={sum(latencies)/len(latencies):.2f},'
|
|
266
280
|
),
|
|
281
|
+
[f'{latency:.4}' for latency in latencies],
|
|
267
282
|
'\n',
|
|
268
283
|
)
|
|
269
284
|
|
|
@@ -311,10 +326,32 @@ async def async_main(latency_probes, transport):
|
|
|
311
326
|
type=int,
|
|
312
327
|
help='Send N commands to measure HCI transport latency statistics',
|
|
313
328
|
)
|
|
329
|
+
@click.option(
|
|
330
|
+
'--latency-probe-interval',
|
|
331
|
+
metavar='INTERVAL',
|
|
332
|
+
type=int,
|
|
333
|
+
help='Interval between latency probes (milliseconds)',
|
|
334
|
+
)
|
|
335
|
+
@click.option(
|
|
336
|
+
'--latency-probe-command',
|
|
337
|
+
metavar='COMMAND_HEX',
|
|
338
|
+
help=(
|
|
339
|
+
'Probe command (HCI Command packet bytes, in hex. Use 0177FC00 for'
|
|
340
|
+
' a loopback test with the HCI remote proxy app)'
|
|
341
|
+
),
|
|
342
|
+
)
|
|
314
343
|
@click.argument('transport')
|
|
315
|
-
def main(latency_probes, transport):
|
|
316
|
-
logging.basicConfig(
|
|
317
|
-
|
|
344
|
+
def main(latency_probes, latency_probe_interval, latency_probe_command, transport):
|
|
345
|
+
logging.basicConfig(
|
|
346
|
+
level=os.environ.get('BUMBLE_LOGLEVEL', 'INFO').upper(),
|
|
347
|
+
format="[%(asctime)s.%(msecs)03d] %(levelname)s:%(name)s:%(message)s",
|
|
348
|
+
datefmt="%H:%M:%S",
|
|
349
|
+
)
|
|
350
|
+
asyncio.run(
|
|
351
|
+
async_main(
|
|
352
|
+
latency_probes, latency_probe_interval, latency_probe_command, transport
|
|
353
|
+
)
|
|
354
|
+
)
|
|
318
355
|
|
|
319
356
|
|
|
320
357
|
# -----------------------------------------------------------------------------
|
|
@@ -29,7 +29,7 @@ from bumble.hci import (
|
|
|
29
29
|
LoopbackMode,
|
|
30
30
|
)
|
|
31
31
|
from bumble.host import Host
|
|
32
|
-
from bumble.transport import
|
|
32
|
+
from bumble.transport import open_transport
|
|
33
33
|
import click
|
|
34
34
|
|
|
35
35
|
|
|
@@ -88,7 +88,7 @@ class Loopback:
|
|
|
88
88
|
async def run(self):
|
|
89
89
|
"""Run a loopback throughput test"""
|
|
90
90
|
print(color('>>> Connecting to HCI...', 'green'))
|
|
91
|
-
async with await
|
|
91
|
+
async with await open_transport(self.transport) as (
|
|
92
92
|
hci_source,
|
|
93
93
|
hci_sink,
|
|
94
94
|
):
|
|
@@ -194,7 +194,11 @@ class Loopback:
|
|
|
194
194
|
)
|
|
195
195
|
@click.argument('transport')
|
|
196
196
|
def main(packet_size, packet_count, transport):
|
|
197
|
-
logging.basicConfig(
|
|
197
|
+
logging.basicConfig(
|
|
198
|
+
level=os.environ.get('BUMBLE_LOGLEVEL', 'INFO').upper(),
|
|
199
|
+
format="[%(asctime)s.%(msecs)03d] %(levelname)s:%(name)s:%(message)s",
|
|
200
|
+
datefmt="%H:%M:%S",
|
|
201
|
+
)
|
|
198
202
|
|
|
199
203
|
loopback = Loopback(packet_size, packet_count, transport)
|
|
200
204
|
asyncio.run(loopback.run())
|
bumble/apps/controllers.py
CHANGED
|
@@ -22,7 +22,7 @@ import os
|
|
|
22
22
|
|
|
23
23
|
from bumble.controller import Controller
|
|
24
24
|
from bumble.link import LocalLink
|
|
25
|
-
from bumble.transport import
|
|
25
|
+
from bumble.transport import open_transport
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
# -----------------------------------------------------------------------------
|
|
@@ -42,7 +42,7 @@ async def async_main():
|
|
|
42
42
|
transports = []
|
|
43
43
|
controllers = []
|
|
44
44
|
for index, transport_name in enumerate(sys.argv[1:]):
|
|
45
|
-
transport = await
|
|
45
|
+
transport = await open_transport(transport_name)
|
|
46
46
|
transports.append(transport)
|
|
47
47
|
controller = Controller(
|
|
48
48
|
f'C{index}',
|
bumble/apps/device_info.py
CHANGED
|
@@ -32,7 +32,7 @@ from bumble.profiles.gap import GenericAccessServiceProxy
|
|
|
32
32
|
from bumble.profiles.pacs import PublishedAudioCapabilitiesServiceProxy
|
|
33
33
|
from bumble.profiles.tmap import TelephonyAndMediaAudioServiceProxy
|
|
34
34
|
from bumble.profiles.vcs import VolumeControlServiceProxy
|
|
35
|
-
from bumble.transport import
|
|
35
|
+
from bumble.transport import open_transport
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
# -----------------------------------------------------------------------------
|
|
@@ -215,7 +215,7 @@ async def show_device_info(peer, done: Optional[asyncio.Future]) -> None:
|
|
|
215
215
|
|
|
216
216
|
# -----------------------------------------------------------------------------
|
|
217
217
|
async def async_main(device_config, encrypt, transport, address_or_name):
|
|
218
|
-
async with await
|
|
218
|
+
async with await open_transport(transport) as (hci_source, hci_sink):
|
|
219
219
|
|
|
220
220
|
# Create a device
|
|
221
221
|
if device_config:
|
bumble/apps/gatt_dump.py
CHANGED
|
@@ -24,7 +24,7 @@ import bumble.core
|
|
|
24
24
|
from bumble.colors import color
|
|
25
25
|
from bumble.device import Device, Peer
|
|
26
26
|
from bumble.gatt import show_services
|
|
27
|
-
from bumble.transport import
|
|
27
|
+
from bumble.transport import open_transport
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
# -----------------------------------------------------------------------------
|
|
@@ -60,7 +60,7 @@ async def dump_gatt_db(peer, done):
|
|
|
60
60
|
|
|
61
61
|
# -----------------------------------------------------------------------------
|
|
62
62
|
async def async_main(device_config, encrypt, transport, address_or_name):
|
|
63
|
-
async with await
|
|
63
|
+
async with await open_transport(transport) as (hci_source, hci_sink):
|
|
64
64
|
|
|
65
65
|
# Create a device
|
|
66
66
|
if device_config:
|
bumble/apps/gg_bridge.py
CHANGED
|
@@ -27,7 +27,7 @@ from bumble.device import Device, Peer
|
|
|
27
27
|
from bumble.core import AdvertisingData
|
|
28
28
|
from bumble.gatt import Service, Characteristic, CharacteristicValue
|
|
29
29
|
from bumble.utils import AsyncRunner
|
|
30
|
-
from bumble.transport import
|
|
30
|
+
from bumble.transport import open_transport
|
|
31
31
|
from bumble.hci import HCI_Constant
|
|
32
32
|
|
|
33
33
|
|
|
@@ -325,7 +325,7 @@ async def run(
|
|
|
325
325
|
receive_port,
|
|
326
326
|
):
|
|
327
327
|
print('<<< connecting to HCI...')
|
|
328
|
-
async with await
|
|
328
|
+
async with await open_transport(hci_transport) as (hci_source, hci_sink):
|
|
329
329
|
print('<<< connected')
|
|
330
330
|
|
|
331
331
|
# Instantiate a bridge object
|
bumble/apps/hci_bridge.py
CHANGED
|
@@ -46,14 +46,14 @@ async def async_main():
|
|
|
46
46
|
return
|
|
47
47
|
|
|
48
48
|
print('>>> connecting to HCI...')
|
|
49
|
-
async with await transport.
|
|
49
|
+
async with await transport.open_transport(sys.argv[1]) as (
|
|
50
50
|
hci_host_source,
|
|
51
51
|
hci_host_sink,
|
|
52
52
|
):
|
|
53
53
|
print('>>> connected')
|
|
54
54
|
|
|
55
55
|
print('>>> connecting to HCI...')
|
|
56
|
-
async with await transport.
|
|
56
|
+
async with await transport.open_transport(sys.argv[2]) as (
|
|
57
57
|
hci_controller_source,
|
|
58
58
|
hci_controller_sink,
|
|
59
59
|
):
|
bumble/apps/l2cap_bridge.py
CHANGED
|
@@ -22,7 +22,7 @@ import click
|
|
|
22
22
|
|
|
23
23
|
from bumble import l2cap
|
|
24
24
|
from bumble.colors import color
|
|
25
|
-
from bumble.transport import
|
|
25
|
+
from bumble.transport import open_transport
|
|
26
26
|
from bumble.device import Device
|
|
27
27
|
from bumble.utils import FlowControlAsyncPipe
|
|
28
28
|
from bumble.hci import HCI_Constant
|
|
@@ -258,7 +258,7 @@ class ClientBridge:
|
|
|
258
258
|
# -----------------------------------------------------------------------------
|
|
259
259
|
async def run(device_config, hci_transport, bridge):
|
|
260
260
|
print('<<< connecting to HCI...')
|
|
261
|
-
async with await
|
|
261
|
+
async with await open_transport(hci_transport) as (hci_source, hci_sink):
|
|
262
262
|
print('<<< connected')
|
|
263
263
|
|
|
264
264
|
device = Device.from_config_file_with_hci(device_config, hci_source, hci_sink)
|
bumble/apps/lea_unicast/app.py
CHANGED
|
@@ -337,7 +337,12 @@ class Speaker:
|
|
|
337
337
|
),
|
|
338
338
|
(
|
|
339
339
|
AdvertisingData.FLAGS,
|
|
340
|
-
bytes(
|
|
340
|
+
bytes(
|
|
341
|
+
[
|
|
342
|
+
AdvertisingData.LE_GENERAL_DISCOVERABLE_MODE_FLAG
|
|
343
|
+
| AdvertisingData.BR_EDR_NOT_SUPPORTED_FLAG
|
|
344
|
+
]
|
|
345
|
+
),
|
|
341
346
|
),
|
|
342
347
|
(
|
|
343
348
|
AdvertisingData.INCOMPLETE_LIST_OF_16_BIT_SERVICE_CLASS_UUIDS,
|
bumble/apps/pair.py
CHANGED
|
@@ -26,7 +26,7 @@ from prompt_toolkit.shortcuts import PromptSession
|
|
|
26
26
|
from bumble.a2dp import make_audio_sink_service_sdp_records
|
|
27
27
|
from bumble.colors import color
|
|
28
28
|
from bumble.device import Device, Peer
|
|
29
|
-
from bumble.transport import
|
|
29
|
+
from bumble.transport import open_transport
|
|
30
30
|
from bumble.pairing import OobData, PairingDelegate, PairingConfig
|
|
31
31
|
from bumble.smp import OobContext, OobLegacyContext
|
|
32
32
|
from bumble.smp import error_name as smp_error_name
|
|
@@ -349,7 +349,7 @@ async def pair(
|
|
|
349
349
|
Waiter.instance = Waiter(linger=linger)
|
|
350
350
|
|
|
351
351
|
print('<<< connecting to HCI...')
|
|
352
|
-
async with await
|
|
352
|
+
async with await open_transport(hci_transport) as (hci_source, hci_sink):
|
|
353
353
|
print('<<< connected')
|
|
354
354
|
|
|
355
355
|
# Create a device to manage the host
|
|
@@ -402,14 +402,19 @@ async def pair(
|
|
|
402
402
|
# Create an OOB context if needed
|
|
403
403
|
if oob:
|
|
404
404
|
our_oob_context = OobContext()
|
|
405
|
-
|
|
406
|
-
None
|
|
407
|
-
|
|
408
|
-
|
|
405
|
+
if oob == '-':
|
|
406
|
+
shared_data = None
|
|
407
|
+
legacy_context = OobLegacyContext()
|
|
408
|
+
else:
|
|
409
|
+
oob_data = OobData.from_ad(
|
|
409
410
|
AdvertisingData.from_bytes(bytes.fromhex(oob))
|
|
410
|
-
)
|
|
411
|
-
|
|
412
|
-
|
|
411
|
+
)
|
|
412
|
+
shared_data = oob_data.shared_data
|
|
413
|
+
legacy_context = oob_data.legacy_context
|
|
414
|
+
if legacy_context is None and not sc:
|
|
415
|
+
print(color('OOB pairing in legacy mode requires TK', 'red'))
|
|
416
|
+
return
|
|
417
|
+
|
|
413
418
|
oob_contexts = PairingConfig.OobConfig(
|
|
414
419
|
our_context=our_oob_context,
|
|
415
420
|
peer_data=shared_data,
|
|
@@ -419,7 +424,9 @@ async def pair(
|
|
|
419
424
|
print(color('@@@ OOB Data:', 'yellow'))
|
|
420
425
|
if shared_data is None:
|
|
421
426
|
oob_data = OobData(
|
|
422
|
-
address=device.random_address,
|
|
427
|
+
address=device.random_address,
|
|
428
|
+
shared_data=our_oob_context.share(),
|
|
429
|
+
legacy_context=(None if sc else legacy_context),
|
|
423
430
|
)
|
|
424
431
|
print(
|
|
425
432
|
color(
|
|
@@ -427,7 +434,8 @@ async def pair(
|
|
|
427
434
|
'yellow',
|
|
428
435
|
)
|
|
429
436
|
)
|
|
430
|
-
|
|
437
|
+
if legacy_context:
|
|
438
|
+
print(color(f'@@@ TK={legacy_context.tk.hex()}', 'yellow'))
|
|
431
439
|
print(color('@@@-----------------------------------', 'yellow'))
|
|
432
440
|
else:
|
|
433
441
|
oob_contexts = None
|
bumble/apps/pandora_server.py
CHANGED
|
@@ -4,7 +4,7 @@ import logging
|
|
|
4
4
|
import json
|
|
5
5
|
|
|
6
6
|
from bumble.pandora import PandoraDevice, Config, serve
|
|
7
|
-
from typing import
|
|
7
|
+
from typing import Any
|
|
8
8
|
|
|
9
9
|
BUMBLE_SERVER_GRPC_PORT = 7999
|
|
10
10
|
ROOTCANAL_PORT_CUTTLEFISH = 7300
|
|
@@ -39,7 +39,7 @@ def main(grpc_port: int, rootcanal_port: int, transport: str, config: str) -> No
|
|
|
39
39
|
asyncio.run(serve(device, config=server_config, port=grpc_port))
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
def retrieve_config(config: str) ->
|
|
42
|
+
def retrieve_config(config: str) -> dict[str, Any]:
|
|
43
43
|
if not config:
|
|
44
44
|
return {}
|
|
45
45
|
|
bumble/apps/rfcomm_bridge.py
CHANGED
|
@@ -406,7 +406,7 @@ class ClientBridge:
|
|
|
406
406
|
# -----------------------------------------------------------------------------
|
|
407
407
|
async def run(device_config, hci_transport, bridge):
|
|
408
408
|
print("<<< connecting to HCI...")
|
|
409
|
-
async with await transport.
|
|
409
|
+
async with await transport.open_transport(hci_transport) as (
|
|
410
410
|
hci_source,
|
|
411
411
|
hci_sink,
|
|
412
412
|
):
|
bumble/apps/scan.py
CHANGED
|
@@ -22,7 +22,7 @@ import click
|
|
|
22
22
|
|
|
23
23
|
from bumble.colors import color
|
|
24
24
|
from bumble.device import Device
|
|
25
|
-
from bumble.transport import
|
|
25
|
+
from bumble.transport import open_transport
|
|
26
26
|
from bumble.keys import JsonKeyStore
|
|
27
27
|
from bumble.smp import AddressResolver
|
|
28
28
|
from bumble.device import Advertisement
|
|
@@ -127,7 +127,7 @@ async def scan(
|
|
|
127
127
|
transport,
|
|
128
128
|
):
|
|
129
129
|
print('<<< connecting to HCI...')
|
|
130
|
-
async with await
|
|
130
|
+
async with await open_transport(transport) as (hci_source, hci_sink):
|
|
131
131
|
print('<<< connected')
|
|
132
132
|
|
|
133
133
|
if device_config:
|
bumble/apps/show.py
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
# Imports
|
|
17
17
|
# -----------------------------------------------------------------------------
|
|
18
18
|
import datetime
|
|
19
|
+
import importlib
|
|
19
20
|
import logging
|
|
20
21
|
import os
|
|
21
22
|
import struct
|
|
@@ -154,9 +155,10 @@ class Printer:
|
|
|
154
155
|
def main(format, vendor, filename):
|
|
155
156
|
for vendor_name in vendor:
|
|
156
157
|
if vendor_name == 'android':
|
|
157
|
-
|
|
158
|
+
# Prevent being deleted by linter.
|
|
159
|
+
importlib.import_module('bumble.vendor.android.hci')
|
|
158
160
|
elif vendor_name == 'zephyr':
|
|
159
|
-
|
|
161
|
+
importlib.import_module('bumble.vendor.zephyr.hci')
|
|
160
162
|
|
|
161
163
|
input = open(filename, 'rb')
|
|
162
164
|
if format == 'h4':
|
bumble/apps/speaker/speaker.html
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
<tr><td>Codec</td><td><span id="codecText"></span></td></tr>
|
|
16
16
|
<tr><td>Packets</td><td><span id="packetsReceivedText"></span></td></tr>
|
|
17
17
|
<tr><td>Bytes</td><td><span id="bytesReceivedText"></span></td></tr>
|
|
18
|
+
<tr><td>Bitrate</td><td><span id="bitrate"></span></td></tr>
|
|
18
19
|
</table>
|
|
19
20
|
</td>
|
|
20
21
|
<td>
|