bluetooth-lowenergy

Android BLE Notification

馋奶兔 提交于 2019-12-12 02:24:56
问题 I'm developing an android application using BLE. I've implemented all the basic operations like discovery, connection, and data transfer. Now I was looking for BLE notifications, Is it possible to receive notification from BLE device when the application is not running (not even in background). What I want to implement is the notification similar to GCM/FCM, we receive notifications in our app even though app is not running. So want to check if similar notification mechanism is supported by

Bluetooth HCI command for enabling BLE advertising

烈酒焚心 提交于 2019-12-12 01:37:14
问题 I am currently trying to write some test scripts to get a bluetooth device fcc certified. I have been following these two sites http://processors.wiki.ti.com/index.php/CC256x_VS_HCI_Commands, http://processors.wiki.ti.com/index.php/WL18xx_Bluedroid_Bluetooth_RF_Testing. I've been using the later to convert commands from the former into tests that the bluedroid test tool will recognize. I have had success for the most part, but I need away to turn on BLE advertising mode and cannot find a way

startLeScan returns false

醉酒当歌 提交于 2019-12-12 01:28:29
问题 BluetoothAdapter's method startLeScan returns false sometimes during scanning BLE devices.Hence,I am facing issues in my application.I am using the newer method startScan(ScanCallback callback) from Lollipop onwards but needs to support API level 18 and above.Any help is appreciated. 回答1: If you look at the source code for startLeScan here, you will see that there are several things that can cause the return code to be false: A null callback ha been provided A scan has already been started by

Unable to read data via bluetooth successfully

笑着哭i 提交于 2019-12-12 00:52:41
问题 I'm trying to create an App which can receive data and send data to the microcontroller (ESP32). But for some reason, I'm unable to receive data from microcontroller successfully. The app is written in Kotlin, and I already tried some examples mentioned on StackOverflow, but none of them actually works on my code. I can successfully send data to the microcontroller via Bluetooth, but I can't receive data from Bluetooth. (The method I used in the microcontroller is just simply "ESP_BT.println(

android 4.3 Bluetooth ble don't called onCharacteristicRead() after write operation performed

狂风中的少年 提交于 2019-12-11 20:06:37
问题 I want to perform read and write operation with bluetooth peripheral.I have write sample application in which after giving particular input it give me output but inside code onCharacteristicRead not get called after onCharacteristicWrite. Please help me out. This is my code BluetoothGattCharacteristic WriteCharacteristic =null; BluetoothGattCharacteristic ReadCharacteristic =null; private BluetoothGattCallback mGattCallback = new BluetoothGattCallback() { /* State Machine Tracking */ private

Is there a difference between a BLE broadcast frame and BLE beacon frame

旧时模样 提交于 2019-12-11 19:15:03
问题 I am receiving EVT_LE_ADVERTISING_REPORT from a HCI socket. I want to differentiate between a BLE beacon and normal BLE devices (resolving device names etc) I am little confused whether all BLE devices do emit beacons or they are different. If different then how is the packet format for them? 回答1: A BLE beacon frame is just a specialized payload inside a BLE advertisement frame. Devices looking for BLE beacons simply perform a scan for BLE advertisements, look at each one, and see if any of

iOS Bluetooth LE cant get notification programatically but can in other apps

淺唱寂寞╮ 提交于 2019-12-11 18:37:01
问题 I'm trying to get my iOS program to communicate with a custom Bluetooth LE device. I can connect to it, read all the services, and read all the CBCharacteristic objects for each service. I am trying to get notified when one specific CBCharacteristic is updated. The CBCharacteristic.properties is set to 0x10 (Notify) but the CBCharacteristic.isNotifying is false. After calling the following line of code: myDevice.peripheral.setNotifyValue(true, forCharacteristic: myChar) I am expecting to

Programmatically turning on all notifications

限于喜欢 提交于 2019-12-11 17:57:43
问题 I am new to Android development and I can't understand how to properly turn all ble notifications and get all of them. I've tried to loop through all services for(BluetoothGattService service : gatt.getServices()){ if( service.getUuid().equals(Step_UUID)) { BluetoothGattCharacteristic characteristicData = service.getCharacteristic(Step_UUID); for (BluetoothGattDescriptor descriptor : characteristicData.getDescriptors()) { descriptor.setValue( BluetoothGattDescriptor.ENABLE_INDICATION_VALUE);

BLE and Bluetooth gamepad options for Oculus

ぃ、小莉子 提交于 2019-12-11 17:49:33
问题 I'm planning to build a mobile app that sends over BLE a joystick commands with HID over GATT. Does Oculus external gamepad option will be able to connect to it? or it works only with Bluetooth?? therefore BLE won't work? I would appreciate if you could point me to similar examples. Thanks 回答1: Yes you can use HID over GATT with BLE to control Oculus. At least last time I tried the game Smash Hit with a standard BLE mouse the mouse button did the same thing as the oculus built in button. 回答2:

How to update advertisingdata in QT bluetooth advertising

人盡茶涼 提交于 2019-12-11 17:43:17
问题 I'm currently using qt for a project. I want to advertise the result of an asynchronous calculation via bluetooth advertisement. I'm setting up an advertisier like in a BluetoothAdvertisingClass like this void BLEServer::startAdvertising(QString string){ advertisingData.setDiscoverability(QLowEnergyAdvertisingData::DiscoverabilityGeneral); advertisingData.setIncludePowerLevel(true); advertisingData.setLocalName("Server"); advertisingData.setServices(QList<QBluetoothUuid>() << QBluetoothUuid: