From: hcj <1224667075@qq.com> Date: Mon, 25 Nov 2024 03:04:31 +0000 (+0800) Subject: 增加ppg ble服务,连接notif限制 X-Git-Tag: fd230_release_V1.3.102~30^2~1 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1460%2F1;p=mirrors%2FFD230.git 增加ppg ble服务,连接notif限制 --- diff --git a/code/sdk/drivers/peripheral/ppg/ppgBleService/ppgBleService.c b/code/sdk/drivers/peripheral/ppg/ppgBleService/ppgBleService.c index fa69240ba..53d176cc2 100644 --- a/code/sdk/drivers/peripheral/ppg/ppgBleService/ppgBleService.c +++ b/code/sdk/drivers/peripheral/ppg/ppgBleService/ppgBleService.c @@ -126,6 +126,10 @@ errcode_t ble_ppgtest_server_send_input_report(const uint8_t *data, uint8_t len) return ERRCODE_BT_FAIL; } errcode_t ret = 0; + + if(g_ble_conn_id==0) + return ERRCODE_BT_FAIL; + ret = gatts_notify_indicate(g_ble_server_id, g_ble_conn_id, ¶m); //printf("ble_ppgtest_server_send_input_report: 0x%x g_ble_conn_id:%d g_ppgtest_notify_report_att_hdl:%d\r\n", // ret,g_ble_conn_id,g_ppgtest_notify_report_att_hdl);