minor fix

This commit is contained in:
Gilles Boccon-Gibod
2025-04-24 17:22:25 -07:00
parent febed8179b
commit ab60b42b85
3 changed files with 18 additions and 2 deletions

View File

@@ -3953,6 +3953,9 @@ class Device(utils.CompositeEventEmitter):
return result.return_parameters.rssi
async def get_connection_phy(self, connection: Connection) -> ConnectionPHY:
if not self.host.supports_command(hci.HCI_LE_READ_PHY_COMMAND):
return ConnectionPHY(hci.Phy.LE_1M, hci.Phy.LE_1M)
result = await self.send_command(
hci.HCI_LE_Read_PHY_Command(connection_handle=connection.handle),
check_result=True,