• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Is there a callback function available for all received BLE packets?

VeenaKamath

Lurker
Feb 20, 2018
1
0
Hi,

I am new to BLE and Android app development
I need to create an Android app to read the data sent from a BLE peripheral. The peripheral is not running any standard profile. It has one custom service. For achieving maximum throughput the peripheral is configured to send data at every connection interval. The data is sent as a notification (not a characteristic notification!). When I sniff the channel, I see data packets at every connection interval
Sample data below:
upload_2018-2-20_14-28-8.png


The handle 0x1E correspond to the primary service declaration.

Is there a way to get this data. I need a callback for every packet receive or a callback when there is a change in the primary service declaration value.

I am able to discover this service and read/write to the characteristics. But I do not know how to receive this notification. onCharacteristicChanged callback did not help!

Any help is highly appreciated

Thanks,
Veena
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones