Hi all,
may be it is just my misunderstanding, but I think it is must be fixed...
SDK12 ble_db_discovery.c\ble_db_discovery_start() never resets ble_db_discovery_t.services[].char_count value to zero before call of sd_ble_gattc_primary_services_discover() (followed by sd_ble_gattc_characteristics_discover()) as it is done in on_srv_disc_completion().
I found this after next actions:
-
connect to an iOS device;
-
discover the CTS server on it;
-
see 2 characteristics with handles 26 and 27;
-
disconnect it and connect a Android device;
-
discover the CTS server on it (it has another handles);
-
see 4 characteristics with handles 26, 27, 42, 0
As I understand the first pair is duplication from previous discovery and they are not really present in new attempt. Adding p_srv_being_discovered->char_count = 0; at line 878 solved problem for me.
I checked that the bug (I suppose) still present in SDK14.1.