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
1
vote
0
answers
153
views
Bluetooth-LE GATT write results in notification with same data using RN4020 MLDP protocol
I wonder if anyone else is seeing this. We have successfully used the RN4020 MLDP protocol (similar intent to SPP on Classic Bluetooth) with both iOS and a Bluetooth-LE USB module (BLED112) on ...
1
vote
0
answers
404
views
Unable to get UUID of a device
I am trying to get UUID, major, and minor of a BLE device and show it in listview, but every single time my parseUUIDs() is returning an empty list.
I have tried other methods also, but i'm still ...
1
vote
0
answers
2k
views
BLE onCharacteristicRead receiving status 133
I'm developing a BLE central application (server) and testing it on my Samsung Galaxy S8. The application was working before my phone decided to update (from 7.1.0 to 8.0.0).
I'm doing a standard ...
1
vote
1
answer
656
views
Android BluetoothDevice: obtain paired device type when Bluetooth Low Energy
Here is the problem. The user has run my app previously and discovered and paired with a Bluetooth Low Energy health device. That's all the app works with is health devices. I keep track of that ...
1
vote
1
answer
178
views
ScanCall back not Coming in Android Oreo
I am not able to get my ble scanner working.There is no scanCalll Back is occuring.
Below is my code:
MainActivity:
public class MainActivity extends AppCompatActivity {
@Override
...
1
vote
0
answers
245
views
Android: connect multiple BLE devices without using third party libraries
I am working on Android BLE Devices. Right now, I am trying to keep state connected of two BLE devices(eg. two Scales devices or Activity Sensor devices).
Well, I know I can do that by using multiple ...
1
vote
1
answer
80
views
Determine Characteristic Notfication emission count by first emission
I am currently implementing a protocol for a Bluetooth device and i am using the RxAndroidBle Library (version 1.4.3).
I have to request data from the device by writing to characteristic and then ...
1
vote
1
answer
960
views
Missing value for RR-interval (BLE / Polar device)
I'm owning a Polar H10 device and I'm interested in the heart rate as well as RR-interval which I read out with the official bluetooth low energy API of Android. The Polar device sends every every ...
1
vote
0
answers
583
views
BLE Device disconnect event delay
I have a problem with BLEdevice - android BLE stack does not reports about its disconnect for about 15 seconds after device was disbled. Actual disconnect event appears on timeout, as I can see. Is ...
1
vote
0
answers
581
views
OnErrorNotImplementedException somehow still being called with included error handling
Im performing a write to a BLE characteristic, where with these specific devices certain characteristics are not writeable if the peripheral is still locked.
I'd like to simply provide a visual ...
1
vote
0
answers
60
views
android ble stops working?
I have a android app that connects to a ble device. The device sends data to the app when a button is pushed on the device. Sometimes the app and the device show that they are connected but when I ...
1
vote
0
answers
684
views
onCharacteristicChanged getting called multiple times without change in Characteristic values
I'm developing an android bluetooth low energy app where I'm getting data from a peripheral device in a single characteristic. I have enabled notifications on this characteristic and process ...
1
vote
1
answer
230
views
Android BLE OutOfMemoryError in startScan()
On scanning BLE devices using BluetoothLeScanner#startScan(), i am receiving OutOfMemoryError when i pass filter and ScanResult. Error does not come if i pass only ScanCallback.
Scanning code:
...
1
vote
0
answers
360
views
Android BLE disconnect every 40 seconds and reconnects again after 20 seconds
I am implementing an Android app the connects to BLE device. Every time the device is connected to the mobile, it automatically disconnects after 40 seconds and then auto-reconnect after 20 seconds. ...
1
vote
1
answer
218
views
Android BLE - how to save battery lfie
my client wants an application which essentially uses all these all the time i.e. in a background service:
- network/wifi
- location service
- BLE scanning
Which means this has a big effect on the ...
1
vote
0
answers
59
views
gatt.disconnect() is initiated host but not by the app
I've been breaking my head with this issue....
i send a gatt.write command to my remote device, sometimes getting response and sometimes not because the gatt disconnects at all times from my app! (...
1
vote
2
answers
1k
views
Android BLE is connecting to multiple devices at once
I've seen plenty of questions about how to connect to multiple devices purposely. But in my situation, I am only trying to connect to one hardware device.
I have two hardware devices that are ...
1
vote
0
answers
381
views
How to read and write data into BLE devices in android?
I Scanned the BLE device and its displaying device name, RSSI value and MAC address.
How to check whether BLE device has data or no?
And how to read and write data from/to BLE Device?
Can you ...
1
vote
0
answers
187
views
New Lollipop BLE API does not detect all advertising packets
I have seen a few posts with the same question but I have no been able to get a solution for my problem.
I see that the callback function (onScanResult) for the new BLE API detects advertising ...
1
vote
1
answer
1k
views
How to extract latitude and longitude from location_and_speed characteristic?
In an Android app in central role - how do you please get a hold of the latitude and longitude stored in the org.bluetooth.characteristic.location_and_speed characteristic in the org.bluetooth.service....
1
vote
1
answer
127
views
Android App not reading Values after 0x7F
I have app that receives data from a ble device.
first it sends data as |0/1|date1|month1|hour1|minute1|date2|month2|hour2|minute2|0x8A|
App reads every values except 0x8A.
When i referred some ...
0
votes
1
answer
700
views
BLE packet drops when Bluetooth and BLE are simultaneously in use
I am using BLE v4.1 for my application where I am able to transfer 200 packets of length 20 bytes each from peripheral to central side.
I want to transfer data via BLE and play some music while the ...
0
votes
1
answer
2k
views
What services and characteristic must use to send data over BLE in android?
I develop a Android app to send data to BLE device. When i connecto to BLE device, i discovered services and characteristics and get this
onGetService() - Device=D8:80:39:F0:03:6E UUID=00001800-0000-...
0
votes
3
answers
1k
views
Getting onCharacteristicWrite status=0, but BLE device does not send any data
I am sending this command AE A7 04 00 05 09 BC B7 to BLE, onCharacteristicWrite returns status=0, but BLE device does not send any data ( I mean I do not get any response ). So what is wrong ? Maybe I ...
0
votes
1
answer
3k
views
How to write hex value to BLE device?
I have a BLE device prototype. I am able to scan the device, connect to it. I am also able to write its password as BLE characteristic . Password is in String. But when I am trying to write other ...
0
votes
2
answers
702
views
GATT onDescriptorRead - only one callback
I've initiated a BLE connection, in onServicesDiscovered I'm going to read out all descriptors. There are five of them and I proceed with this:
for (int n=0;n<descriptors.size();n++)
{
gatt....
0
votes
1
answer
394
views
How will i Split a String that received from a ble device for if else checking and display a value on Textview
In my Android app I receive data from my ble device as something like 10100201201511 ( it includes date,time and other attributes).
I hope I received it as a string, I want to check that value and ...
0
votes
1
answer
16
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
1
answer
150
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
1
answer
573
views
Handling Notifications on Android with Multiple BLE Peripheral Connections
So, I am new to Android development and I am trying to connect my device to multiple BLE devices (T-Wristband) to receive frequent notifications (IMU sensor data less than 20 bytes at 50Hz).
When ...
0
votes
1
answer
753
views
How can I write to a BLE GATT characteristic using RxAndroidBle in Kotlin?
I am unable to use the sample code to write to a GATT characteristic over BLE. I'm using the following code from Polidea's examples available here: https://github.com/Polidea/RxAndroidBle
Code:
...
0
votes
1
answer
458
views
Obtaining RSSI from Scan Request / Scan Reply packets
I'm new to android development and I'm writing a APP as proof of concept for a research project using the BLE Google API. I have two android phones, one of which is advertising some beacon X that ...
0
votes
1
answer
380
views
Is it possible to determine/identify when BLE device is about to disconnect
I have a BLE device (self made) that I pair with my app (iOS+Android).
I want to notify the user when the bluetooth signal is weak or better - when the device is about to disconnect.
Searching the ...
0
votes
1
answer
373
views
Android BluetoothLe keeping Gatt client-server connection alive
I am developing an android BLE application and I have successfully created the app which connects with the BLE peripheral. Right now Gatt server gets disconnected and reconnected again on interval of ...
0
votes
1
answer
42
views
BLE, Scanning devices with service A or B or C
I'm executing a scan with BluetoothLeScanner to search for devices running one of 3 services.
I've tried adding the services UUIDs to a ScanFilter list, but it seems the scan searches for devices ...
0
votes
1
answer
463
views
Read characteristics on ble not called
I am very much new to ble and still trying my hand in it. In my app, I am trying to send a byte array to the ble device and in response, will be recieving a byte array from the device. However ...
0
votes
1
answer
1k
views
Android BLE- ScanCallBack is never called on BluetoothLeScanner.startScan()
I'm trying to develop a Beacon locator using the BluetoothLeScanner but the problem is that ScanCallBack is never called, to be precise neither of the methods onScanResult, onScanFailed nor ...
0
votes
1
answer
1k
views
Which Android API issues Scan Request and Responses
Is it Android gatt connect or Android scan(getBluetoothLeScanner) which results in the Scan Request and Response?
If we know the BLE Device address , can we directly connect it to without discovering ...
0
votes
1
answer
132
views
Application is not able to capture each and every scan responses from the ble device
I am developing a BLE android application where I have used RxAndroidBLe for BLE communication.
Everything working fine except one issue that the application is not receiving every scan response ...
0
votes
1
answer
652
views
In Android BLE which callback to use to ensure successful Message Delivery to remote BLE Device?
Which one is the actual confirmation callBack which tells that the data has been successfully delivered to the remote BLE Device from the Android Phone? onCharacteristicWrite() or ...
0
votes
1
answer
683
views
Android BLE gattcallback issue on read and write
I'm stuck in one weird problem from last week and it will make me mad soon, Stackoverflow is my last hope.
I simply wrote a code to communicate with BLE device. At first i'm just writing a value on ...
0
votes
1
answer
910
views
Android BLE callback OnWriteCallback stops after few seconds
I am trying to write next packet synchronously based on the OnCharacteristicWrite call back condition to achieve a maximum throughput. But for some reason it stops triggering OnCharacteristicWrite ...
0
votes
1
answer
2k
views
Android BLE is NOT connecting again after BLE device timeout [Using RxAndroidBle ]
I am working on Android BLE using RxAndroidBle library. The BLE device has a timeout of 5 min if there is no interaction. i.e. The device will disconnect automatically if there is no read/write ...
0
votes
1
answer
828
views
How to search custom/manufacturer specific beacon using Altbeacon Android library
I am working on Android trying to search/find beacons nearby and I am using Altbeacon Android library.
The beacon is custom and here is the manufacturer specific:
//---------------flags data type----...
0
votes
1
answer
150
views
service and three activity, start service is the right way?
I developed a Ble Android App composed from three activity and one service:
- the first one to scan the device
- the second one to connect to device
- the third one to write communication result on ...
0
votes
1
answer
597
views
How to check if a bluetooth response is received within a particular time limit?
I'm developing an app bluetooth to communicate with a device.
I have to send to that device a certain packet and that device respond to me in notify mode after a certain time.
All works well, but I ...
0
votes
1
answer
450
views
How to show data from a BLE device in multiple Textviews?
I have a humidity sensor that broadcasts the last ten values as a single array after a fixed time interval. I want to display these values in ten Textview's.
My current code displays all the values ...
0
votes
0
answers
31
views
Uncaught exception thrown by finalizer for Bluetooth Reconnection in Android - java.io.IOException: socket not created
Thanks in advance for helping. 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 ...
0
votes
0
answers
26
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
241
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 ...