I have found the bellowing code which was in s130/ble_gatts_struct_seriallization.c of nRF51_SDK_10.0.0 : ( ble_gatts_attr_md_enc)
/* serializer does not support attributes on stack */
if (p_attr_md->vloc != BLE_GATTS_VLOC_STACK) {
err_code = NRF_ERROR_INVALID_PARAM; }
Is that to say the s130 softdevice only support BLE_GATTS_VLOC_STACK, not the BLE_GATTS_VLOC_USER ?
Further more how to support BLE_GATTS_VLOC_USER?
What is the meaning "Attribute Value is located in user memory. This requires the user to maintain a valid buffer through the lifetime of the attribute, since the stack will read and write directly to the memory using the pointer provided in the APIs." ??