【求助】【TuyaOS OS】

蓝牙 BLE设备、蓝牙 MESH设备、蓝牙 Beacon设备、Sub-G设备等


Post Reply
15229375834
Posts: 4

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;
}


Tags:
NICE
Posts: 99

Re: 【求助】【TuyaOS OS】

请问使用的哪个sdk ?提供下芯片型号及sdk版本。

15229375834
Posts: 4

Re: 【求助】【TuyaOS OS】

NICE 2025年 Feb 27日 17:43

请问使用的哪个sdk ?提供下芯片型号及sdk版本。

sdk版本TuyaOS-3.10.1

NICE
Posts: 99

Re: 【求助】【TuyaOS OS】

芯片型号呢?

15229375834
Posts: 4

Re: 【求助】【TuyaOS OS】

NICE 2025年 Feb 27日 20:20

芯片型号呢?

nrf52832

User avatar
逻辑的院子
Posts: 304
Contact:

Re: 【求助】【TuyaOS OS】

如果您的芯片型号是nRF52832,那么您的SDK版本应该是3.10.0或者3.11.0吧?我们并未发布过3.10.1版本,所以要跟您确认清楚。
另外,您上文中提到的设备接收到Tuya App下发的数据应该在case TUYA_BLE_CB_EVT_DP_DATA_RECEIVED中进行处理,相关代码也可以根据这个Case的上下文找到,跟您列举的代码并没有关系。如果您有更多问题,可以描述得更精确一些。

Post Reply