Multiple bluetooth usb dongles on MS Stack

412 views
Skip to first unread message

Vlad Skarzhevskyy

unread,
Apr 7, 2008, 5:09:19 PM4/7/08
to bluecove-users
Hi BlueCove Users
As I see Microsoft bluetooth API support multiples bluetooth devices
(adapters) so Windows XP should be able have have more then one usb
bluetooth radio installed and working.

Does anybody ever have seen this configuration running?

I tried to use two dongles but I always get: "This device cannot
start. (Code 10)" for second device inserted into computer. No
matter what combination I tired the first plugged device works fine
but the second can't start.

--
Vlad

skarzh...@gmail.com

unread,
Apr 7, 2008, 7:31:24 PM4/7/08
to bluecove-users
Ok here is the answer from Microsoft:

Darrell Gorter from Microsoft wrote in 2004: "the multiple Bluetooth
Dongles are not supported"

End of story. The API defined in MSDN is probably for future....

If you still want to use Multiple bluetooth usb dongles on one Windows
computer I suggest to install WMware and run many windows on one PC.
Each windows to support one Bluetooth Dongles.

For the rest there are Linux version of BlueCove. In the latest 2.0.3
build new functions BlueCoveImpl.useThreadLocalBluetoothStack()
getThreadBluetoothStackID() and setThreadBluetoothStackID(...) has
been introduced. See java docs for more details.
This allows you to use Multiple Adapters in the same JVM. The same
approach can be used on Windows to run widcomm and winsock at the same
time in one JVM. So you would have two LocalDevice at the same time
in different threads.

N.B. This does not change the JSR-82. This is only BlueCove specific
functions to bind different stacks/adapters to different threads.

--
Vlad

lalfonso

unread,
Apr 8, 2008, 6:09:10 AM4/8/08
to bluecove-users
Hello,
I am trying to work with two usb dongles in my application. I use 64
bits Fedora Linux.
I am testing the new functions
BlueCoveImpl.useThreadLocalBluetoothStack()
getThreadBluetoothStackID() and setThreadBluetoothStackID(...) .
I have tested the example that appears in documentation but I have two
problems. First, when I call LocalDevice.getProperty("bluecove.stack")
always returns bluez. The second depends on beta version

TESTS with bluecove-2.0.3-20080407.050219-49.jar
------------------------------------------------------
getThreadBluetoothStackID() always return null.


TEST with bluecove-2.0.3-20080408.060955-51.jar
----------------------------------------------------
getThreadBluetoothStackID() throws an exception

Exception in thread "main" java.lang.Error: Illegal use of the JSR-82
API
at com.intel.bluetooth.Utils.isLegalAPICall(Utils.java:285)
at
com.intel.bluetooth.BlueCoveImpl.getBluetoothStack(BlueCoveImpl.java:
726)
at
com.intel.bluetooth.BlueCoveImpl.getThreadBluetoothStackID(BlueCoveImpl.java:
505)
at pruebas.pbluecoves.main(pbluecoves.java:23)
Java Result: 1


Thank you in advance.
Luis

DOC EXAMPLE
----------------
BlueCoveImpl.useThreadLocalBluetoothStack();
BlueCoveImpl.setConfigProperty("bluecove.stack", "widcomm");

final Object id1 = BlueCoveImpl.getThreadBluetoothStackID();
... do some work with stack 1

Thread t1 = new Thread() {
public void run() {
BlueCoveImpl.setThreadBluetoothStackID(id1);
agent = LocalDevice.getLocalDevice().getDiscoveryAgent();
agent.startInquiry(...);
.....
}
}
t1.start();

// Start another thread that is using different stack
Thread t2 = new Thread() {
public void run() {
BlueCoveImpl.setConfigProperty("bluecove.stack", "winsock");
agent = LocalDevice.getLocalDevice().getDiscoveryAgent();
agent.startInquiry(...);
.....
}
}
t2.start();


On 8 abr, 01:31, "skarzhevs...@gmail.com" <skarzhevs...@gmail.com>
wrote:

lalfonso

unread,
Apr 8, 2008, 6:18:18 AM4/8/08
to bluecove-users
Hello,
I working with bluecove 2.0.3 in 64 bits Fedora Linux.
I am testing the new functions but I have found two problems. First,
LocalDevice.getProperty("bluecove.stack") always returns bluez. On the
other hand, the getThreadBluetoothStackID() function doesn't work
property. If I use the April 7 snapshot of bluecove returns null and
with April 8 snapshot throws this exception

Exception in thread "main" java.lang.Error: Illegal use of the JSR-82
API
at com.intel.bluetooth.Utils.isLegalAPICall(Utils.java:285)
at
com.intel.bluetooth.BlueCoveImpl.getBluetoothStack(BlueCoveImpl.java:
726)
at
com.intel.bluetooth.BlueCoveImpl.getThreadBluetoothStackID(BlueCoveImpl.java:
505)
at pruebas.pbluecoves.main(pbluecoves.java:23)
Java Result: 1

Thanks you in advance.
Luis.

On 8 abr, 01:31, "skarzhevs...@gmail.com" <skarzhevs...@gmail.com>
wrote:

Vlad Skarzhevskyy

unread,
Apr 8, 2008, 12:56:30 PM4/8/08
to bluecov...@googlegroups.com
Hi Luis
Sorry for confusion... This is still work in progress and I have not
committed to SVN the final working version when I wrote e-mail. It
require much more work than I initial estimated. Since the nightly
build I made some progress you may get version from svn and see that
it works. I will force a new build later when I finish the
DeviceInquiry.

Regarding "bluecove.stack" you will get "bluez" on Linux all the time.
You should use "bluecove.deviceID" to use different adapters in your
case. I updated java docs.

I really appreciate you using the new Betta functionality as soon as
it has been created.

Regards,
Vlad

lalfonso

unread,
Apr 9, 2008, 4:12:53 AM4/9/08
to bluecove-users
Hi Vlad
Now it works perfectly. I have tested the new functions with three
threads and two dongles.
One of them controls one dongle and the others share the other dongle.

Regards,
Luis.
Reply all
Reply to author
Forward
0 new messages