CN / EN
CN / EN

提问

设计支持

您的项目私密技术问题如需获得一对一支持,请点击下方联系我们。

使用GR533x发送数据 GR533x

150****com

2024-06-15 12:20

使用GR533x发送数据时报SDK_ERR_INVALID_DURATION_PARAM错误哪里设置有问题呀

sdk_err_t xops_cmd_data_send(uint8_t conn_idx, uint8_t *p_data, uint16_t length)
{
    sdk_err_t            error_code = SDK_ERR_NTF_DISABLED;
    ble_gatts_noti_ind_t send_cmd;

    if (PRF_CLI_START_NTF == s_xops_env.cmd_ntf_cfg[conn_idx])
    {
        // Fill in the parameter structure
        send_cmd.type   = BLE_GATT_NOTIFICATION;
        send_cmd.handle = prf_find_handle_by_idx(XOPS_IDX_CMD_VAL, s_xops_env.start_hdl, (uint8_t *)&s_char_mask);

        // Pack measured value in database
        send_cmd.length = length;
        send_cmd.value  = p_data;

        // Send notification to peer device
        error_code = ble_gatts_noti_ind(conn_idx, &send_cmd);
    }

    return error_code;
}


0收藏

0赞成

zhongchengzhi

汇顶员工
2024-06-17 09:50

您好:

1、ble_gatts_noti_ind不会报SDK_ERR_INVALID_DURATION_PARAM错误;

2、ble_gap_adv_start在ble_gap_adv_time_param_t.duration参数不合理的时候可能会报这个错误;

3、您这边检查确认下,ble_gatts_noti_ind返回的错误是SDK_ERR_INVALID_DURATION_PARAM么?

1条评论

0赞成

0收藏

您的评论

登录后可回答问题,请 注册

我们时刻倾听您的声音
联系销售

扫描关注公众号

打开微信,使用“扫一扫”即可关注