Support HCI_LE_Set_Host_Feature_Command

This commit is contained in:
khsiao-google
2025-08-05 05:56:00 +00:00
parent d6282a7247
commit ec12771be6
2 changed files with 18 additions and 1 deletions

View File

@@ -1855,3 +1855,11 @@ class Controller:
See Bluetooth spec Vol 4, Part E - 7.8.110 LE Remove ISO Data Path Command See Bluetooth spec Vol 4, Part E - 7.8.110 LE Remove ISO Data Path Command
''' '''
return struct.pack('<BH', HCI_SUCCESS, command.connection_handle) return struct.pack('<BH', HCI_SUCCESS, command.connection_handle)
def on_hci_le_set_host_feature_command(
self, _command: hci.HCI_LE_Set_Host_Feature_Command
):
'''
See Bluetooth spec Vol 4, Part E - 7.8.115 LE Set Host Feature command
'''
return bytes([HCI_SUCCESS])

View File

@@ -2066,7 +2066,7 @@ class DeviceConfiguration:
le_simultaneous_enabled: bool = False le_simultaneous_enabled: bool = False
le_privacy_enabled: bool = False le_privacy_enabled: bool = False
le_rpa_timeout: int = DEVICE_DEFAULT_LE_RPA_TIMEOUT le_rpa_timeout: int = DEVICE_DEFAULT_LE_RPA_TIMEOUT
le_subrate_enabled: bool = True le_subrate_enabled: bool = False
classic_enabled: bool = False classic_enabled: bool = False
classic_sc_enabled: bool = True classic_sc_enabled: bool = True
classic_ssp_enabled: bool = True classic_ssp_enabled: bool = True
@@ -2799,6 +2799,15 @@ class Device(utils.CompositeEventEmitter):
check_result=True, check_result=True,
) )
if self.le_subrate_enabled:
await self.send_command(
hci.HCI_LE_Set_Host_Feature_Command(
bit_number=hci.LeFeature.CONNECTION_SUBRATING_HOST_SUPPORT,
bit_value=1,
),
check_result=True,
)
if self.config.channel_sounding_enabled: if self.config.channel_sounding_enabled:
await self.send_command( await self.send_command(
hci.HCI_LE_Set_Host_Feature_Command( hci.HCI_LE_Set_Host_Feature_Command(