-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,322 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>cc2650-driver</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ManifestBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.SchemaBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.pde.PluginNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
eclipse.preferences.version=1 | ||
pluginProject.equinox=false | ||
pluginProject.extensions=false | ||
resolve.requirebundle=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2019 Shigeru Ishida | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: java driver for ti sensortag cc2650 | ||
Bundle-SymbolicName: cc2650-driver | ||
Bundle-Version: 0.1.0 | ||
Automatic-Module-Name: cc2650-driver | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
Import-Package: com.github.hypfvieh;version="0.1.2", | ||
com.github.hypfvieh.bluetooth;version="0.1.2", | ||
com.github.hypfvieh.bluetooth.wrapper;version="0.1.2", | ||
org.bluez;version="0.1.2", | ||
org.bluez.exceptions;version="0.1.2", | ||
org.freedesktop.dbus.exceptions;version="3.0.2", | ||
org.freedesktop.dbus.handlers;version="3.0.2", | ||
org.freedesktop.dbus.interfaces;version="3.0.2", | ||
org.freedesktop.dbus.messages;version="3.0.2", | ||
org.freedesktop.dbus.types;version="3.0.2", | ||
org.slf4j;version="[1.7.25,1.8.0)" | ||
Export-Package: io.github.s5uishida.iot.device.tisensortag.cc2650.driver;version="0.1.0" | ||
Bundle-Vendor: Shigeru Ishida (s5uishida) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,60 @@ | ||
# cc2650-driver | ||
# cc2650-driver | ||
cc2650-driver is a java library for using [TI SensorTag CC2650](http://processors.wiki.ti.com/index.php/CC2650_SensorTag_User's_Guide) by [bluez-dbus](https://github.com/hypfvieh/bluez-dbus) with [BlueZ](http://www.bluez.org/) version 5.50 on linux OS. I releases this in the form of the Eclipse plug-in project. | ||
You need Java 8 or higher. | ||
|
||
CC2650 is powered by a button battery **CR2032**. From CC2650, cc2650-driver get battery level and the following sensor information. | ||
|
||
- System information | ||
- Firmware version | ||
- Battery level | ||
The battery level is available for firmware 1.30 or higher. | ||
|
||
- Sensors | ||
- IR Temperature (Object / Ambience) | ||
- Relative humidity | ||
- Barometric pressure | ||
- Optical | ||
- Movement (Gyroscope / Accelerometer / Magnetometer) | ||
|
||
There are two ways to acquire data from various sensors of CC2650. | ||
- Direct reading | ||
- Notification | ||
The data acquisition interval that can be specified by notification is 2550 (msec) at maximum. | ||
|
||
In addition, for `Movement`, when CC2650 detects a shake using Wake-On-Motion function, it may notify ` Movement` data at a time interval specified by notification for 10 seconds. | ||
|
||
I do not know how long CC2650 battery is effective. In addition, it seems that the sensors of `Movement` has relatively large power consumption. When the battery level reached approximately 60%, empirically CC2650 could not work properly. | ||
|
||
I have confirmed that it works in Raspberry Pi 3B ([Raspbian Buster Lite OS](https://www.raspberrypi.org/downloads/raspbian/) (2019-07-10)). | ||
|
||
## Install Raspbian Buster Lite OS (2019-07-10) | ||
The reason for using this version is that it is the latest as of July 2019 and [BlueZ](http://www.bluez.org/) 5.50 is included from the beginning. | ||
|
||
## Install jdk11 on Raspberry Pi 3B | ||
For example, [jdk11 apt-install](https://apt.bell-sw.com/) at [BELLSOFT](https://bell-sw.com/) is shown below. | ||
``` | ||
# wget -q -O - https://download.bell-sw.com/pki/GPG-KEY-bellsoft | apt-key add - | ||
# echo "deb [arch=armhf] https://apt.bell-sw.com/ stable main" | tee /etc/apt/sources.list.d/bellsoft.list | ||
# apt-get update | ||
# apt-get install bellsoft-java11 | ||
``` | ||
|
||
## Install git | ||
If git is not included, please install it. | ||
``` | ||
# apt-get install git | ||
``` | ||
|
||
## Use this with the following bundles | ||
- [SLF4J 1.7.26](https://www.slf4j.org/) | ||
- [Apache Commons Lang 3.9](https://commons.apache.org/proper/commons-lang/) | ||
- [dbus-java-with-java-utils-osgi 3.0.2](https://github.com/s5uishida/dbus-java-with-java-utils-osgi) | ||
- [bluez-dbus-osgi 0.1.2](https://github.com/s5uishida/bluez-dbus-osgi) | ||
|
||
I would like to thank the authors of these very useful codes, and all the contributors. | ||
|
||
## How to use | ||
The following sample codes included in CC2650Driver.java will be helpful. | ||
- CC2650Driver#testRead() | ||
- CC2650Driver#testNotification() | ||
- CC2650Driver#testWakeOnMotion() |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source.. = src/ | ||
output.. = bin/ | ||
bin.includes = META-INF/,\ | ||
.,\ | ||
LICENSE |
Oops, something went wrong.