This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

bug in ble_db_discovery.c

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:

  1. connect to an iOS device;

  2. discover the CTS server on it;

  3. see 2 characteristics with handles 26 and 27;

  4. disconnect it and connect a Android device;

  5. discover the CTS server on it (it has another handles);

  6. 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.

Related