Giter VIP home page Giter VIP logo

Comments (16)

philips77 avatar philips77 commented on August 16, 2024

Hi, could you write what's exactly the issue? I don't follow...

from android-ble-library.

svvashishtha avatar svvashishtha commented on August 16, 2024

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.

svvashishtha avatar svvashishtha commented on August 16, 2024

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.

philips77 avatar philips77 commented on August 16, 2024

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.

svvashishtha avatar svvashishtha commented on August 16, 2024

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.

svvashishtha avatar svvashishtha commented on August 16, 2024

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:

  1. Maximum data throughput on various devices.

  2. 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.

philips77 avatar philips77 commented on August 16, 2024

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.

svvashishtha avatar svvashishtha commented on August 16, 2024

@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.

bnchrnck avatar bnchrnck commented on August 16, 2024

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.

philips77 avatar philips77 commented on August 16, 2024

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.

bnchrnck avatar bnchrnck commented on August 16, 2024

@philips77 I can confirm we are currently running with v2.0 beta5.

from android-ble-library.

philips77 avatar philips77 commented on August 16, 2024

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.

philips77 avatar philips77 commented on August 16, 2024

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.

bnchrnck avatar bnchrnck commented on August 16, 2024

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.

philips77 avatar philips77 commented on August 16, 2024

Any success?

from android-ble-library.

philips77 avatar philips77 commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.