Commit 3074107
committed
Fix discovery of descriptors
The 'nextCharacteristic' selection was wrong.
Thus, when using nextCharacteristic for taking the end handle for the request, the end handle of the current characteristic was taken.
This resulted in the following condition to be true: (reqStartHandle > reqEndHandle)
For such reason, in many cases the descriptors were not retrieved. Specifically, all the characteristics of a service, except the last one, will result without descriptors.
This will result in an error where trying to subscribe to a characteristic which has a descriptor before the CCCD one. (for instance the User Description Descriptor)
In case the subscription is made on a characteristic having the CCCD as first descriptor there are no errors, because if no descriptors are found the write request, needed for the subscription, will be made to the char value handle + 1.1 parent 95ce2e1 commit 3074107
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1561 | 1561 | | |
1562 | 1562 | | |
1563 | 1563 | | |
1564 | | - | |
| 1564 | + | |
1565 | 1565 | | |
1566 | 1566 | | |
1567 | 1567 | | |
| |||
0 commit comments