public class LocalBTDevice
extends java.lang.Object
Constructor and Description |
---|
LocalBTDevice() |
Modifier and Type | Method and Description |
---|---|
void |
authenticate(java.lang.String deviceAddress,
java.lang.String pin)
Authenticate/pair the local device with the specified device
|
void |
disconnect() |
java.lang.String |
getBluetoothAddress()
Return the address of the local device
|
lejos.internal.io.NativeHCI.DeviceInfo |
getDeviceInfo()
Return a structure providing information about the local device
|
java.lang.String |
getFriendlyName()
Return the name of the local device
|
lejos.internal.io.NativeHCI.LocalVersion |
getLocalVersion()
return a structure providing local version information
|
java.util.Collection<RemoteBTDevice> |
getPairedDevices()
Return a list of the devices we are paired with
|
boolean |
getVisibility()
return the current visibility of the device
|
static boolean |
isPowerOn()
Check to see if the device is currently powered on
|
void |
removeDevice(java.lang.String deviceAddress)
Remove the specified device from the known/paired list
|
java.util.Collection<RemoteBTDevice> |
search()
Search for and return a list of Bluetooth devices.
|
void |
setVisibility(boolean visible)
Set the visibility state of the device
|
public java.util.Collection<RemoteBTDevice> search()
java.io.IOException
public java.util.Collection<RemoteBTDevice> getPairedDevices()
public void setVisibility(boolean visible)
visible
- new visibility statepublic boolean getVisibility()
public static boolean isPowerOn()
public java.lang.String getBluetoothAddress()
public java.lang.String getFriendlyName()
public lejos.internal.io.NativeHCI.DeviceInfo getDeviceInfo()
public lejos.internal.io.NativeHCI.LocalVersion getLocalVersion()
public void authenticate(java.lang.String deviceAddress, java.lang.String pin)
deviceAddress
- address of the device to pair withpin
- Pin to use for pairing with the devicepublic void removeDevice(java.lang.String deviceAddress)
deviceAddress
- address of the device to removepublic void disconnect()