Questions tagged [android-ble]
In contrast to Classic Bluetooth, Bluetooth Low Energy (BLE) is designed to provide significantly lower power consumption. This allows Android apps to communicate with BLE devices that have low power requirements, such as proximity sensors, heart rate monitors, fitness devices, and so on.
android-ble
275
questions
3
votes
1
answer
557
views
Android: Why is BluetoothLeScanner sometimes not discovering any BLE device?
I'm using BluetoothLeScanner to scan for BLE devices, which I start using:
startScan(null, settings.getScanSettings(), scanCallback);
Every once in a while, a call to startScan() does not discover any ...
3
votes
0
answers
310
views
Android BLE DFU multiple devices update one after another...But some devices fails to update
By using nordic Dfu library (updated) I have to update firmware of devices in one go,I have mac addresses of devices which required to update, let say i have 30 devices with their mac addresses and ...
3
votes
0
answers
3k
views
Why can't use Bluetooth and Wifi simultaneously?
This is hardware related question. But also software related.
I am making an Android app using bluetooth. And I tested my devices with wifi and bluetooth.
And the result is:
1. Wifi ON, connected &...
3
votes
0
answers
324
views
What does warning "BluetoothRemoteDevices: Skip name update" mean?
My app scans for Bluetooth devices.
When the app's Bluetooth scanner is scanning, it generates a lot of the following warnings
W/BluetoothRemoteDevices: Skip class update for AB:CD:12:34:56:78
...
3
votes
1
answer
1k
views
Turning off Bluetooth Adapter not calling onConnectionStateChange Android 8.1.0
Turning off the bluetooth in Android system settings gives us the BluetoothGattCallback.onConnectionStateChange() call in Android < 27 (Oreo). However when I try it on my Pixel or Nexus 5X (Android ...
3
votes
1
answer
615
views
BLE background scanning
I'm running background service that scan for BLE devices 24/7 using Android BLE API.My service run using START_STICKY. When i find a specific device i do my work.
My question is : Do i still get ...
3
votes
1
answer
2k
views
WiFi connection issues when BLE scan always on
I'm currently scanning BLE devices continuosly and undefenetily, but I noticed that my Samsung J1 loose wifi connections, and any atempt to reconect gives "Authentication Error":"Password incorrect". ...
3
votes
0
answers
208
views
Android BLE receive STATE_DISCONNECTED while the device is still connected
I am developing Android app that connects with BLE device using native BLE API. Many times I receive STATE_DISCONNECTED in the BluetoothGattCallback while the bluetooth device is still connected and ...
3
votes
0
answers
571
views
BLE - How to get response after writing command?
I have a BLE device with a "particular protocol".
I need to send a command to retrieve heart rate measurements (using notifications).
My question is: how can I get response after write the "send ...
3
votes
1
answer
1k
views
Android BLE Error 0x06 Request Not Supported
My app is facing issue while connecting to BLE device. On every connection attempt app makes, it gets Error code 0x0006(Request not supported) in OnConnectionStateChange() method. I have tried ...
3
votes
2
answers
331
views
How can I send data to ble device from second or third activity of the same program
I can send data from the first activity but on repeating the same procedure on the second activity to send data to ble device is not successful. How can I send data from second activity?
3
votes
1
answer
599
views
Android 4.4 BLE Scanning lack of stability
Would a Bluetooth LE Jedi know any trick how to get a reliable BLE scanning mode on cheap Android 4.4 devices ?
Everything works fine from Android 5 to 6, and most of the Android 4.4 phones...
...
2
votes
3
answers
982
views
BluetoothLescan() not finding any devices
I've been having some problems getting Bluetooth to scan for devices with my Samsung Galaxy s5.
I'm on Android 6.0 and have set up permissions for my app to scan like so:
if (Build.VERSION.SDK_INT &...
2
votes
1
answer
917
views
BLE's - onCharacteristicRead not invoked on calling readCharacteristic
I'm trying to read a value from a custom characteristic in a custom service on a BLE device.
I successfully call the readCharcteristic method as it returns true. However, the onCharacteristicRead ...
2
votes
1
answer
487
views
Companion device pairing: how long does it take the scan to stop?
I am using Companion device pairing and followed this guide.
when I try to associate to a device like that deviceManager.associate(pairingRequest,callbacks) it will start scanning for BLE devices.
1....
2
votes
1
answer
4k
views
How to get deviceServices from flutter_reactive_ble example
I'm working with the example that is provided in the flutter_reactive_ble project (https://github.com/PhilipsHue/flutter_reactive_ble), specifically on the device_detail_screen.dart file.
It works as ...
2
votes
1
answer
1k
views
How to make Android connect after the Bluetooth Adapter has been disabled & reenabled?
I have written an app that connects to a BLE device. The app works OK on most devices; but some devices (most noticeably Huawei P8 Lite and Nexus 6P) refuse to connect after the Bluetooth adapter has ...
2
votes
1
answer
2k
views
BluetoothServiceJni: An exception was thrown by callback 'btgattc_notify_cb'
I am using Android ble to develop an application. The app will connect with the external device using ble. The external device has a sensor that records data and as soon as the android device comes in ...
2
votes
2
answers
438
views
Is BLE scan will work in tablets which does not have GPS chip?
I am working in BLE apps. I have some doubts in GPS permission to perform BLE scanning.
Is BLE scan will work in tablets which do not have GPS chip?
startLescan() will work without GPS permission?
2
votes
1
answer
791
views
Get the supported Bluetooth Version in Android phones?(5 or 4.x)
Is there a way to know the Android Bluetooth Ver?( 5 or 4.x - 4.1 or 4.2?)
Currently as per
https://developer.android.com/about/versions/oreo/android-8.0-changes
Feature like Advertisement packet ...
2
votes
1
answer
6k
views
Scanning for BLE devices on Android 8+ in the background
I'm using the following method from BLE scanner API on Android 8+
to scan for BLE Beacons
startScan(List<ScanFilter> filters, ScanSettings settings,
PendingIntent callbackIntent)
The problem ...
2
votes
1
answer
4k
views
Getting Response for Android BLE Write Characteristic
I am invoking the writeCharacteristic both using the WRITE_TYPE_NO_RESPONSE and without it.Am I supposed to get the response out of both or one or none?
Is there any callback to catch this response?
...
2
votes
2
answers
3k
views
Maximum no of device that can connect to BLE(BluetoothGattServer) server android
Does anybody knows the maximum number of device that can be connected to ble peripheral ? I tried with two devices and it connects well but the third device is not able to connect to Android BLE ...
2
votes
1
answer
16k
views
Using BLE - Read GATT characteristics
I'm trying to read GATT characteristic values from a Bluetooth LE device (a Heart Rate bracelet). Its specs are:
Services
Characteristics
I have not yet figured out how to "read" the specifications ...
2
votes
2
answers
2k
views
How to connect with BLE device for first time (Android)
I was going through BluetoothGatt.java and found the method boolean connect(Boolean autoConnect, BluetoothGattCallback callback,
Handler handler)
The documentation just above this method ...
2
votes
1
answer
587
views
RxAndroidBle WRITE_TYPE_DEFAULT or WRITE_TYPE_NO_RESPONSE
I was wondering which strategy the RxAndroidBle library uses regarding write acknowledgements: WRITE_TYPE_DEFAULT or WRITE_TYPE_NO_RESPONSE?
Furthermore, should I wish to set (or query) this setting, ...
2
votes
2
answers
1k
views
Logging scanResult in Polidea - RxAndroidBle Scanning
I am trying to use the RxAndroidBle lib (https://github.com/Polidea/RxAndroidBle). I want the app the start and scan for BLE devices. I want to print the found devices in the LogCat. How can I do this?...
2
votes
1
answer
529
views
How can I use semaphore to do a correct android ble communication?
I have one doubt with ble communication from my Android app and one peripheral. This peripheral sends data through notify on a certain characteristics "A" and I can write on it on another certain ...
2
votes
2
answers
577
views
Companion device pairing: how to filter using UUID?
I am using Companion device pairing and followed this guide.
I want to scan for devices and filter them using UUID. I tried the following
val deviceFilter: BluetoothLeDeviceFilter = ...
2
votes
0
answers
485
views
Delay in Android BLE StartScan returning a match
We have developed an Android app that tracks vehicle journeys, where each vehicle has a BLE device installed that wakes up when the vehicle is started.
To identify when the user is in the vehicle and ...
2
votes
0
answers
2k
views
Android BLE Gatt Connection Issue (Connection Timeout Status:8)
I'm developing an Android app that discovers and connects to a GATT service that is being advertised by my rPi 3B+. The iOS app that I've finished developing works without any issue. However, almost ...
2
votes
0
answers
462
views
Get any error code on connect failure due to max connections limit reached on Android BLE
I am connecting to a BLE device and want a specific error code that could help me determine the reason of connection failure.
Scenario i want to cover is for maximum connections limit being reached.
...
2
votes
0
answers
488
views
BLE: Reconnect Android central to iOS peripheral
After days of research and trial and error my colleagues and I have to hope that the StackOverflow community has a working solution.
We got an Android Smartwatch. We developed an app which acts as ...
2
votes
0
answers
592
views
BLE different MTU for different implementations
I have tried different implementations of BLE connection on Android. One with RxAndroidBle and another one with simple Android API. I used RxAndroidBle example app for testing.
I connect to the same ...
2
votes
0
answers
40
views
device not connecting mobile device to device through bluetooth low energy
How to communicate mobile device with BLE when an application installs in mobile and trying to get other mobile device battery information where ScanCallback does not return any information on ...
2
votes
0
answers
308
views
Android BLE: Set a float to a BluetoothGattCharacteristic
I have to set a float value to BluetoothGattCharacteristic, for example Temperature Measurement with the
BluetoothGattCharacteristic.FORMAT_FLOAT
and an offset. I'm not sure if it should be 0 or 1....
2
votes
2
answers
1k
views
BLE Advertise 32-bit Service-UUID in Android Oreo
I have a small app which just performs a BLE Advertising.
The app runs on a Nexus 5x with Android 8.0
This is the code to start BLE advertising:
private fun startAdvertising() {
val serviceUuid ...
2
votes
0
answers
914
views
Android BluetoothGatt.getServices(xyz) in onServicesDiscovered returns null for Service xyz listed in onScanResult ScanRecord.getServiceUuids()
I've been doing BLE on Android since 2013/API18/4.3.
I know what I am doing, but I can't figure out this simple problem.
I am successfully scanning BLE devices and in ScanCallback.onScanResult(...) I ...
2
votes
1
answer
716
views
Android BLE read data rate is slow when device is paired
I am developing an Android BLE app which sends multiple read requests per second (~ 10 samples/second). I have noticed that when the ble device is paired (bonded) to the phone, the reading rate is ...
2
votes
0
answers
945
views
BLE scan in sleep mode
I'm developing a android app using ble.
I want schedule a scan every 10 second. It work but when my device is in background, it doesn't work.
in Oncreate() i call StartHandler();
public class ...
2
votes
0
answers
111
views
BLE API >= 21 in deep sleep
I have the following Service in Android
public class MyService extends Service{
....
@Override
public void onCreate() {
....
StartHandler();
....}
public void StartHandler(){
...
2
votes
0
answers
2k
views
How to get BluetoothGattCharacteristic value format type?
While developing an application for IOT tried communicating with a BLE peripheral device. Using BLE Lollipop API.
Each BluetoothGattService can provide different BluetoothGattCharacteristic, each ...
2
votes
1
answer
1k
views
Android BluetoothDevice connectGatt not working on HTC M8 with Android 6.0
I have a BLE app that has hundreds of happy users on a variety of devices. Most of my testing has been done on Nexus devices, but a user reported an issue with HTC M8 so I just bought one. Sure enough,...
2
votes
0
answers
111
views
How to turn-on BLE using google play service apis
I tried to turn on ble using location service of google plays service apis. First I connected with successfully.
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(LocationServices....
2
votes
0
answers
1k
views
Galaxy s6 Android LL: onConnectionStateChange return me 133 Error Status
I have developed an app that it have to reconnect to a server app that is installed on a certain device. I have tested my app on some device, but on galaxy s6 with Lollipop I have some problem.
This ...
1
vote
2
answers
5k
views
Android BLE Scan never finds devices
Since a few days I try to implement an BLE connection in my APP. I know that the Device, I try to connect with, is full functional, so the problem must be my code.
I use the BluetoothLeScanner....
1
vote
4
answers
2k
views
How to execute the BluetoothGatt read and write requests same time for all connected devices?
I want to connect multiple ble device and do read write operation parallely?
1
vote
3
answers
1k
views
How to Send an Audio HEX file to Ble Device
I have a working ble device with android .
it sends and receives data finely through the Android app.
But Now My Problem is I want to send Some Audio HEX files to my BLE Device.
And its larger Than ...
1
vote
2
answers
4k
views
Which targetSDK to use for BLE?
I’m building an Android app which should run on every device with Bluetooth Low Energy, which means a minSDK of 18. I’m not sure as to which targetSDK I should use however. I read online that it is ...
1
vote
1
answer
1k
views
Trouble Connecting Android App to Raspberry Pi 3 over BLE
I am using the Raspberry Pi 3 model B as a bluetooth peripheral.
The Pi is running a GATT server and advertising it as well.
I can connect to it from the LightBlue iOS app and can read and write ...