manniru / bluecove

Automatically exported from code.google.com/p/bluecove
0 stars 0 forks source link

Can not read RSSI with Widcomm, failing to get connection info, common.cpp:166 #87

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Discover a 220Plantronics headset with Widcomm (though I expect the
problem to be more broad than that).

2. Try either 

 LocalDevice.getProperty("bluecove.nativeFunction:getRemoteDeviceRSSI:" +
btDevice.getBluetoothAddress());

or (under 2.1.1 shapshot) 
    int i = RemoteDeviceHelper.readRSSI(btDevice);

What is the expected output? What do you see instead?
Expected an int. Instead, throws an IOException:

00:24:41.353 will throw exception java/io/IOException(Fail to get
connection info)
      common.cpp:166

java.io.IOException: Fail to get connection info
    at com.intel.bluetooth.BluetoothStackWIDCOMM.getRemoteDeviceRSSI(Native
Method)
    at
com.intel.bluetooth.BluetoothStackWIDCOMM.readRemoteDeviceRSSI(BluetoothStackWID
COMM.java:316)
    at
com.intel.bluetooth.RemoteDeviceHelper.readRSSI(RemoteDeviceHelper.java:568)
    at
my.bluetooth.MyRemoteDeviceDiscovery$1.deviceDiscovered(MyRemoteDeviceDiscovery.
java:43)
    at
com.intel.bluetooth.BluetoothStackWIDCOMM$1.deviceDiscoveredCallback(BluetoothSt
ackWIDCOMM.java:437)
    at com.intel.bluetooth.BluetoothStackWIDCOMM.runDeviceInquiryImpl(Native
Method)
    at
com.intel.bluetooth.BluetoothStackWIDCOMM.access$000(BluetoothStackWIDCOMM.java:
43)
    at
com.intel.bluetooth.BluetoothStackWIDCOMM$1.runDeviceInquiry(BluetoothStackWIDCO
MM.java:376)
    at com.intel.bluetooth.DeviceInquiryThread.run(DeviceInquiryThread.java:103)

What BlueCove version are you using (include build number for SNAPSHOT)? 
Both 2.1.0 and 2.1.1 snapshot.

On what operating system and jvm? Is this 64-bit or 32-bit OS and jvm?
1.6.0_16; Java HotSpot(TM) Client VM; Sun Microsystems Inc.
Vista 32 bit

Please provide any additional information below.
Am running a RemoteDeviceDiscovery.java from your examples, with the two
lines above added to deviceDiscovered().

Original issue reported on code.google.com by abc6...@gmail.com on 3 Oct 2009 at 7:41

GoogleCodeExporter commented 9 years ago
Correction. On version 2.1.0,  

LocalDevice.getProperty("bluecove.nativeFunction:getRemoteDeviceRSSI:" +
btDevice.getBluetoothAddress());

does not throw an exception, but returns -1, always.

Original comment by abc6...@gmail.com on 3 Oct 2009 at 8:40

GoogleCodeExporter commented 9 years ago
I had the same problem and it seems that the reason for the problem occurring 
is 
that you need to have a connection to the device before you can inquire the 
RSSI.
Here is where my problem surfaces, as I do not really want to have a 
connection, as 
I am just scanning for devices and I would like to know if they are close or 
far to 
me. Not in meters, but on some relative scale (RSSI). If you have to establish 
a 
connection you also have to allow this on the remote device which is cumbersome 
and 
not really possible to do automatically.
Is there a serviceUUID that allows a connection without exchange of pin-codes 
or the 
like?
Best regards,
Nicolai Schou

Original comment by pali...@gmail.com on 24 Jan 2010 at 1:20

GoogleCodeExporter commented 9 years ago
Performing a services search is enough to get some connections established and 
to read RSSI value.

Original comment by fernando...@gmail.com on 20 Dec 2011 at 11:20

GoogleCodeExporter commented 9 years ago
I am having a similar problem with my code..do you still have your code if so 
do you mind if I have a look at it??

Original comment by averyand...@gmail.com on 9 Jul 2012 at 6:27