bumble 0.0.214__py3-none-any.whl → 0.0.215__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 +16 -3
- bumble/a2dp.py +15 -16
- bumble/apps/auracast.py +13 -38
- bumble/apps/bench.py +9 -10
- bumble/apps/ble_rpa_tool.py +1 -0
- bumble/apps/console.py +22 -25
- bumble/apps/controller_info.py +19 -19
- bumble/apps/controller_loopback.py +2 -2
- bumble/apps/controllers.py +1 -1
- bumble/apps/device_info.py +3 -3
- bumble/apps/gatt_dump.py +1 -1
- bumble/apps/gg_bridge.py +5 -6
- bumble/apps/hci_bridge.py +3 -3
- bumble/apps/l2cap_bridge.py +3 -3
- bumble/apps/lea_unicast/app.py +15 -25
- bumble/apps/pair.py +30 -43
- bumble/apps/pandora_server.py +5 -4
- bumble/apps/player/player.py +19 -22
- bumble/apps/rfcomm_bridge.py +3 -8
- bumble/apps/scan.py +16 -6
- bumble/apps/show.py +3 -4
- bumble/apps/speaker/speaker.py +22 -22
- bumble/apps/unbond.py +2 -1
- bumble/apps/usb_probe.py +1 -2
- bumble/att.py +241 -246
- bumble/audio/io.py +5 -9
- bumble/avc.py +2 -2
- bumble/avctp.py +6 -7
- bumble/avdtp.py +19 -22
- bumble/avrcp.py +1096 -588
- bumble/codecs.py +2 -0
- bumble/controller.py +52 -13
- bumble/core.py +567 -248
- bumble/crypto/__init__.py +2 -2
- bumble/crypto/builtin.py +1 -1
- bumble/crypto/cryptography.py +2 -4
- bumble/data_types.py +1025 -0
- bumble/device.py +280 -278
- bumble/drivers/__init__.py +3 -2
- bumble/drivers/intel.py +3 -4
- bumble/drivers/rtk.py +26 -9
- bumble/gap.py +4 -4
- bumble/gatt.py +3 -2
- bumble/gatt_adapters.py +3 -11
- bumble/gatt_client.py +69 -81
- bumble/gatt_server.py +124 -124
- bumble/hci.py +67 -18
- bumble/helpers.py +19 -26
- bumble/hfp.py +10 -21
- bumble/hid.py +22 -16
- bumble/host.py +181 -103
- bumble/keys.py +5 -3
- bumble/l2cap.py +121 -74
- bumble/link.py +8 -9
- bumble/pairing.py +7 -6
- bumble/pandora/__init__.py +8 -7
- bumble/pandora/config.py +3 -1
- bumble/pandora/device.py +3 -2
- bumble/pandora/host.py +38 -36
- bumble/pandora/l2cap.py +22 -21
- bumble/pandora/security.py +15 -15
- bumble/pandora/utils.py +5 -3
- bumble/profiles/aics.py +11 -11
- bumble/profiles/ams.py +7 -8
- bumble/profiles/ancs.py +6 -7
- bumble/profiles/ascs.py +4 -9
- bumble/profiles/asha.py +8 -12
- bumble/profiles/bap.py +11 -23
- bumble/profiles/bass.py +2 -7
- bumble/profiles/battery_service.py +3 -4
- bumble/profiles/cap.py +1 -2
- bumble/profiles/csip.py +2 -6
- bumble/profiles/device_information_service.py +2 -2
- bumble/profiles/gap.py +4 -4
- bumble/profiles/gatt_service.py +1 -4
- bumble/profiles/gmap.py +5 -5
- bumble/profiles/hap.py +62 -59
- bumble/profiles/heart_rate_service.py +5 -4
- bumble/profiles/le_audio.py +3 -1
- bumble/profiles/mcp.py +3 -7
- bumble/profiles/pacs.py +3 -6
- bumble/profiles/pbp.py +2 -0
- bumble/profiles/tmap.py +2 -3
- bumble/profiles/vcs.py +2 -8
- bumble/profiles/vocs.py +8 -8
- bumble/rfcomm.py +11 -14
- bumble/rtp.py +1 -0
- bumble/sdp.py +10 -8
- bumble/smp.py +142 -153
- bumble/snoop.py +5 -5
- bumble/tools/generate_company_id_list.py +1 -0
- bumble/tools/intel_fw_download.py +3 -3
- bumble/tools/intel_util.py +4 -4
- bumble/tools/rtk_fw_download.py +6 -3
- bumble/tools/rtk_util.py +24 -7
- bumble/transport/__init__.py +19 -15
- bumble/transport/android_emulator.py +8 -13
- bumble/transport/android_netsim.py +19 -18
- bumble/transport/common.py +12 -15
- bumble/transport/file.py +1 -1
- bumble/transport/hci_socket.py +4 -6
- bumble/transport/pty.py +5 -6
- bumble/transport/pyusb.py +7 -10
- bumble/transport/serial.py +2 -1
- bumble/transport/tcp_client.py +2 -2
- bumble/transport/tcp_server.py +11 -14
- bumble/transport/udp.py +3 -3
- bumble/transport/unix.py +67 -1
- bumble/transport/usb.py +6 -6
- bumble/transport/vhci.py +0 -1
- bumble/transport/ws_client.py +2 -1
- bumble/transport/ws_server.py +3 -2
- bumble/utils.py +20 -5
- bumble/vendor/android/hci.py +1 -2
- bumble/vendor/zephyr/hci.py +0 -1
- {bumble-0.0.214.dist-info → bumble-0.0.215.dist-info}/METADATA +2 -1
- bumble-0.0.215.dist-info/RECORD +183 -0
- bumble-0.0.214.dist-info/RECORD +0 -182
- {bumble-0.0.214.dist-info → bumble-0.0.215.dist-info}/WHEEL +0 -0
- {bumble-0.0.214.dist-info → bumble-0.0.215.dist-info}/entry_points.txt +0 -0
- {bumble-0.0.214.dist-info → bumble-0.0.215.dist-info}/licenses/LICENSE +0 -0
- {bumble-0.0.214.dist-info → bumble-0.0.215.dist-info}/top_level.txt +0 -0
bumble/audio/io.py
CHANGED
|
@@ -17,20 +17,16 @@
|
|
|
17
17
|
# -----------------------------------------------------------------------------
|
|
18
18
|
from __future__ import annotations
|
|
19
19
|
|
|
20
|
-
import asyncio
|
|
21
20
|
import abc
|
|
22
|
-
|
|
21
|
+
import asyncio
|
|
23
22
|
import dataclasses
|
|
24
23
|
import enum
|
|
25
24
|
import logging
|
|
26
25
|
import pathlib
|
|
27
|
-
from typing import (
|
|
28
|
-
AsyncGenerator,
|
|
29
|
-
BinaryIO,
|
|
30
|
-
TYPE_CHECKING,
|
|
31
|
-
)
|
|
32
26
|
import sys
|
|
33
27
|
import wave
|
|
28
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
29
|
+
from typing import TYPE_CHECKING, AsyncGenerator, BinaryIO
|
|
34
30
|
|
|
35
31
|
from bumble.colors import color
|
|
36
32
|
|
|
@@ -230,8 +226,8 @@ class SoundDeviceAudioOutput(ThreadedAudioOutput):
|
|
|
230
226
|
|
|
231
227
|
try:
|
|
232
228
|
self._stream.write(pcm_samples)
|
|
233
|
-
except Exception
|
|
234
|
-
|
|
229
|
+
except Exception:
|
|
230
|
+
logger.exception('Sound device error')
|
|
235
231
|
raise
|
|
236
232
|
|
|
237
233
|
def _close(self):
|
bumble/avc.py
CHANGED
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
# Imports
|
|
17
17
|
# -----------------------------------------------------------------------------
|
|
18
18
|
from __future__ import annotations
|
|
19
|
+
|
|
19
20
|
import enum
|
|
20
21
|
import struct
|
|
21
22
|
from typing import Union
|
|
22
23
|
|
|
23
|
-
from bumble import core
|
|
24
|
-
from bumble import utils
|
|
24
|
+
from bumble import core, utils
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
# -----------------------------------------------------------------------------
|
bumble/avctp.py
CHANGED
|
@@ -16,15 +16,14 @@
|
|
|
16
16
|
# Imports
|
|
17
17
|
# -----------------------------------------------------------------------------
|
|
18
18
|
from __future__ import annotations
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
import logging
|
|
21
21
|
import struct
|
|
22
|
-
from
|
|
22
|
+
from enum import IntEnum
|
|
23
|
+
from typing import Callable, Optional, cast
|
|
23
24
|
|
|
25
|
+
from bumble import avc, core, l2cap
|
|
24
26
|
from bumble.colors import color
|
|
25
|
-
from bumble import avc
|
|
26
|
-
from bumble import core
|
|
27
|
-
from bumble import l2cap
|
|
28
27
|
|
|
29
28
|
# -----------------------------------------------------------------------------
|
|
30
29
|
# Logging
|
|
@@ -137,8 +136,8 @@ class MessageAssembler:
|
|
|
137
136
|
self.pid,
|
|
138
137
|
self.payload,
|
|
139
138
|
)
|
|
140
|
-
except Exception
|
|
141
|
-
logger.exception(color(
|
|
139
|
+
except Exception:
|
|
140
|
+
logger.exception(color("!!! exception in callback", "red"))
|
|
142
141
|
|
|
143
142
|
self.reset()
|
|
144
143
|
|
bumble/avdtp.py
CHANGED
|
@@ -16,31 +16,25 @@
|
|
|
16
16
|
# Imports
|
|
17
17
|
# -----------------------------------------------------------------------------
|
|
18
18
|
from __future__ import annotations
|
|
19
|
+
|
|
19
20
|
import asyncio
|
|
20
|
-
import time
|
|
21
|
-
import logging
|
|
22
21
|
import enum
|
|
22
|
+
import logging
|
|
23
|
+
import time
|
|
23
24
|
import warnings
|
|
24
25
|
from typing import (
|
|
25
26
|
Any,
|
|
27
|
+
AsyncGenerator,
|
|
26
28
|
Awaitable,
|
|
27
|
-
Optional,
|
|
28
29
|
Callable,
|
|
29
|
-
AsyncGenerator,
|
|
30
30
|
Iterable,
|
|
31
|
-
|
|
31
|
+
Optional,
|
|
32
32
|
SupportsBytes,
|
|
33
|
+
Union,
|
|
33
34
|
cast,
|
|
34
35
|
)
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
from bumble.core import (
|
|
38
|
-
BT_ADVANCED_AUDIO_DISTRIBUTION_SERVICE,
|
|
39
|
-
InvalidStateError,
|
|
40
|
-
ProtocolError,
|
|
41
|
-
InvalidArgumentError,
|
|
42
|
-
name_or_number,
|
|
43
|
-
)
|
|
37
|
+
from bumble import device, l2cap, sdp, utils
|
|
44
38
|
from bumble.a2dp import (
|
|
45
39
|
A2DP_CODEC_TYPE_NAMES,
|
|
46
40
|
A2DP_MPEG_2_4_AAC_CODEC_TYPE,
|
|
@@ -51,10 +45,15 @@ from bumble.a2dp import (
|
|
|
51
45
|
SbcMediaCodecInformation,
|
|
52
46
|
VendorSpecificMediaCodecInformation,
|
|
53
47
|
)
|
|
54
|
-
from bumble.rtp import MediaPacket
|
|
55
|
-
from bumble import sdp, device, l2cap, utils
|
|
56
48
|
from bumble.colors import color
|
|
57
|
-
|
|
49
|
+
from bumble.core import (
|
|
50
|
+
BT_ADVANCED_AUDIO_DISTRIBUTION_SERVICE,
|
|
51
|
+
InvalidArgumentError,
|
|
52
|
+
InvalidStateError,
|
|
53
|
+
ProtocolError,
|
|
54
|
+
name_or_number,
|
|
55
|
+
)
|
|
56
|
+
from bumble.rtp import MediaPacket
|
|
58
57
|
|
|
59
58
|
# -----------------------------------------------------------------------------
|
|
60
59
|
# Logging
|
|
@@ -434,8 +433,8 @@ class MessageAssembler:
|
|
|
434
433
|
)
|
|
435
434
|
try:
|
|
436
435
|
self.callback(self.transaction_label, message)
|
|
437
|
-
except Exception
|
|
438
|
-
logger.exception(color(
|
|
436
|
+
except Exception:
|
|
437
|
+
logger.exception(color('!!! exception in callback', 'red'))
|
|
439
438
|
|
|
440
439
|
self.reset()
|
|
441
440
|
|
|
@@ -1400,10 +1399,8 @@ class Protocol(utils.EventEmitter):
|
|
|
1400
1399
|
try:
|
|
1401
1400
|
response = handler(message)
|
|
1402
1401
|
self.send_message(transaction_label, response)
|
|
1403
|
-
except Exception
|
|
1404
|
-
logger.
|
|
1405
|
-
f'{color("!!! Exception in handler:", "red")} {error}'
|
|
1406
|
-
)
|
|
1402
|
+
except Exception:
|
|
1403
|
+
logger.exception(color("!!! Exception in handler:", "red"))
|
|
1407
1404
|
else:
|
|
1408
1405
|
logger.warning('unhandled command')
|
|
1409
1406
|
else:
|