mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2025-12-19 15:34:26 +01:00
Readme update
This commit is contained in:
71
README.md
71
README.md
@@ -1,83 +1,64 @@
|
|||||||
# nRF Toolbox
|
# nRF Toolbox
|
||||||
|
|
||||||
The nRF Toolbox is a container app that stores your Nordic Semiconductor apps for Bluetooth Low Energy
|
The nRF Toolbox is a container app that stores your Nordic Semiconductor apps for Bluetooth Low Energy in one location.
|
||||||
in one location.
|
|
||||||
|
|
||||||
It contains applications demonstrating standard Bluetooth LE profiles:
|
It contains applications demonstrating standard Bluetooth LE profiles:
|
||||||
* **Cycling Speed and Cadence**,
|
* **Cycling Speed and Cadence**
|
||||||
* **Running Speed and Cadence**,
|
* **Running Speed and Cadence**
|
||||||
* **Heart Rate Monitor**,
|
* **Heart Rate Monitor**
|
||||||
* **Blood Pressure Monitor**,
|
* **Blood Pressure Monitor**
|
||||||
* **Health Thermometer Monitor**,
|
* **Health Thermometer Monitor**
|
||||||
* **Glucose Monitor**,
|
* **Glucose Monitor**
|
||||||
* **Continuous Glucose Monitor**,
|
* **Continuous Glucose Monitor**
|
||||||
* **Universal Asynchronous Receiver/Transmitter (UART)**,
|
* **Universal Asynchronous Receiver/Transmitter (UART)**
|
||||||
* **Throughput**,
|
* **Throughput**
|
||||||
* **Direction Finder**,
|
* **Direction Finder**
|
||||||
* **Blinky (LBS) Service**
|
* **Blinky (LBS) Service**
|
||||||
|
|
||||||
**_NOTE:_** The Proximity profile is not included in this version of the app. If you need it, please download the previous version.
|
**_NOTE:_** The Proximity profile is not included in this version of the app. If you need it, please download the previous [version](https://github.com/NordicSemiconductor/Android-nRF-Toolbox/releases/tag/3.3.1).
|
||||||
|
|
||||||
### How to import to Android Studio
|
### How to import to Android Studio
|
||||||
|
|
||||||
The production version of nRF Toolbox depends on
|
The production version of nRF Toolbox depends on
|
||||||
[Kotlin BLE Library](https://github.com/NordicSemiconductor/Kotlin-BLE-Library) and demonstrates
|
[Kotlin BLE Library](https://github.com/NordicSemiconductor/Kotlin-BLE-Library). The single profile implementation This also utilizes [Android BLE Common Library](https://github.com/NordicPlayground/Android-Common-Libraries),
|
||||||
use of the [Android BLE Common Library](https://github.com/NordicPlayground/Android-Common-Libraries),
|
which contains utility classes such as Bluetooth LE permission, Bluetooth LE scanner, and so on, used by apps developed by Nordic Semiconductor.
|
||||||
which contains utility classes used by apps developed by Nordic Semiconductor.
|
|
||||||
|
|
||||||
You may also include the BLE Library and BLE Common Library as modules. Clone the library project
|
You may also include the BLE Library and the BLE Common Library as modules. Clone the library project
|
||||||
to the same root folder.
|
to the same root folder.
|
||||||
|
|
||||||
If you prefer a different name for BLE library, update the
|
If you prefer a different name for the BLE library, update the
|
||||||
[*settings.gradle*](https://github.com/NordicSemiconductor/Android-nRF-Toolbox/blob/master/settings.gradle)
|
[*settings.gradle*](https://github.com/NordicSemiconductor/Android-nRF-Toolbox/blob/master/settings.gradle)
|
||||||
file.
|
file.
|
||||||
|
|
||||||
If you get ["Missing Feature Watch" error](https://github.com/NordicSemiconductor/Android-nRF-Toolbox/issues/41#issuecomment-355291101),
|
If you get ["Missing Feature Watch" error](https://github.com/NordicSemiconductor/Android-nRF-Toolbox/issues/41#issuecomment-355291101), switch the configuration to 'app'.
|
||||||
switch the configuration to 'app'.
|
|
||||||
|
|
||||||
### BleManager and how to use it
|
### BLE Connection
|
||||||
|
|
||||||
There are 2 different solutions how to use the manager shown in different profiles.
|
The BLE connection is maintained by running a service. The service starts to connect to a device and stops when the user decides to disconnect from it. When an activity is destroyed, it unbinds from the service; however, the service remains running, allowing incoming data to continue being handled. The service keeps all device-related data and may be obtained by an activity when it binds to it to be shown to the user. Instead of maintaining individual profile service, this structure will create one service for all connected devices.
|
||||||
The very basic approach is used by the BPS nd GLS profiles. Each of those activities holds a
|
To add a new profile, create a subtype of _ServiceManager_, which provides logic for observing data interactions with Bluetooth devices.
|
||||||
static reference to the manager. Keeping the manager as a view model object protects from disposing it
|
|
||||||
when device orientation changes and the activities are being destroyed and recreated. However, this
|
|
||||||
approach does not allow to keep the connections in background mode and therefore is not a solution
|
|
||||||
that should be used in any production-ready application.
|
|
||||||
|
|
||||||
A better implementation may be found in CGMS, CSC, HRS, HTS, PRX, RSCS, UART. The `BleManager` instance is maintained
|
|
||||||
by the running service. The service is started in order to connect to a device and stopped when user
|
|
||||||
decides to disconnect from it. When an activity is destroyed it unbinds from the service, but the
|
|
||||||
service is still running, so the incoming data may continue to be handled. All device-related data
|
|
||||||
are kept by the service and may be obtained by a activity when it binds to it in order to be
|
|
||||||
shown to the user.
|
|
||||||
|
|
||||||
### Nordic UART Service
|
### Nordic UART Service
|
||||||
|
|
||||||
The UART profile allows for fast prototyping of devices. The service itself is very simple, having
|
The UART profile allows for fast prototyping of devices. The service itself is very simple, having
|
||||||
just 2 characteristics, one for sending data and one for receiving. The data may be any byte array
|
just 2 characteristics, one for sending data and one for receiving. UART preset configuration can be created as a separate profile.
|
||||||
but it is very often used with just text. Each UART configuration can be created as a separate profile.
|
|
||||||
Each of them, when pressed, will send the stored command to the device.
|
Each of them, when pressed, will send the stored command to the device.
|
||||||
You may export your configuration to XML and share between other devices. Swipe the screen to
|
|
||||||
right to show the log with all events.
|
|
||||||
|
|
||||||
### Device Firmware Update
|
**_NOTE:_** The Device Firmware Update (DFU) feature has been removed from this application and is now offered as a standalone app.
|
||||||
|
|
||||||
**DFU is now available as a separate application**
|
|
||||||
https://github.com/NordicSemiconductor/Android-DFU-Library
|
https://github.com/NordicSemiconductor/Android-DFU-Library
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|
||||||
nRF Toolbox depends on [Kotlin BLE Library](https://github.com/NordicSemiconductor/Kotlin-BLE-Library)
|
nRF Toolbox depends on [Kotlin BLE Library](https://github.com/NordicSemiconductor/Kotlin-BLE-Library)
|
||||||
which may to be cloned into the same root folder as this app. If you prefer a different name,
|
which may be cloned into the same root folder as this app. If you prefer a different name,
|
||||||
update the [*settings.gradle*](https://github.com/NordicSemiconductor/Android-BLE-Library/blob/master/settings.gradle) file.
|
update the [*settings.gradle*](https://github.com/NordicSemiconductor/Android-BLE-Library/blob/master/settings.gradle) file.
|
||||||
|
|
||||||
The nRF Toolbox also uses the nRF Logger API library which may be found here:
|
The nRF Toolbox also uses the nRF Logger API library, which may be found here:
|
||||||
https://github.com/NordicSemiconductor/nRF-Logger-API. The library is included in dependencies
|
https://github.com/NordicSemiconductor/nRF-Logger-API. The library is included in dependencies
|
||||||
in *build.gradle* file. This library allows the app to create log entries in the
|
in *build.gradle* file. This library allows the app to create log entries in the
|
||||||
[nRF Logger](https://play.google.com/store/apps/details?id=no.nordicsemi.android.log) application.
|
[nRF Logger](https://play.google.com/store/apps/details?id=no.nordicsemi.android.log) application.
|
||||||
Please, read the library documentation on GitHub for more information about the usage and permissions.
|
Please, read the library documentation on GitHub for more information about the usage and permissions.
|
||||||
|
|
||||||
The graph in HRM profile is created using the [MPAndroidChart v3.1.0](https://github.com/PhilJay/MPAndroidChart)
|
The graph in the HRM profile is created using the [MPAndroidChart v3.1.0](https://github.com/PhilJay/MPAndroidChart)
|
||||||
contribution based on the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0).
|
contribution based on the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0).
|
||||||
|
|
||||||
### Note
|
### Note
|
||||||
@@ -85,4 +66,4 @@ contribution based on the [Apache 2.0 license](http://www.apache.org/licenses/LI
|
|||||||
- Compatible with nRF5 devices running samples from the Nordic SDK and other devices implementing
|
- Compatible with nRF5 devices running samples from the Nordic SDK and other devices implementing
|
||||||
standard profiles.
|
standard profiles.
|
||||||
- Development kits: https://www.nordicsemi.com/Software-and-tools/Development-Kits.
|
- Development kits: https://www.nordicsemi.com/Software-and-tools/Development-Kits.
|
||||||
- The nRF5 SDK and SoftDevices are available online at http://developer.nordicsemi.com.
|
- The nRF5 SDK and SoftDevices are available online at http://developer.nordicsemi.com.
|
||||||
Reference in New Issue
Block a user