Skip to content

Commit 5978985

Browse files
authored
Merge pull request arduino-libraries#99 from Polldo/master
Fix discovery of descriptors
2 parents 405c59f + 3074107 commit 5978985

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utility/ATT.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,7 @@ bool ATTClass::discoverDescriptors(uint16_t connectionHandle, BLERemoteDevice* d
15611561

15621562
for (int j = 0; j < characteristicCount; j++) {
15631563
BLERemoteCharacteristic* characteristic = service->characteristic(j);
1564-
BLERemoteCharacteristic* nextCharacteristic = (j == (characteristicCount - 1)) ? NULL : service->characteristic(j);
1564+
BLERemoteCharacteristic* nextCharacteristic = (j == (characteristicCount - 1)) ? NULL : service->characteristic(j + 1);
15651565

15661566
reqStartHandle = characteristic->valueHandle() + 1;
15671567
reqEndHandle = nextCharacteristic ? nextCharacteristic->valueHandle() : serviceEndHandle;

0 commit comments

Comments
 (0)