Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BluetoothGatt returns empty service list after connection

I am building an app to read data from a ble device. After connecting to a device I call mBluetoothGatt.discoverServices() and in onServicesDiscovered(..) I am reading the list of service by calling getServices().

The problem is sometimes the list is empty.Has anyone faced this issue.The issue is random and not 100% reproducible.

like image 942
rupesh jain Avatar asked Sep 02 '15 22:09

rupesh jain


1 Answers

Yes,this is a Common problem.If you get empty services,you can retry discover . If you get empty more than 3 or 5 times,you should restart you Bluetooth,because it is may be unstable

like image 153
igakkis Avatar answered Oct 16 '22 08:10

igakkis