I have the following simple code (below) using BlueCove 2.1.1 in particular the RemoteDeviceHelper.readRSSI(device) method which gives an error that so far I could not resolve. May I kindly ask your opinion? I'm trying a desktop app on Windows 10, and have a feeling that BlueCove wont work with this Windows version, or no other clue.
Here is the code:
public static void main(String[] args) {
try {
LocalDevice localDevice = LocalDevice.getLocalDevice();
DiscoveryAgent discoveryAgent = localDevice.getDiscoveryAgent();
// Discover nearby devices
RemoteDevice[] devices = discoveryAgent.retrieveDevices(DiscoveryAgent.PREKNOWN);
for (RemoteDevice device : devices) {
System.out.println("Name: "+device.getFriendlyName(false));
System.out.println("Address: "+device.getBluetoothAddress());
// Get the RSSI value
int rssi = RemoteDeviceHelper.readRSSI(device);
System.out.println("Device: " + device.getBluetoothAddress() + ", RSSI: " + rssi);
}
} catch (Exception e) {
e.printStackTrace();
}
}
