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
277
questions
-1
votes
0
answers
18
views
Write failed: this characteristic not support write in Ble Serial communication
private void sendTokenToBleDevice(String token) {
String tokenWithoutDashes = token.replace("-", "");
byte[] tokenBytes = tokenWithoutDashes.getBytes(); // Assuming token is ...
0
votes
0
answers
39
views
To perform OTA for BLE devices in Android Kotlin
When i write the end command after the data is written to the OTA data characteristics , the end command is found in the logs of the BLE device so the firmware is not updating.
I need to Perform OTA ...
0
votes
1
answer
46
views
Finding BLE Services
I'm trying to connect a smartphone running Android 13 to a server using BLE. Android 11 connects and finds services, but Android 13 can't find them. I have tried everything with permissions
I'd like ...
0
votes
1
answer
33
views
Does Android have an equivalent of iOS's Core Bluetooth canSendWriteWithoutResponse?
While implementing firmware updates, we've noticed that different Android phones seem to have different levels of reliability regarding GATT characteristic writes without response. Some will block the ...
0
votes
0
answers
45
views
Uncaught exception thrown by finalizer for Bluetooth Reconnection in Android - java.io.IOException: socket not created
I am trying to work with a Serial Bluetooth connection where I am connecting and communicating to the IOT device serially over Bluetooth. So the device has On/Off switch which can basically close the ...
1
vote
1
answer
904
views
Android 14 default MTU and related considerations
Has the default MTU changed to 517 bytes in Android 14? If so, this would warrant questions pertaining to hardware, the Bluetooth stack, MTU capabilities and proper usage of the function requestMtu().
...
1
vote
1
answer
318
views
How to Bluetooth LE background connection?
Sorry for my bad English.
Context
My main goal is to build a electronic lock, the key would be a phone connected in BLE. The proximity of the phone must unlock the lock.
What I want to do
A ...
0
votes
0
answers
49
views
Creating a callbackFlow for BluetoothLeAdvertiser
I'm trying to make a data source and repository for a Bluetooth Low Energy GATT server.
The app needs to display whether the app is currently advertising.
The docs suggest that I would use a ...
0
votes
1
answer
494
views
How to scan BLE devices that use Extended Advertisement and Coded PHY with Android?
I try do create an Android app that scan Bluetooth Low Energy devices that advertise using Extended Advertisement and use Coded PHY for advertisement.
I have a nrf52840 peripheral that I have setup to ...
1
vote
1
answer
443
views
Why is onCharacteristicChanged never called when it should be?
I'm working with Bluetooth (BLE) in an Android app.
There is a characteristic that should be triggering callbacks to onCharacteristicChanged, but the callbacks never happen. Other functions of the ...
0
votes
0
answers
517
views
Android BLE: GattCallback.onCharacteristicChanged is not triggered in response of a write operation on Android 12 and below
I am writing an Android app that can connect to a BLE device.
There are multiple types of devices handled by my application and I have to know the type of device I am connecting on.
The entire ...
0
votes
0
answers
61
views
How to check if a BLE device is currently busy?
I need to check if the device is writing a firmware chunk. If yes, then do not start recording the next chunk. I tried to do it with continuations but it didn't work.
Can a reliable write help me in ...
1
vote
2
answers
2k
views
writeDescriptor(BluetoothGattDescriptor!): Boolean' is deprecated. Deprecated in Java
I am working Bluetooth gatt with
minSdk 21
targetSdk 33
I see the writeDescriptor is deprecated in sdk 33. So I did this to wrap the code in SDK version check
gatt.setCharacteristicNotification(...
0
votes
0
answers
667
views
React Native Android 12 Permission, Ble cannot scan
On Android 12 or higher Ble cannot scan. My android.manifest is below:
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
<uses-...
2
votes
1
answer
1k
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 ...