Giter Club home page Giter Club logo

ble-java's Introduction

ble-java logo

ble-java is a java library for building BLE GATT peripherals role application in JAVA.

ble-java is based on BlueZ, the linux Bluetooth stack.

Features

  • Create GATT Services
  • Create GATT Characteristic
  • Customize the Peripheral name
  • Pure JAVA library

Dependencies

  1. Java 8 or better
  2. BlueZ 5.43 or better
  3. d-bus Java library libdbus-java Raspbian example:
sudo apt-get install

you may also have to do run

sudo ldconfig

Install

Clone the repository and build with Gradle (4.5 or higher):

gradle build

Example

You could see the main MainExample.java in src/test/java/example. It's a sample main that create a BLE Application with one Service and 2 Characteristic.

BlueZ compatibility

Until now is tested with BlueZ 5.46 on Raspbian distribution.

ble-java use the GattManager and LEAdvertising that was marked "Experimental" since 5.47, so you have to enable the Experimental features with the --experimental parameter in the BlueZ startup service.

Example for Raspbian /lib/systemd/system/bluetooth.service

...
bluetoohd --experimental
...

In the BlueZ 5.48 seem to be removed the experimental tag on the LEAdvertising features, but it was not yet tried.

For more info about BlueZ see http://www.bluez.org.

Help

If you need help you can write me an email or you can open a new issue.

ble-java's People

Contributors

sobakasu avatar tongo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.