This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

sd_ble_gatts_hvx datasize error

Hi, I try to modifie ble_multilink example et send more than one data, here is my main code code :

 static uint8_t test[4] = {0x41, 0x42, 0x43, 0x44};
 static uint16_t testLen = 4;
        memset(&params, 0, sizeof(params));
        params.type = BLE_GATT_HVX_NOTIFICATION;
        params.handle = m_lbs.button_char_handles.value_handle;
        params.offset = 0;
        //params.p_data = test;
        params.p_data = (uint8_t*)(&test[0]);
        params.p_len = &testLen;
        err_code = sd_ble_gatts_hvx(m_lbs.conn_handle, &params);

The problem is that sd_ble_gatts_hvx() retrun NRF_ERROR_DATA_SIZE, and I can't get why.

any idea ?

Parents Reply Children
No Data
Related