characteristics

BLE android notifications read

牧云@^-^@ 提交于 2020-01-07 04:41:11
问题 I'm experiencing an android application on Android Studio. I'm actually able to enable and receive notifications or characteristics reads without problem. Where I'm a bit stuck it's when I read characteristics (by button) if notifications are enable. In my application the data from characteristics reading is right on a case and the notification's data on an other case. But when I read characteristics when notifications are enable, sometimes data exchange their places. I tried to put a global

Android Bluetooth not discovering the characteristic after changing UUID

梦想与她 提交于 2019-12-23 10:12:35
问题 I am using Android 5.0.1 Lollipop and developing Bluetooth Low Energy server-client communication. I have Samsung Galaxy s4. I have three characteristic in my Custom Service. I made one of the characteristic's property as write-only and encrypted write. Then I changed it to non-encrypted write. The write operation didnt work for this characteristic anymore. I knew I have to restart Bluetooth adapter from settings and unpair the device but it doesn't work anymore at all. Then I changed the

BLE receiving GATT notifications from a characteristic

隐身守侯 提交于 2019-12-13 02:49:02
问题 I want to receive notifications when this characteristic is changed Micro:Bit. What I'm doing is basically the following: 1) Check if the system is compatible with BLE 2) Enable bluetooth in case it's disabled 3) Connect to the only one paired device (Micro:Bit) 4) Activate this code when connectivity changes (¿Connected/Disconnected?) 5) Activate this code when characteristic is updated ¿? public class MainActivity extends Activity { BluetoothAdapter bleAdapter; @Override protected void

Subscribe to a characteristic and catch the value Android

我是研究僧i 提交于 2019-12-12 05:29:25
问题 I´m developing an BLE app, based on the Gatt sample project provided by google: https://developer.android.com/samples/BluetoothLeGatt/index.html. So, I can send data writing in a characteristic successfully. Now I need to know when this characteristic change its value. DeviceActivity private void displayGattServices(List<BluetoothGattService> gattServices) { // get services & characteristics ................ final BluetoothGattCharacteristic characteristic = mGattCharacteristics.get(2).get(0)

Null pointer exception error sending a characteristic BLE android

久未见 提交于 2019-12-11 10:19:09
问题 I'm a new android developer and I'm trying to send a data using BLE 4.3 , based on Gatt android sample project. I use characteristics to put the data that i want to transmit. When I try to transmit, I use the third service in the list of DeviceControlActivity of the project, appears a text dialog to introduce text. When I press OK, the idea is that start the transmission, but I obtain a NullPointerException error. I don't know why appears this error and how can I solve this. This is my full

Write a characteristic in BLE android

∥☆過路亽.° 提交于 2019-12-11 08:32:30
问题 I'm trying to send a characteristic in a BLE android to another device. Seaching in internet I found some code that help me to do this, but I cant transmit successfully the data. This is my code, based on Gatt android sample project: public class DeviceControlActivity extends Activity { public static final String EXTRAS_DEVICE_NAME = "DEVICE_NAME"; public static final String EXTRAS_DEVICE_ADDRESS = "DEVICE_ADDRESS"; private TextView mConnectionState; private TextView mDataField; private

How to subscribe to multiple BluetoothLE Characteristics with Android

≡放荡痞女 提交于 2019-12-11 05:02:13
问题 I am developing an Android app which should subscribe to multiple BLE characteristics. But whatever I do, I receive only the updated values from one characteristic. Here is the code: BluetoothGattCharacteristic characteristicVel = gatt.getService(BleDefinedUUIDs.Service.KOMMMODUL_SERVICE).getCharacteristic(BleDefinedUUIDs.Characteristic.VELOCITY); gatt.setCharacteristicNotification(characteristicVel, true); BluetoothGattDescriptor descriptorVel = characteristicVel.getDescriptor(

Samsung Android BLE multiple read/write

爷,独闯天下 提交于 2019-12-10 20:29:45
问题 In Samsung 4.2 to 4.3 BLE App Migration Guide (http://developer.samsung.com/ble) it says: The synchronous nature of the stack and F/W hasn’t been affected. That is, if we call for example, writeCharacteristic for a particular characteristic, if it returns true, the next call to any BluetoothGatt or BluetoothGattServer method should be done after the onCharacteristicRead callback is received. This is because the stack is designed to support and process only one GATT call at a time, and if, for

Cannot read characteristic. Android BLE

帅比萌擦擦* 提交于 2019-12-08 20:45:43
问题 I'd like to read the data from a specific characteristic of my remote BLE device to my Android tablet Nexus 7. The problem is that, I can receive the data by enabling the notification of that characteristic even without calling readCharacteristic . But I cannot successfully read characteristic by calling readCharacteristic without enabling the notification. mBluetoothGatt.readCharacteristic(characteristic) returns false. Thus the function onCharacteristicRead has never been triggered. I also

HM10 ble change characteristic value AT command Arduino

≡放荡痞女 提交于 2019-12-04 21:19:57
问题 Can anyone help me with the AT command to write characteristic value, Or how to send data from arduino to another ble device using Hm10 module. The HM10 after sending the AT+START, does advertise packets, and can detect the service and characteristic, But the characteristic value is the default 0x00, How can I change that? Have checked the data sheet multiple times but can not find an AT command that is capable of doing the same. UPDATE: Similar problem with setting the HM10 in Central Mode: