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
274
questions
0
votes
0
answers
410
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
73
views
Is it possible to know the maximum MTU size supported based on Android version?
I know the way to increase the MTU size of packets exchanged between android device and a bluetooth peripheral is done using BluetoothGatt.requestMtu(int mtu) and BluetoothGattCallback.onMtuChanged(...
0
votes
0
answers
54
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 ...
0
votes
0
answers
609
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-...
0
votes
1
answer
596
views
BLE android read readCharacteristic
I Try to devlope android app to read from cycling sensor ,
if anyone can help plz . its connect to the sensor but cant read the characteristic.
i dont know how to read the characterestic value . its a ...
0
votes
1
answer
298
views
onPhyUpdate is triggered with status 6 = GATT_REQUEST_NOT_SUPPORTED
I'm developing an Android app which communicates via BLE with an external module, and I am trying to set the BLE connection PHY.
I've tried calling the method gatt.setPreferredPhy(txPhy, rxPhy, ...
0
votes
1
answer
832
views
How to implement a custom UUID for bluetooth broadcast
I want to change my android device's Bluetooth UUID to a predefined value so that my BLE beacon can recognize it without pairing with it.
From this question I gathered that I'll have to change the ...
0
votes
1
answer
1k
views
BLE disconnected with status 8, interval 36
When trying to connect to Raspberry Pi BLE GATT server (using hardcoded BT address) from Android app, most of the times (not always) I'm getting:
D/BluetoothGatt: onClientConnectionState() - status=0 ...
0
votes
0
answers
226
views
Android BLE onCharacteristicChanged is not called on second time
What I am trying to do:
I am building an android ble application which will connect to IOT devices and when sending command it will return with some responses.
For example when sending "STATUS&...
0
votes
1
answer
262
views
Google Fit api BLE connect issue
I want to connect Mi Band 3 with my application through Google Fit SDK. I am facing issue to connect band through bluetooh. as given in Offical Google Fit Documentation - BLE Sensor I am using ...
0
votes
0
answers
1k
views
bluetooth disconnect D/BluetoothGatt: cancelOpen()
When I call to a specific command the ble device seems to be disconnected.
I issue two commands and the device seems to be working fine.it process the request and returns a response. but when I call ...
0
votes
1
answer
162
views
Is the transmission power on Bluetooth Low Energy an Android configurable?
I have a Bluetooth Low Energy Android app project here which works fine so far for most of my android smartphones. I use my BLE weather thermometer in my app anywhere within my room, it works.
Except ...
0
votes
1
answer
1k
views
Write BLE gatt characteristic on Android — error status 255
Experimenting with sample kotlin program, trying to read/write BLE device with channels from 0-7
When reading it gives me value like this: (0x06)
onCharacteristicRead(), status=0, value=[uuid='...
0
votes
1
answer
799
views
Get BLE devices in Kotlin
I've got my SettingsActivity allowing the user to choose form a list of paired Bluetooth devices.
However, there seems to be something strange going on with Bluetooth Low Energy where devices don't ...
0
votes
1
answer
382
views
Ble distance calculation using Time
Is it possible to calculate distance between BLE-BLE or Beacon-BLE device using Time(T) taken on packet received on receiver device with measured power or RSSI value?
Is there any formula for that?
0
votes
1
answer
40
views
Android BLE - Measure traffic from inside application
In an android application I want to display the data rate (e.g.: in bytes/second) at which the application (or at least the device) is currently sending data via BLE.
For network traffic there is the ...
0
votes
0
answers
178
views
Background Service Android Using RxAndroidBle
When I connect, write, and notify using backgorund service, connection running well but when I closed the application connection between service and BLE device lost. Can I still connect to device ...
0
votes
0
answers
224
views
Can't read the value that comes with the GATT Service characteristic; Not sure if I setup the GATT server correctly
The BLE is advertising just fine. I can establish a connection with it but I can't read the characteristic value I set here on the initialization of GATT server.
This is the GATT Server setup
@...
0
votes
0
answers
102
views
How would I get the nrFToolbox for BLE app to use Arduino code written using the ArduinoBLE library?
For reference, I am using the Arduino Nano 33 BLE Sense board.
At the moment, I can get the nrFToolbox app to recognize the board as a Bluetooth device, but that's about it. I would like to able to ...
0
votes
0
answers
543
views
Android periodic ble scan
I have a BLE thermometer that advertises current temperature exactly every 5 seconds.
I want to write an app (service) for my Android 9 phone (Xiaomi), that will perform periodic BLE scan to read the ...
0
votes
0
answers
187
views
can start and stop BLE scan for every one second once?
In my app, I have to stop and start the BLE scan for every seconds. In this case scan result are not updating properly and also getting scan failed error like
a BLE scan with the same settings is ...
0
votes
1
answer
515
views
Android ble: Unable to send large data
I'm trying to implement an app for transfer some strings between ble devices (for now one device act as central and the other one as pheripheral) but without success.
This is how my peripheral (...
0
votes
1
answer
297
views
Android BLE app Gatt call back stops responding
I am trying to develop a BLE app that has multiple activities to control a custom BLE device. The problem I am having right now is dealing when the device is out of range or when connection is lost.
...
0
votes
1
answer
116
views
How to handle BluetoothGattCallback overwrite method onCharacteristicChanged() notification
I am trying to connect my android application with BLE. When an App connects with BLE, i want to read the characteristic data.
But in my case, all the characteristic response come in ...
0
votes
1
answer
200
views
Android BLE devices not detecting each other
I am trying to use Google's Sample BLE library to send data between two LG Phoenix 4 phones, both running Android 7.1 and both BLE-compatible. I have successfully gotten the app onto both phones, but ...
0
votes
1
answer
2k
views
BLE - Bluetooth GATT service can't close connection
I have implemented BLE and it works. The flow is: DrawerActivity starts, it sets a fragmentA, which has BLE implementation, because I want active BLE only in fragmentA. So if you switch to fragmentB ...
0
votes
0
answers
2k
views
GATT_READ_NOT_PERMIT error when trying to use Android device as GATT server
I have an android application that has BLE GATT Server running so the android phone would be a peripheral device and other devices can connect to it.
Sometimes the connections works fine, but very ...
0
votes
1
answer
415
views
readCharacteristic returned true, but onCharacteristicRead is not called
After connecting to BLE device and discovering its services, I check that a certain characteristic is readable, then, I call readCharacteristic. This call returns true, but the callback ...
0
votes
1
answer
333
views
How to change the bluetooth low energy range in Android as programming?
Is it possible categorize the BLE into four proximity zones:
immediate (strong signal; usually up to a few centimeters)
near (medium sign; usually up to a few meters)
far (weak signal; more than a ...
0
votes
0
answers
153
views
After connect and fast disconnect, my BLE module becomes invisible to other devices, even when I stop the app
I have a Bluetooth LE module I connect to with an App (Xamarin based, but not sure that's important).
I have noticed that I have some case where I connect to the module, then quickly (attempt to) ...
0
votes
1
answer
3k
views
BLE BluetoothGattCallback gets a STATE_DISCONNECTED when device is still ON
Bluetooth device is: Blue Maestro Tempo disk sensor. (Sensor 23, temperature + humidity + dew point sensor)
This is the link for the vendor SDK which has the bug I am trying to fix.
I connect to the ...
0
votes
0
answers
72
views
Write to device characteristic in order to "authenticate", Kotlin
I'm very new to RxAndroidBle and RxJava or RxKotlin.
I have a task somehow similar to this one, How to receive all notifications in RxAndroidBle
I need to wirte to a characteristic in order to "...
0
votes
0
answers
792
views
How to send Hex string as a unsigned byte[] to BLE characteristic?
byte bytes[] = {0x04,0x08,0x0F,0x66,(byte)0x99,0x41,0x52,0x43,0x55,(byte)0xAA};
ch.setValue(bytes);
If I log the output of this array I get (note the negative values):
[4, 8, 15, 102, -103, 65, 82, ...
0
votes
0
answers
90
views
Android BLE data reception issue
Im writing a BLE app for android as the title says, but when I select a device from my list of discovered devices (my embedded device), the app connects but no data shows up... unless I select it a ...
0
votes
0
answers
175
views
Android BLE Design Pattern viability
I have looked on numerous topics on android BLE stack in various website. From what i gathered, the bluetooth stack in android is unreliable and not suitable for any fast and concurrent connection.
...
0
votes
1
answer
1k
views
How to send hex value to BLE device?
I am developing one ble application in which as an input I have to give BLE a hex value as a time parameter so that the device will run for that much time. I have tried everything I know but it is not ...
0
votes
1
answer
106
views
Connect A-Frame to BLE devices on any smartphones
I have an application that uses A-Frame to display an animation in "VR". I say "VR" because there is not interaction from the user, I use VR-headset and VR-technologies to focus the user on an ...
0
votes
0
answers
490
views
How does command response work in a BLE device?
I am able to connect to a BLE device. Then into the command services Writable Characteristics, I am writing a command. OnCharacteristicsWrite returns the GattStatus as Success as well. Where can I ...
0
votes
1
answer
1k
views
Android O : Ble Scanner not scanning - Not getting any scan call back event
I am using google pixel with Android O . I am seeing that in my application after a while there is no scan call back coming .
Below is the btif log I have captured
11-02 19:18:20.561 19922-19985/? E/...
0
votes
3
answers
2k
views
BLE writeCharacteristic issue
I'm trying to writeCharacteristic() to a BLE device.
I used Google example app to establish the connection, the connection is fine. I can see the BLE Services and the services Characteristics.
The ...
0
votes
1
answer
154
views
RxAndroidBle with java 7
I am trying to use RxAndroidBle to scan for devices. All the examples I found seem to use java lambda expression. Do I need java 8 with android studio to use the RxAndroidBle library? How can I run ...
0
votes
1
answer
347
views
Detect which BT device is going out of range
Is there a way to check which device among the paired Bluetooth devices is out of range/disconnected? I am able to see that some device is going out of range but need to identify which device is going ...
0
votes
1
answer
900
views
Is Android Gatt Disconnect Clean?
I am testing my BLE Android App on different Phones ranging from Android 5.0 to 7.1. I am seeing that even though the Disconnection event occur the next BLE connection takes time with intermittent ...
0
votes
2
answers
1k
views
debugging Android Bluetooth Disconnection
I am seeing the Android bluetooth disconnection often when I am trying to interact with a hardware using my android app. I am nto sure if it is due to my Android App/firmware or due to some other ...
0
votes
1
answer
262
views
Service v/w Gatt connection in Android BLE API
I am noticing in the adb logs that the services are discovered first and then the (gatt) connection is made with the device . Is it true?
Isn't the gatt connection is made first and then the services ...
0
votes
1
answer
126
views
How to send AE A7 04 00 05 09 BC B7 command to BLE
I need to send AE A7 04 00 05 09 BC B7 command to BLE device. Can You help me to manage it ? I mean what and how have I to do after connection to device ?
public void WriteValue(String strValue)
{...
0
votes
0
answers
34
views
Android retrieve or assign BluetoothGattCallback to-from active connection initiated in 3rd party library
I currently have a project on my desk which uses a 3:rd party library that deals with (BLE) device specific functionality. That means, library handles attempts to connect, enabling characteristics ...
0
votes
1
answer
367
views
what does mAdvertiseFlags = -1 means in the Android BLE Application?
While runnig a BLE android App I am getting mAdvertiseFlags = -1 in the adblog for a given Mac ID of a wearbale_X , what does -1 means?Sometime mAdvertiseFlags becomes 4.
For some other wearbale_Y ...
0
votes
0
answers
2k
views
Android BLE Connection, time interval
Hello I am new in Android BLE, I am connecting BLE device, in that if connection fails it will try to reconnect 5 times, if still connection failed, then it will show message to user that connection ...
0
votes
1
answer
371
views
Android BLE iBeacon advertisement packet larger than expected
I'm attempting to get an estimated range to a BLE device, given the devices RSSI and calibrated transmission power.
The calibrated txPower is supposedly emitted as the last byte in the peripherals ...