# nRF Toolbox
The nRF Toolbox is a container app that stores your Nordic Semiconductor apps for Bluetooth Smart in one location.
It contains applications demonstrating Bluetooth Smart profiles:
* **Cycling Speed and Cadence**,
* **Running Speed and Cadence**,
* **Heart Rate Monitor**,
* **Blood Pressure Monitor**,
* **Health Thermometer Monitor**,
* **Glucose Monitor**,
* **Proximity Monitor**.
Since version 1.10.0 the *nRF Toolbox* also supports the **Nordic UART Service** which may be used for bidirectional text communication between devices.
**Note:** To get a smaller version, with only the DFU profile, switch to the *only_dfu* branch.
### Nordic UART Service
The UART profile allows for fast prototyping of devices. The service itself it very simple, having just 2 characteristics, one for sending data and one for receiving. The data may be any byte array but it is very often used with just text. Each UART configuration in the nRF Toolbox consists of 9 programmable buttons. 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.
Since nRF Toolbox version 1.16.0 the UART profile supports also Android Wear devices (watches). If you have an Android watch, the application will automatically be installed on it after you install or update the application on the phone. Before you start playing with the watch, please open the UART profile on the phone so it could share your configurations to all wearables.
The wearable application may work in 2 modes: as a remote control of the phone, or directly connected to a UART device.
1. Connect your phone to the UART device. After few seconds you should get a notification on the watch that your device is now connected. Swipe it left to see Disconnect button (will send a message to the phone to terminate the connection with UART target) and Open button. Click the Open button to see a list of your UART configurations. Click one and see the list of active buttons. When pressed the button will send a message to the phone using Google Play Services and the phone will send the command to the target device. In this mode you may have more than one watch connected to the phone and use both as remote controls.
![Scenario 1](resources/scenario_1.png)
2. Open the applications menu on Android Wear watch and click nRF Toolbox. The watch will now scan for all nearby Bluetooth Smart devices and show you them on a list. Select your UART device to connect to it. A list of your configurations will be shown, like in 1. As that was a direct connection from the watch to the UART target the phone, or any other watch will not be notified about it.
![Scenario 2](resources/scenario_2.png)
### Device Firmware Update
The **Device Firmware Update (DFU)** profile allows you to update the application, bootloader and/or the Soft Device image over-the-air (OTA). It is compatible with Nordic Semiconductor nRF51822 devices that have the S110 SoftDevice and bootloader enabled. From version 1.11.0 onward, the nRF Toolbox has allowed to send the required init packet. More information about the init packet may be found here: [init packet handling](https://github.com/NordicSemiconductor/nRF-Master-Control-Panel/tree/master/init%20packet%20handling).
The DFU has the following features:
- Scans for devices that are in DFU mode.
- Connects to devices in DFU mode and uploads the selected firmware (soft device, bootloader and/or application).
- Allows HEX or BIN file upload through your phone or tablet.
- Allows to update a soft device and bootloader from ZIP in one connection.
- Pause, resume, and cancel file uploads.
- Works in portrait and landscape orientation.
- Includes pre-installed examples that consist of the Bluetooth Smart heart rate service and running speed and cadence service.
#### DFU Settings
To open the DFU settings click the *Settings* button in the top toolbar when on DFU profile.
**Packet receipt notification procedure** - This switch allows you to turn on and off the packet receipt notification procedure. During the DFU operation the phone sends 20-bytes size packets to the DFU target. It may be configured that once every N packets the phone stops sending and awaits for the Packet Receipt Notification from the device. This feature is required by Android to sync sending data with the remote device, as the callback `onCharacteristicWrite(...)` that follows calling method `gatt.writeCharacteristic(...)` is invoked when the packet is written to the outgoing queue, not when physically transmitted. With this procedure disabled it may happen that the outgoing buffer will be overloaded and the communication stops. The same error may happen when the N number is too big, about 300-400. The receipt notification ensures that the outgoing queue is empty and the DFU target received all packets successfully.
**Number of packets** - This field allows you to set the N number describe above. By default it is set to 10. Depending on the phone model, devices may send and receive different number of packets in each connection interval. Nexus 4, for instance, may send just 1 packet (and receive 3 notifications) while Nexus 5 or 6 send and receive up to 4 packets. By customizing this value you may check which value allows for the fastest transmission on your phone/tablet.
**MBR size** - This value is used only to convert HEX files into BIN files. If your packet is already in the BIN format, this value is ignored. The data from addresses lower then this value are being skipped while converting HEX to BIN. This is to prevent from sending the MBR (Master Boot Record) part from the HEX file that contains the Soft Device. The compiled Soft Device contains data that starts at address 0x0000 and contains the MBR. It is followed by the jump to address 0x1000 (default MBR size) where the Soft Device firmware starts. Only the Soft Device part must be sent over DFU.
**Keep bond information** - When upgrading the application on a bonded device the DFU bootloader may be configured to preserve some pages of the application's memory intact, so that the new application may read them. The new application must know the old data format in order to read them correctly. Our HRS DFU sample stores the Long Term Key (LTK) and the Service Attributes in two first pages. However, the DFU Bootloader, by default, clears the whole application's memory when the new application upload completes, and the bond information is lost. In order to configure the number of pages to be preserved set the **DFU_APP_DATA_RESERVED** value in the *dfu_types.h* file in the DFU bootloader code (line ~56). To preserve two pages the value should be set to 0x0800. When your DFU bootloader has been modified to keep the bond information after updating the application set the switch to ON. Otherwise the bond information will be removed from the phone.
**External MCU DFU** - The DFU service from the library, when connected to a DFU target, will check whether it is in application or in DFU bootloader mode. For DFU implementations from SDK 7.0 or newer this is done by reading the value of DFU Version characteristic. If the returned value is equal to 0x0100 (major = 0, minor = 1) it means that we are in the application mode and jump to the bootloader mode is required.
However, for DFU implementations from older SDKs, where there was no DFU Version characteristic, the service must guess. If this option is set to false (default) it will count number of device's services. If the count is equal to 3 (Generic Access, Generic Attribute, DFU Service) it will assume that it's in DFU mode. If greater than 3 - in app mode.
This guessing may not be always correct. One situation may be when the nRF chip is used to flash update on an external MCU using DFU. The DFU procedure may be implemented in the application, which may (and usually does) have
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Android与BLE 51822通信APP源码 (482个子文件)
dfu_win_3_1.bat 9KB
gradlew.bat 2KB
blinky_s110_v7_1_0_ext_init.dat 16B
ble_app_hrs_dfu_s110_v7_1_0_ext_init.dat 16B
.gitignore 112B
.gitignore 7B
.gitignore 7B
.gitignore 7B
build.gradle 2KB
build.gradle 1KB
build.gradle 764B
build.gradle 436B
settings.gradle 204B
gradlew 5KB
ble_app_hrs_s110_v7_0_0.hex 59KB
ble_app_rscs_s110_v7_0_0.hex 58KB
ble_app_hrs_s110_v6_0_0.hex 53KB
ble_app_rscs_s110_v6_0_0.hex 51KB
ble_app_hrs_dfu_s110_v7_1_0.hex 46KB
blinky_arm_s110_v7_0_0.hex 3KB
blinky_s110_v7_1_0.hex 2KB
app.iml 9KB
wear.iml 7KB
common.iml 7KB
nRFToolbox.iml 941B
achartengine-1.1.0.jar 118KB
gradle-wrapper.jar 49KB
BleManager.java 38KB
UARTActivity.java 32KB
DfuActivity.java 31KB
BleProfileServiceReadyActivity.java 24KB
GlucoseManager.java 22KB
BleManager.java 21KB
ProximityManager.java 16KB
BleProfileService.java 15KB
BleProfileExpandableListActivity.java 14KB
BleProfileActivity.java 14KB
UARTService.java 13KB
ExpandableListActivity.java 12KB
ProximityService.java 11KB
ScannerFragment.java 11KB
CSCService.java 11KB
UARTLogFragment.java 10KB
RSCActivity.java 10KB
BleProfileService.java 10KB
UARTCommandsActivity.java 10KB
DatabaseHelper.java 10KB
RSCService.java 9KB
UARTConfigurationsActivity.java 9KB
CSCActivity.java 9KB
ExpandableRecordAdapter.java 8KB
FileHelper.java 8KB
FeaturesActivity.java 8KB
DevicesAdapter.java 8KB
BPMManager.java 8KB
TemplateService.java 7KB
GlucoseMeasurementParser.java 7KB
RecordAccessControlPointParser.java 7KB
UARTProfile.java 7KB
HTSService.java 7KB
DeviceListAdapter.java 7KB
HTSActivity.java 7KB
HRSActivity.java 7KB
GlucoseActivity.java 7KB
UARTManager.java 7KB
GlucoseMeasurementContextParser.java 6KB
ScannerActivity.java 6KB
HRSManager.java 6KB
UARTEditDialog.java 6KB
HTSManager.java 6KB
ProximityActivity.java 6KB
BPMActivity.java 6KB
TemplateManager.java 6KB
UARTNewConfigurationDialogFragment.java 6KB
TemplateActivity.java 5KB
RSCManager.java 5KB
UARTConfigurationSynchronizer.java 5KB
GattError.java 5KB
UARTConfigurationsAdapter.java 5KB
UARTConfigurationItemLayout.java 5KB
SettingsFragment.java 5KB
ForegroundRelativeLayout.java 5KB
ForegroundLinearLayout.java 5KB
CSCManager.java 5KB
BloodPressureMeasurementParser.java 5KB
DeviceItemLayout.java 5KB
BleProfile.java 5KB
LineGraphView.java 5KB
HeartRateMeasurementParser.java 5KB
UARTControlFragment.java 5KB
IntermediateCuffPressureParser.java 5KB
AppAdapter.java 5KB
GlucoseRecord.java 4KB
BleManagerCallbacks.java 4KB
UARTCommandsAdapter.java 4KB
MainWearableListenerService.java 4KB
DfuInitiatorActivity.java 4KB
UploadCancelFragment.java 4KB
UARTButtonAdapter.java 4KB
Command.java 4KB
共 482 条
- 1
- 2
- 3
- 4
- 5
vonchenchen1
- 粉丝: 3180
- 资源: 25
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页