Skip to content

4lml4/simpleBLEJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

simpleBLEJava

Java Native Access Bindings for SimpleBLE

Requirements

Java Native Access Libraries: jna-platform, jna (https://github.com/java-native-access/jna/tree/master)

SimpleBLE .dylib, .dll or .so files (in /SimpleBLE/build/install/lib/): https://github.com/OpenBluetoothToolbox/SimpleBLE/releases

Tested with: jna-platform and jna v5.14.0 simpleble v0.7.1 (macos-x86_64)

To run

Change line 16 of SimpleBLE.java file to point to the location of the simpleble-c files

Create a new instance of SimpleBLE in your main Java program: SimpleBLE simpleble = new SimpleBLE();

Call functions defined in SimpleBLE.java lines 135 onwards using the simpleble instance:

  • simpleble.getAdapterCount()
  • adapter = simpleble.getAdapterHandle(0)
  • peripheral = simpleble.getPeripheralhandle(adapter, selectedDeviceInt)

About

Java JNR-FFI Bindings for SimpleBLE

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages