Skip to content

API Enhancements #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

API Enhancements #2

wants to merge 5 commits into from

Conversation

gmatrangola
Copy link

Here are the changes we talked about. Mostly, it passes a little more information about the connection up to the calling app. This includes the BT Address and D-Bus Path of the local Bluetooth adapter and the connecting adapters.

The build.gradle was updated to run on Ubuntu and Raspbian and a runExample target was added.

The README.md was updated to reflect the changes.

Geoff Matrangola added 4 commits January 28, 2018 11:39
* BleApplicationListener.deviceConnected and BleApplicationListener.deviceDisconnected now have a path parameter. The path that is assigned by BlueZ D-Bus for the remote device that connected to the local Bluetooth adapter. deviceConnected also provides the unique Bluetooth Address of the remote Bluetooth Device.
* BleCharacteristicListener.getValue and setValue now take a devicePath. If more than one device is connected to the characteristic, the correct one will read/receive the value.
* BleCharacteristic.sendNotification now has a devicePath parameter to the notification can be sent to the proper device if multiple devices are listening.
* BleCharacteristic now implements a getValue and setValue that can be overridden as an alternative to using the listener.
* Created BleAdapter utility object to consolidate information about the local Bluetooth Adapter
* Changed BleApplicaton.findAdapterPath to return the object
* Added BleApplication.getBleAdapter method to return the Adapter currently being used by the BleApplication
* Updated ExampleMain and ExampleCharacteristic to test and demonstrate the above changes.
* Updated the build.gradle file so that it would work with more systems and IDEs.
* Added runExample target in the build.gradle so that the example can be more easily run on the command line
* Added example.conf to allow the example to run without elevated permissions
* Added instructions to run the example from the command line and for the example.conf to README.md
* Suggested using ./gradlew rather than requiring the user to install a specific version of Gradle. https://docs.gradle.org/current/userguide/gradle_wrapper.html
* Fixed install instructions in READEME.md
* General wordsmithing of the README.md
* Added JetBrains IntilliJ project files to the .gitignore
 * Added some more informaiton to the README.md
 * created an example.conf to configure D-Bus properly
* put java-library back
* using implementation instead of compile to match latest version of gradle
* fixed spelling error in method name.
@magillus
Copy link

👍 Can we merge this PR?

@magillus
Copy link

FYI: https://github.com/magillus/ble-java I merged both forks and added some extra logging info - per #12

* Updated to Gradle 5.6.2 - Compatible with Java 11 (OpenJDK)
* PUt sleeps back in the ExampleMain for testing

# Conflicts:
#	.gitignore
#	src/main/java/it/tangodev/ble/BleApplication.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants