Can anyone point me to examples of how to set up a read characteristic to be longer than 20 bytes? Presumably if the characteristic is longer than 20 bytes it will automatically start using the BLOB methods internally to transfer the data - or do I need to do something different to handle this data?
I can set the basic attribute up fine - but when the ReadAttrCB callback is called it is not at all clear what to do with offset, maxLen etc?
What is maxLen - the length of data required to be read into the destination?
Should offset be applied to the pValue pointer - or has that already had the offset applied to it?
I'm assuming the offset needs to be applied to the pAttr->pValue pointer to access the right bit of data.
Should pLen be set to the total size of the characteristic or the amount of data that was actually transferred across in this call?
Current in the callback I have the following:
case SIMPLEPROFILE_CHAR5_UUID:
*pLen = maxLen;
VOID osal_memcpy( pValue, (pAttr->pValue)+offset, maxLen );
break;
but it does not work and I'm really guessing what these parameters mean at this point.
Thanks,
Simon.