-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terrible handling of initLen / minLen and variable length characteristics. #93
Comments
ARM Internal Ref: IOTSFW-1159 |
@Timmmm I agree that |
@Timmmm Apologies on the delay for a fix. I have just submitted two pull requests to address the issue (to ble and ble-nrf51822). The Notice that currently all attributes are marked as 'variable'. We will be submitting pull requests to deal with this shortly, but it was decided that we would do this separately because it requires changing the constructors of the |
Awesome, no need to apologise! |
Excellent, thanks! |
See: https://devzone.nordicsemi.com/question/34390/no-ble_gatt_hvx_notification-under-20-bytes/?answer=55637#post-id-55637
Basically there are two problems:
GattCharacteristic
initLen
parameter is randomly namedminLen
too. If you follow the code all the way through it actually does two things - it is the initial length (not minimum), and it determines whether the characteristic is variable length or not.initLen != maxLen
. This is really stupid because you might want the initial length to equal the maximum length but still have variable length. It also isn't documented anywhere.I suggest the following solution:
bool variableLength
.initLen
to beinitLen
everywhere consistently (and notminLen
).The text was updated successfully, but these errors were encountered: