Skip to content

Commit 37e3b53

Browse files
committed
Modified to work correctly when multiple characteristics of the same uuid are passed.
1 parent e83bf40 commit 37e3b53

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libraries/Bluefruit52Lib/src/BLEDiscovery.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ uint8_t BLEDiscovery::discoverCharacteristic(uint16_t conn_handle, BLEClientChar
134134
{
135135
for (uint8_t i=0; i<count; i++)
136136
{
137+
if ( chr[i]->discovered() )
138+
continue;
139+
137140
if ( chr[i]->uuid == disc_chr->chars[d].uuid )
138141
{
139142
LOG_LV2("DISC", "[CHR] Found 0x%04X, handle = %d\n-----------------", disc_chr->chars[d].uuid.uuid, disc_chr->chars[d].handle_value);

0 commit comments

Comments
 (0)