org.sputnikdev:bluetooth-utils

Bluetooth Smart utilities

License

License

GroupId

GroupId

org.sputnikdev
ArtifactId

ArtifactId

bluetooth-utils
Last Version

Last Version

1.14
Release Date

Release Date

Type

Type

jar
Description

Description

org.sputnikdev:bluetooth-utils
Bluetooth Smart utilities
Project URL

Project URL

https://github.com/sputnikdev/bluetooth-utils
Project Organization

Project Organization

Sputnik Dev
Source Code Management

Source Code Management

https://github.com/sputnikdev/bluetooth-utils/tree/master

Download bluetooth-utils

How to add to project

<!-- https://jarcasting.com/artifacts/org.sputnikdev/bluetooth-utils/ -->
<dependency>
    <groupId>org.sputnikdev</groupId>
    <artifactId>bluetooth-utils</artifactId>
    <version>1.14</version>
</dependency>
// https://jarcasting.com/artifacts/org.sputnikdev/bluetooth-utils/
implementation 'org.sputnikdev:bluetooth-utils:1.14'
// https://jarcasting.com/artifacts/org.sputnikdev/bluetooth-utils/
implementation ("org.sputnikdev:bluetooth-utils:1.14")
'org.sputnikdev:bluetooth-utils:jar:1.14'
<dependency org="org.sputnikdev" name="bluetooth-utils" rev="1.14">
  <artifact name="bluetooth-utils" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.sputnikdev', module='bluetooth-utils', version='1.14')
)
libraryDependencies += "org.sputnikdev" % "bluetooth-utils" % "1.14"
[org.sputnikdev/bluetooth-utils "1.14"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.8.2

Project Modules

There are no modules declared in this project.

Maven Central Build Status Coverage Status Codacy Badge Join the chat at https://gitter.im/sputnikdev/bluetooth-utils

bluetooth-utils

A small library of utility classes to work with Bluetooth Smart objects.

Features:

Bluetooth Uniform Resource Locator (URL).

Bluetooth URL diagram

A utility class that represents a Uniform Resource Locator for bluetooth resources, e.g. bluetooth adapters, bluetooth devices, GATT services, GATT characteristics and GATT fields.

For example, if you have an adapter with MAC address B8:27:EB:60:0C:43, a device with MAC address 54:60:09:95:86:01 which is connected to the adapter, the device has a GATT service with UUID 0000180f-0000-1000-8000-00805f9b34fb, the service has a characteristic with UUID 00002a19-0000-1000-8000-00805f9b34fb and the characteristic has a field called "Level", then a URL for the field can be:

/B8:27:EB:60:0C:43/54:60:09:95:86:01/0000180f-0000-1000-8000-00805f9b34fb/00002a19-0000-1000-8000-00805f9b34fb/Level

Or a URL for the service can be:

/B8:27:EB:60:0C:43/54:60:09:95:86:01/0000180f-0000-1000-8000-00805f9b34fb

Similarly, it is easy to define a URL for other components, e.g. adapters, devices and characteristics.

If there are more than one protocol used to access Bluetooth devices (e.g. DBus, serial interface etc), then it is possible to define protocol as well:

tinyb://B8:27:EB:60:0C:43/54:60:09:95:86:01/0000180f-0000-1000-8000-00805f9b34fb/00002a19-0000-1000-8000-00805f9b34fb/Level

A simple usage would be:

URL url = new URL("/54:60:09:95:86:01/11:22:33:44:55:66/0000180f-0000-1000-8000-00805f9b34fb/00002a19-0000-1000-8000-00805f9b34fb/Level");

The class is reasonable documented, check its javadoc. More examples can be found here.


Contribution

You are welcome to contribute to the project, the project environment is designed to make it easy by using:

  • Travis CI to release artifacts directly to the Maven Central repository.
  • Code style rules to support clarity and supportability. The results can be seen in the Codacy.
  • Code coverage reports in the Coveralls to maintain sustainability. 100% of code coverage with unittests is the target.

The build process is streamlined by using standard maven tools.

To build the project with maven:

mvn clean install

To cut a new release and upload it to the Maven Central Repository:

mvn release:prepare -B
mvn release:perform

Travis CI process will take care of everything, you will find a new artifact in the Maven Central repository when the release process finishes successfully.

Versions

Version
1.14
1.13
1.12
1.11
1.10
1.9
1.8
1.7
1.6
1.5
1.4
1.3
1.2
1.1
1.0