diff --git a/bumble/device.py b/bumble/device.py index d97df49..512bb1d 100644 --- a/bumble/device.py +++ b/bumble/device.py @@ -534,6 +534,9 @@ class Connection(CompositeEventEmitter): def on_connection_parameters_update_failure(self, error): pass + def on_connection_data_length_change(self): + pass + def on_connection_phy_update(self): pass @@ -2008,7 +2011,7 @@ class Device(CompositeEventEmitter): NOTE: the name of the parameters may look odd, but it just follows the names used in the Bluetooth spec. ''' - await self.send_command( + result = await self.send_command( HCI_LE_Connection_Update_Command( connection_handle=connection.handle, connection_interval_min=connection_interval_min, @@ -2017,9 +2020,10 @@ class Device(CompositeEventEmitter): supervision_timeout=supervision_timeout, min_ce_length=min_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): result = await self.send_command( diff --git a/bumble/hci.py b/bumble/hci.py index d8517c2..721016e 100644 --- a/bumble/hci.py +++ b/bumble/hci.py @@ -1421,7 +1421,11 @@ class HCI_Constant: # ----------------------------------------------------------------------------- class HCI_Error(ProtocolError): 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), + ) # -----------------------------------------------------------------------------