This is a small proof of concept showing how to read RuuviTags with Java. It uses the Intel tinyb library, which supports ARM and x86 Linux platforms. No hcitool, hcidump in site.
Tinyb works fine on modern linux systems, but it is all but abandonware ( see #168).
The Linux kernel bluez driver suppresses multiple advertisements sent from the same BLE device. As of
this writing, this cannot be changed.
See this thread in the linux-bluetooth mailing list. - dhalbert's comment on GitHub.
There is a workaround (see linked github issue), but it requires root privileges.
You'll need a build environment setup (gcc, cmake, glib2-devel, etc).
git clone https://github.com/intel-iot-devkit/tinyb.git
mkdir build
cd build
cmake .. -DBUILDJAVA=ON
make
make install
This will install the native library into /usr/local/lib64 and the jar into /usr/local/lib/java.
ruuvitag-common is a little library that parses the binary payload emitted by the tags. You can get the jar from the releases page.
The example is no frills. No maven, no gradle. None of that. Just two jars.
Add them to your classpath with your IDE. Compile and run Main.