Skip to content

pb_client.service.Service.scan async

scan(*, seconds=10.0, name=None, transport=None)

Look for hubs that are advertising.

Parameters:

Name Type Description Default
seconds float | None

How long the service should look, or None for as long as this call is waiting. This bounds the scan itself rather than the call; wrap the call in a cancel scope to bound the wait.

10.0
name str | None

Only report hubs with this name.

None
transport str | None

Only look on this transport, such as "usb" or "ble". Left out, every transport the service has is used.

None

Returns:

Type Description
list[DeviceInfo]

The hubs seen.