ManagerBLE

Table of Contents

Methods

discover(serviceFilteropt, timeoutopt, callbackopt) → {Promise}

Discovers Ble peripherals for a certain time

Parameters:
Name Type Attributes Default Description
serviceFilter Array.<string> <optional>

List of required serviceUuids the peripheral should expose

timeout number <optional>
10000

Time in ms to search for Ble peripherals (max 30 seconds)

callback function <optional>
Name Type Description
err Error
advertisements Array.<BleAdvertisement>
Returns:
Type:
Promise

find(peripheralUuid, timeoutopt, callbackopt) → {Promise}

Finds a Ble peripheral with a given peripheralUuid

Parameters:
Name Type Attributes Default Description
peripheralUuid string

The uuid of the peripheral to find

timeout number <optional>
10000

Time in ms to search for the Ble peripheral (max 30 seconds)

callback function <optional>
Name Type Description
err Error
advertisement BleAdvertisement
Returns:
Type:
Promise