After connecting to a specific ScanResult like this
bluetoothGatt = scanResult.getDevice().connectGatt(getActivity(), false, new MyBluetoothGattCallback());
I call Androids BluetoothGatt.discoverServices()
method and in BluetoothGattCallback.onServicesDiscovered()
I call getServices()
on BluetoothGatt
.
When I list the services and the regarding characteristics I get a lot more what I expect. It should be 1 service with 1 characteristic at this Peripheral simulated with LightBlue on the iPad, but there are a lot more services.. take a look into my log:
MyBluetoothGattCallback﹕ service: 00001800-0000-1000-8000-00805f9b34fb MyBluetoothGattCallback﹕ characteristic: 00002a00-0000-1000-8000-00805f9b34fb MyBluetoothGattCallback﹕ characteristic: 00002a01-0000-1000-8000-00805f9b34fb MyBluetoothGattCallback﹕ service: 00001801-0000-1000-8000-00805f9b34fb MyBluetoothGattCallback﹕ characteristic: 00002a05-0000-1000-8000-00805f9b34fb MyBluetoothGattCallback﹕ service: d0611e78-bbb4-4591-a5f8-487910ae4366 MyBluetoothGattCallback﹕ characteristic: 8667556c-9a37-4c91-84ed-54ee27d90049 MyBluetoothGattCallback﹕ service: 7905f431-b5ce-4e99-a40f-4b1e122d00d0 MyBluetoothGattCallback﹕ characteristic: 69d1d8f3-45e1-49a8-9821-9bbdfdaad9d9 MyBluetoothGattCallback﹕ characteristic: 9fbf120d-6301-42d9-8c58-25e699a21dbd MyBluetoothGattCallback﹕ characteristic: 22eac6e9-24d6-4bb5-be44-b36ace7c7bfb MyBluetoothGattCallback﹕ service: 0000180f-0000-1000-8000-00805f9b34fb MyBluetoothGattCallback﹕ characteristic: 00002a19-0000-1000-8000-00805f9b34fb MyBluetoothGattCallback﹕ service: 00001805-0000-1000-8000-00805f9b34fb MyBluetoothGattCallback﹕ characteristic: 00002a2b-0000-1000-8000-00805f9b34fb MyBluetoothGattCallback﹕ characteristic: 00002a0f-0000-1000-8000-00805f9b34fb MyBluetoothGattCallback﹕ service: 89d3502b-0f36-433a-8ef4-c502ad55f8dc MyBluetoothGattCallback﹕ characteristic: 9b3c81d8-57b1-4a8a-b8df-0e56f7ca51c2 MyBluetoothGattCallback﹕ characteristic: 2f7cabce-808d-411f-9a0c-bb92ba96c102 MyBluetoothGattCallback﹕ characteristic: c6b2f38c-23ab-46d8-a6ab-a3a870bbd5d7 MyBluetoothGattCallback﹕ service: 00001111-0000-1000-8000-00805f9b34fb MyBluetoothGattCallback﹕ characteristic: 00002222-0000-1000-8000-00805f9b34fb
Could somebody explain me why I get so much services there? Is there something with caching?