NordicSemiconductor / Android-nRF-Toolbox

The nRF Toolbox is a container app that stores your Nordic Semiconductor apps for Bluetooth Low Energy in one location.
https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Toolbox
BSD 3-Clause "New" or "Revised" License
1.07k stars 461 forks source link

Android-nRF-Toolbox-2.6.0 and Android-BLE-Library-1.2.0 #61

Closed lzxsmile closed 5 years ago

lzxsmile commented 5 years ago

I use Android-BLE-Library-1.2.0 and Android-nRF-Toolbox-2.6.0, EER: class Request not to find,why? _20181201005517 _20181201005552

philips77 commented 5 years ago

Request was moved out of BleManager to a standalone class. Just add import as it will suggest.

lzxsmile commented 5 years ago

i import the class,that method writeCharacteristic(mAlertLevelCharacteristic) _20181201085556 will err.

lzxsmile commented 5 years ago

_20181201085135

lzxsmile commented 5 years ago

import the first one _20181201090837 ?

philips77 commented 5 years ago

Yes, the first one, as it suggests. Also, the data parameter has to be given as a parameter, not "inside" the BluetoothGattCharacteristic object. That means, you should do:

writeCharacteristic(mAlertLevelChar, someData);

instead of:

mAlertLevelChar.setValue(someData);
writeCharacteristic(mAlertLevelChar);

This is to make sure the data you write will not override any data received in a notification, which may happen at the same time.