How to read value of sd_ble_gatts_value_set() more than 512 bytes

SDK version: nRF5_SDK_15.3.0

Platform: nRF52840 DK

SoftDevice: s140


Hi All,

I use ble_app_blinky example and Android nRF Blinky SDK to add new function.

Recently, I add a new characteristic and use sd_ble_gatts_value_set() to set JSON format string.

On Android APP side, call readCharacteristic(mCharacteristic) API to read the JSON string.

It works if the JSON string less than 512 bytes.

I know that the p_value of the function packet format of sd_ble_gatts_value_set() is 0~512 bytes. (0xA5-sd_ble_gatts_value_set).

I think I need to break the JSON string into multiple packets to avoid p_value more than 512 bytes.

but I have no idea how to do multiple packets and let APP call readCharacteristic(mCharacteristic) API one time to get all packets?

Is there any example of sd_ble_gatts_value_set() more than 512byes or any suggestion? 

Thank you,