Comments (16)
Hi, could you write what's exactly the issue? I don't follow...
from android-ble-library.
Hi,
The issue is that I'm only receiving part of the data that the device receives. The logs on sensor peripheral indicate that data is being read by the device but GattCallback is not updating the app.
from android-ble-library.
Hi, I ran some more tests, while the Log output for my app is free of any errors, I get this when "No Filters" option is selected for Logcat.
? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 160) ? E/BtGatt.JNI: An exception was thrown by callback 'btgattc_notify_cb'. ? E/Watchdog: !@Sync 1475 [2018-03-19 11:56:36.577] ? E/BtGatt.JNI: android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died at android.os.BinderProxy.transactNative(Native Method) at android.os.BinderProxy.transact(Binder.java:761) at android.bluetooth.IBluetoothGattCallback$Stub$Proxy.onNotify(IBluetoothGattCallback.java:406) at com.android.bluetooth.gatt.GattService.onNotify(GattService.java:1322)
and Since this error is repeated a lot of times, I'm guessing this happens for every data point lost.
from android-ble-library.
Are you sure that the ble manager is alive? Hasn't been killed with activity, service, garbaged, etc?
Do you have the instance to it in the service?
from android-ble-library.
Yes, I even plotted the data that is received in the app. And like I said, not all of the data is missing.
But some data points in between, I was able to verify that the last and first timestamp were there in the data received.
That would not be possible if BleManager had died. I'm using an Activity to manage Ble connection.
from android-ble-library.
Hi, just wondering if you can do a speed test and include it in the Readme so that there's no confusion regarding this matter.
Things to test:
-
Maximum data throughput on various devices.
-
Minimum interval in the notification updates for reliable data transfer between Android and Ble peripheral.
This would set the performance standard for any app using this library.
from android-ble-library.
Hi, did you manage to solve the problem somehow? In the meantime I released v2-beta of the library, did you give it a try?
from android-ble-library.
@philips77 Yeah, at the time I used my own ble implementation though. I'll try the v2-beta version and report here if the issue persists.
from android-ble-library.
Hi guys,
We have been experiencing a similar problem to the one outlined above. We have our android devices connected to a sensor via BLE, and the data being collected is the transferred to the mobile device and plotted in a graph on our app. However, in some cases and some mobile devices the data is incomplete or missing. We know this because we can see a complete data set on one device and another displays breaks/gaps in the generated graph.
Any thoughts as to why this might be? How should we go about diagnosing the problem?
from android-ble-library.
My idea is that in here: https://github.com/NordicSemiconductor/Android-BLE-Library/blob/develop/ble/src/main/java/no/nordicsemi/android/ble/MainThreadBluetoothGattCallback.java#L135, when the safe method is called from the UI thread, the value inside the characteristic might have been already changed. I need to pass the data as byte array. That is of course if you are using v2 of the lib.
from android-ble-library.
@philips77 I can confirm we are currently running with v2.0 beta5.
from android-ble-library.
Hi, in the 2.0.0 the reference to value received in onCharacteristicChanged
is copied as quickly as possible and then not used, unless you use deprecated onCharacteristicNotified(BluetoothGatt, BluetoothGattCharacteristic)
method. If you are using the new callbacks you should get the proper data every time. Are you saying this doesn't work for you and you still get overwritten data in the callbacks?
from android-ble-library.
Hi, could you try version 2.0.3? I've fixed #54 and that might have fixed your issue as well.
from android-ble-library.
Hi @philips77, thanks for the information and your efforts, we will test with 2.0.3 and get back to you with our results.
from android-ble-library.
Any success?
from android-ble-library.
The issue has been fixed in 2.0.3. If you are using BLE Common Library please wait until this NordicSemiconductor/Android-BLE-Common-Library#2 task is resolved. use version 2.0.5 or newer.
from android-ble-library.
Related Issues (20)
- Null reference exception when calling disconnect HOT 2
- Sometimes onServiceDiscoverd is not called when connecting. HOT 1
- Samsung Tab S6 Lite: Connection Parameter Negotiation HOT 1
- Catch SecurityException from setCharacteristicNotification HOT 2
- NullPointerException android.bluetooth.BluetoothGattServer.cancelConnection(android.bluetooth.BluetoothDevice)' on a null object reference HOT 3
- Library DefaultMtuSplitter is splitting incorrectly for android OS 14 HOT 8
- How to Catch Exception with RequestFailedException HOT 1
- Ask a question, thank you HOT 1
- Want to get the characteristic on which the data was received for the characteristics I have subscribed to get notified for HOT 2
- Concurrent modification exception while notifying device disconnected
- Disconnect not working on various Samsung devices HOT 2
- No response from writeCharacteristic HOT 5
- Question: Will this allow me to send HCI Level Commands? HOT 1
- I stoped receiving notifications even when i have still not get all data HOT 23
- Sometimes causing system Bluetooth to crash. HOT 4
- Notification does not clear after setup a device HOT 3
- Connection interval changes on its own HOT 3
- OTA upgrade problem HOT 1
- Cannot connect the BLE device HOT 6
- A couple of questions, possibly bugs HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-ble-library.