Reputation: 12730
BlueCove is a Java library for Bluetooth, for MsWindows, Mac OSX and others.
but it seems that it does not support Bluetooth Low Enegry 4.0.
Android has a standard Java library for Bluetooth LE 4.0: http://developer.android.com/guide/topics/connectivity/bluetooth.html
Is there a Java library for Bluetooth LE 4.0 for MsWindows and/or Mac OSX?
Upvotes: 20
Views: 14367
Reputation: 68
This could probably be achieved by creating JNI ( java native interface ) wrappers around c++ libraries on windows. Project Panama is more recent and I guess it was created to replace all the hardwork of working with JNI, but I'm still mentioning this because I found a repo that has written some JNI wrappers to access ble on windows. I haven't tested it myself and I'm not sure what functionalities it provides, but it should definitely help.
Upvotes: 0
Reputation: 322
Intel's Edison project has a small wrapper API (read JNI) for BlueZ libs under Yocto Linux that gives full BLE support. You can find the source code in Github; intel-iot-devkit/tinyb
UPDATE 2021: There is now the possibility with Project Panama that native Bluetooth can be supported in Java. You would need to know a little about the platform and the library to use it. See Project Panama for more information; projects/panama
Upvotes: 4
Reputation: 164
Did you try with Intel-IoT or Eclipse Kura projects? I am trying to work over them, but it seems they relay over bluez, and that means only linux and macos...
Implementing it via basic javascript under the browser could be a solution, but is still experimental into browsers and needs https, which is a problem under java desktop applications.
It can't be that no one has achieve this before and it's the first time I see this under java.
Any more help on this topic would be great!
Upvotes: 1
Reputation: 91
After a long search without success on the same subject for myself, I'm pretty sure that there at present no library providing support Bluetooth LE on J2SE ...
JSR82 is for bluetooth 2.x only, and Bluetooth 4.x (Bluetooth LE) is a very different protocol.
So, this may be a good idea to start a new project on the subject, based for example on the bluez stack on linux (or equivalent for MacOS X and Windows) or doing something like BGAPI (which apparently implements the bluetooth networking protocol, with links to a specific device)
Upvotes: 5