LowpanScanner

public class LowpanScanner
extends Object

java.lang.Object
   ↳ com.google.android.things.lowpan.LowpanScanner


Class for performing active and passive scans.

Summary

Nested classes

class LowpanScanner.Callback

Callback base class for LowpanScanner

Public methods

int getTxPower()

Gets the maximum transmit power (in dBm) used for active scanning.

void setCallback(LowpanScanner.Callback cb)

Sets an instance of LowpanScanner.Callback to receive events.

void setCallback(Handler handler, LowpanScanner.Callback cb)

Sets an instance of LowpanScanner.Callback to receive events.

void setTxPower(int txPower)

Sets the maximum transmit power (in dBm) to be used for active scanning.

void startEnergyScan()

Start an energy scan.

void startNetScan()

Start a network scan.

void stopEnergyScan()

Stop an energy scan currently in progress.

void stopNetScan()

Stop a network scan currently in progress.

Inherited methods

From class java.lang.Object

Public methods

getTxPower

int getTxPower ()

Gets the maximum transmit power (in dBm) used for active scanning.

Returns
int

See also:

setCallback

void setCallback (LowpanScanner.Callback cb)

Sets an instance of LowpanScanner.Callback to receive events.

Parameters
cb LowpanScanner.Callback

setCallback

void setCallback (Handler handler, 
                LowpanScanner.Callback cb)

Sets an instance of LowpanScanner.Callback to receive events.

Parameters
handler Handler

cb LowpanScanner.Callback

setTxPower

void setTxPower (int txPower)

Sets the maximum transmit power (in dBm) to be used for active scanning.

The actual transmit power used is the lesser of this value and the currently configured maximum transmit power for the interface.

Parameters
txPower int

See also:

startEnergyScan

void startEnergyScan ()

Start an energy scan.

This method will return once the scan has started.

Throws
LowpanException

See also:

startNetScan

void startNetScan ()

Start a network scan.

This method will return once the scan has started.

Because performing a network scan will return the hardware addresses of nearby devices, the use of this method requires the permission @{link android.Manifest.permission.ACCESS_COARSE_LOCATION}.

Throws
LowpanException

See also:

stopEnergyScan

void stopEnergyScan ()

Stop an energy scan currently in progress.

See also:

stopNetScan

void stopNetScan ()

Stop a network scan currently in progress.

See also: