I'm trying to connect to a Bluetooth Low-Energy (BLE) Sensor using Java. So far I searched for a library that interfaces with the BlueZ stack on my Linux.
The only free library I found for Java was Bluecove but it seems, that they don't implement BLE. I checked if my BT dongle was working and recognizing the sensor using Linux command line tools
sudo hcitool lescan
gatttool -i hci0 -b XX:XX:XX:XX:XX:XX -I
and it worked without problems.
After that I tried the Bluecove example for DeviceDiscovery but my sensor didn't show up instead it scanned for normal BT devices. I couldn't find a way to scan for BLE devices.
Doing further research I came to the conclusion that Bluecove just implements JSR-82. If I'm not mistaken this standard is older than BLE and therefore doesn't implement it.
Are there any alternatives to Bluecove that support BLE in Java? I mean there should be because Android has no problems (in newer versions) to communicate with BLE devices.
Thanks in advance!
After looking into this a while later I found an answer named TinyB.
https://software.intel.com/en-us/java-for-bluetooth-le-apps
TinyB is a BluetoothLE implementation by Intel and it features a Java SDK. So far I've been able to achieve everything I tried.
Hope this helps others stumbling across this topic.
一个有趣的选择是使用Kura蓝牙LE API ,它建立在TinyB库之上。
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.