This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

send "sd_ble_gattc_write" continuously

Hi. I'm using PCA10028, SDK10.0.0, S130 as central. I'm using "sd_ble_gattc_write" when i want to send string to peripheral.

But if i send this function continuously, system doesn't work.

for example,

uint32_t val;
for(int i=0;i<50;i++){
	    const ble_gattc_write_params_t write_params = {
	        .write_op = BLE_GATT_OP_WRITE_CMD,
	        .flags    = BLE_GATT_EXEC_WRITE_FLAG_PREPARED_WRITE,
	        .handle   = tx_handle,
	        .offset   = 0,
	        .len      = length,
	        .p_value  = p_string
	    };
            val=sd_ble_gattc_write(conn_handle, &write_params);
}

I need your help.

Related