BT: attribute value too long, to be truncated to 22
logged to the console. However we don't get an error indication back from esp_ble_gatts_send_response() ... it returns ESP_OK and it is later in the logs that the error message is returned.
When the error occurs, I seem to see that we very quickly get a second (and then subsequent) ESP_GATTS_READ_EVT received.
When we look at an ESP_GATTS_READ_EVT we see that among its data structure properties is a field called "is_long". This is mysteriously documented in our docs as:
On the very first event to read the characteristic, the passed in value of "is_long" is 0 while on the subsequent events, we find that "is_long" has the value 1.The value is too long or not
There are many guesses that can be made here ... they could be:
1. We can't have a characteristic > 22 bytes in length
2. We can have a characteristic that is > 22 bytes in length but somehow must "chunk" it into 22 byte parts.
If (2) is correct, then I'd like to have explained (so that I may then document for others) what the procedure should be for working with data lengths. Is there something "magic" about 22? Is this a dynamic setting?