Skip to content

Commit

Permalink
[bluetooth.bluez] Complete Bluez rewrite (openhab#8819)
Browse files Browse the repository at this point in the history
Also-by: Connor Petty <[email protected]>
Signed-off-by: Benjamin Lafois <[email protected]>
  • Loading branch information
blafois authored Oct 25, 2020
1 parent e7da34a commit eb15a33
Show file tree
Hide file tree
Showing 33 changed files with 1,880 additions and 664 deletions.
48 changes: 24 additions & 24 deletions bundles/org.openhab.binding.bluetooth.bluez/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,33 @@ https://github.com/openhab/openhab-addons

== Third-party Content

TinyB Version: 0.5.1
BlueZ-DBus Version: 0.1.3
* License: MIT License
* Project: https://github.com/intel-iot-devkit/tinyb
* Source: https://github.com/intel-iot-devkit/tinyb/tree/v0.5.1
* Project: https://github.com/hypfvieh/bluez-dbus
* Source: https://github.com/hypfvieh/bluez-dbus

== Third-party license(s)

=== MIT License

The MIT License (MIT)
Copyright © 2015-2016 Intel Corporation

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
MIT License

Copyright (c) 2017 David M.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
5 changes: 3 additions & 2 deletions bundles/org.openhab.binding.bluetooth.bluez/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Bluetooth BlueZ Adapter

This extension supports Bluetooth access via BlueZ on Linux (ARMv6hf).
This extension supports Bluetooth access via BlueZ and DBus on Linux. This is architecture agnostic and uses Unix Sockets.

# Setup

Expand Down Expand Up @@ -44,14 +44,15 @@ It defines the following bridge type:
|----------------|---------------------------------------------------------------------------|
| bluez | A Bluetooth adapter that is supported by BlueZ |


## Discovery

If BlueZ is enabled and can be accessed, all available adapters are automatically discovered.


## Bridge Configuration

The bluez bridge requires the configuration parameter `address`, which corresponds to the Bluetooth address of the adapter (in format "XX:XX:XX:XX:XX:XX").

Additionally, the parameter `backgroundDiscovery` can be set to true/false.When set to true, any Bluetooth device of which broadcasts are received is added to the Inbox.

## Example
Expand Down
11 changes: 7 additions & 4 deletions bundles/org.openhab.binding.bluetooth.bluez/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,21 @@
<name>openHAB Add-ons :: Bundles :: BlueZ Bluetooth Adapter</name>

<dependencies>

<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.bluetooth</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.openhab.osgiify</groupId>
<artifactId>intel-iot-devkit.tinyb</artifactId>
<version>0.5.1</version>
<scope>compile</scope>
<groupId>com.github.hypfvieh</groupId>
<artifactId>bluez-dbus-osgi</artifactId>
<version>0.1.3</version>
<scope>provided</scope>
</dependency>

</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

<feature name="openhab-binding-bluetooth-bluez" description="Bluetooth Binding Bluez" version="${project.version}">
<feature>openhab-runtime-base</feature>
<feature>openhab-transport-serial</feature>

<bundle dependency="true">mvn:com.github.hypfvieh/bluez-dbus-osgi/0.1.3</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.bluetooth/${project.version}</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.bluetooth.bluez/${project.version}</bundle>
</feature>
Expand Down
Loading

0 comments on commit eb15a33

Please sign in to comment.