Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 30349

React-native android running out of BluetoothGatt objects using most common library react-native-ble-manager

$
0
0

I have posted on the github issues page for react-native-ble-manager #596 my problem. Has anyone else run into this problem? Basically I've collected enough data to know that BluetoothGatt objects are limited and I'm hitting that limit. The problem is I don't see anything in the library code that would cause this issue. The gatt object calls close() and gets set to null on disconnect.

So here's the details: connected to 4 devices (bonded), each device is set to notify on 2 characteristics. At times the devices get disconnected but not often; app running (in debug build) for 5-10 hours then I get the message bt_btif : Register with GATT stack failed. and that's the end of collecting data.

I've reviewed the library's android code but don't see anything that "holds" on to references of the BluetoothGatt other than the one for the peripheral object and only one of those are created for each peripheralUUID from the Manager class. I've spent way to much time on this issue to not have a solution. HMOWKYMOH

Further thoughts:

  • Do I need to manually turn off the notify characteristics when the device becomes disconnected or does the underlying object handle that?

  • Could frequent scanning when a disconnet happens cause a problem? I scan every ~6 seconds when I'm not connected to all expected devices.


Viewing all articles
Browse latest Browse all 30349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>