From 50e4a95f6addfd7889ea4f085a1a456b45878952 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Mon, 25 Nov 2024 11:04:31 +0800 Subject: [PATCH] =?utf8?q?=E5=A2=9E=E5=8A=A0ppg=20ble=E6=9C=8D=E5=8A=A1?= =?utf8?q?=EF=BC=8C=E8=BF=9E=E6=8E=A5notif=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/drivers/peripheral/ppg/ppgBleService/ppgBleService.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.17.1