【求助】【TuyaOS OS】
TAL_PR_HEXDUMP_INFO("write buf:",pValue,len);
TKL_BLE_GATT_PARAMS_EVT_T gatt_param = {0};
gatt_param.type = TKL_BLE_GATT_EVT_WRITE_REQ;
gatt_param.conn_handle = connHandle;
gatt_param.result = 0;
gatt_param.gatt_event.write_report.char_handle = pAttr->handle;
gatt_param.gatt_event.write_report.report.length = len;
gatt_param.gatt_event.write_report.report.p_data = tkl_system_malloc(len);
if (gatt_param.gatt_event.write_report.report.p_data) {
memcpy(gatt_param.gatt_event.write_report.report.p_data, pValue,len);
Code: Select all
tkl_ble_gatt_evt_func(&gatt_param);
// TAL_PR_HEXDUMP_INFO("write buf2:",gatt_param.gatt_event.write_report.report.p_data,len);
tkl_system_free(gatt_param.gatt_event.write_report.report.p_data);
}
接收到TUYA APP数据后未回数据,并未调度tkl层的其他gatt函数
下列函数会在何时调用
OPERATE_RET tkl_ble_gatts_value_set(USHORT_T conn_handle, USHORT_T char_handle, UCHAR_T *p_data, USHORT_T length)
{
return OPRT_OK;
}
OPERATE_RET tkl_ble_gatts_value_get(USHORT_T conn_handle, USHORT_T char_handle, UCHAR_T *p_data, USHORT_T length)
{
return OPRT_OK;
}
OPERATE_RET tkl_ble_gatts_value_notify(USHORT_T conn_handle, USHORT_T char_handle, UCHAR_T *p_data, USHORT_T length)
{
return OPRT_OK;
}