简体   繁体   中英

Java - bluetooth connectivity

I have a Java program ready to make the local device wait for incoming bluetooth connections and, when a connection is attempted, the acceptAndOpen() method will be called.

But, every time a connection is attempted, instead of the program responding to the request, the default bluetooth manager gives a default pop up showing:

A device wants to connect to your device.

Is there a way to override the default widcomm stack by the program using winsock through bluetooth API?

If automatic Bluetooth Stack detection is not enough Java System property "bluecove.stack" can be used to force desired Stack Initialization. Values "widcomm", "bluesoleil" or "winsock". By default winsock is selected if available.

Another property "bluecove.stack.first" is used optimize stack detection. If -Dbluecove.stack.first=widcomm then widcomm (bluecove.dll) stack is loaded first and if not available then BlueCove will switch to winsock. By default intelbth.dll is loaded first.

If multiple stacks are detected they are selected in following order: "winsock", "widcomm", "bluesoleil". Since BlueCove v2.0.1 "bluecove.stack.first" will alter the order of stack selection.

For more details see: http://bluecove.org/bluecove/apidocs/com/intel/bluetooth/BlueCoveImpl.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM