20

http://bluecove.org/

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?

David Portabella
  • 12,390
  • 27
  • 101
  • 182

3 Answers3

4

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)

elecomte
  • 81
  • 4
4

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

John Bryant
  • 327
  • 3
  • 11
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/12185774) – Shree Krishna Apr 29 '16 at 04:25
  • @ShreeKrishna, actually, it **is** the answer. – madhead Apr 29 '16 at 09:25
  • Happy to discover tinyb : at least, a solution exists now. So my (old) answer is no more relevant, and you should try this Intel project. – elecomte Sep 26 '16 at 16:06
  • 1
    I am happy to have helped somebody out. Sometimes Java's lack of ability to touch hardware drives me nuts. There are other aspects to the Intel Edison projects like I2C sensors (accelerometers, gyroscopes, temperature) called mraa and a layer on top called upm. Together with BLE you have real potential all using Java. Things like robotics is not only practical but fun and easy. – John Bryant Sep 28 '16 at 00:38
  • 1
    The readme for tinyb says that it "requires GLib/GIO 2.40+". That sounds like a linux library. Has anyone made this solution work on Windows? Thanks! – ssimm Jun 27 '17 at 10:35
  • where is the bluetooth part of panama page? i found nothing over there... @JohnBryant . – gumuruh Jan 30 '23 at 09:18
1

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!

Alberto Soto
  • 111
  • 3