getPeripheralById

open fun getPeripheralById(id: ID): P?

A peripheral that the central manager is able to match to the provided identifier.

The peripheral is returned only when Bluetooth is powered on, see getPeripheralsById.

Return

A peripheral associated with the given identifier, if found, or null if not found or Bluetooth is not powered on.

Parameters

id

The peripheral identifier.

See also

Throws

If the central manager has been closed.

If the identifier is not valid. This is checked regardless of the state.