mirror of
https://github.com/google/bumble.git
synced 2026-05-09 04:08:02 +00:00
@@ -534,6 +534,9 @@ class Connection(CompositeEventEmitter):
|
|||||||
def on_connection_parameters_update_failure(self, error):
|
def on_connection_parameters_update_failure(self, error):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def on_connection_data_length_change(self):
|
||||||
|
pass
|
||||||
|
|
||||||
def on_connection_phy_update(self):
|
def on_connection_phy_update(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -2008,7 +2011,7 @@ class Device(CompositeEventEmitter):
|
|||||||
NOTE: the name of the parameters may look odd, but it just follows the names
|
NOTE: the name of the parameters may look odd, but it just follows the names
|
||||||
used in the Bluetooth spec.
|
used in the Bluetooth spec.
|
||||||
'''
|
'''
|
||||||
await self.send_command(
|
result = await self.send_command(
|
||||||
HCI_LE_Connection_Update_Command(
|
HCI_LE_Connection_Update_Command(
|
||||||
connection_handle=connection.handle,
|
connection_handle=connection.handle,
|
||||||
connection_interval_min=connection_interval_min,
|
connection_interval_min=connection_interval_min,
|
||||||
@@ -2017,9 +2020,10 @@ class Device(CompositeEventEmitter):
|
|||||||
supervision_timeout=supervision_timeout,
|
supervision_timeout=supervision_timeout,
|
||||||
min_ce_length=min_ce_length,
|
min_ce_length=min_ce_length,
|
||||||
max_ce_length=max_ce_length,
|
max_ce_length=max_ce_length,
|
||||||
),
|
)
|
||||||
check_result=True,
|
|
||||||
)
|
)
|
||||||
|
if result.status != HCI_Command_Status_Event.PENDING:
|
||||||
|
raise HCI_StatusError(result)
|
||||||
|
|
||||||
async def get_connection_rssi(self, connection):
|
async def get_connection_rssi(self, connection):
|
||||||
result = await self.send_command(
|
result = await self.send_command(
|
||||||
|
|||||||
@@ -1421,7 +1421,11 @@ class HCI_Constant:
|
|||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
class HCI_Error(ProtocolError):
|
class HCI_Error(ProtocolError):
|
||||||
def __init__(self, error_code):
|
def __init__(self, error_code):
|
||||||
super().__init__(error_code, 'hci', HCI_Constant.error_name(error_code))
|
super().__init__(
|
||||||
|
error_code,
|
||||||
|
error_namespace='hci',
|
||||||
|
error_name=HCI_Constant.error_name(error_code),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user