From 66f156105cd52a1bbac80f3d42044b8765c52074 Mon Sep 17 00:00:00 2001 From: wangfq Date: Wed, 12 Aug 2026 14:08:34 +0800 Subject: [PATCH] =?UTF-8?q?debug(vd960DBN):=20peripheralChar4Notify=20?= =?UTF-8?q?=E5=86=85=20resp=20=E9=98=9F=E5=88=97=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=AE=9E=E9=AA=8C=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 上一轮日志: BLE send 时 resp=1 amt=2 seq=1 off=87 (队列正常), 但 peripheralChar4Notify 执行后下一周期队列已空 - 锁定嫌疑: simpleProfile_Notify 库函数内部是否清了 g_buf_ble_response - N4 enter / after simpleProfile_Notify 各打印一次 resp 状态 --- vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/peripheral.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/peripheral.c b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/peripheral.c index 4190b21..84ad79f 100644 --- a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/peripheral.c +++ b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/peripheral.c @@ -731,6 +731,9 @@ static void performPeriodicTask(void) static void peripheralChar4Notify(uint8_t *pValue, uint16_t len) { attHandleValueNoti_t noti; + PRINT("N4 enter: len=%d resp=%d amt=%d seq=%d off=%d\n", len, + g_buf_ble_response.flag, g_buf_ble_response.pkg_amount, + g_buf_ble_response.pkg_seq, g_buf_ble_response.dat_offset); if(len > (peripheralMTU - 3)) { PRINT("Too large noti, len:%d, peripheralMTU:%d\n", len, peripheralMTU); @@ -749,6 +752,9 @@ static void peripheralChar4Notify(uint8_t *pValue, uint16_t len) else { uint8_t _ti = 0; + PRINT("N4 after simpleProfile_Notify: resp=%d amt=%d seq=%d off=%d\n", + g_buf_ble_response.flag, g_buf_ble_response.pkg_amount, + g_buf_ble_response.pkg_seq, g_buf_ble_response.dat_offset); PRINT("BLE notify OK, len:%d, MTU:%d\n", len, peripheralMTU); for(_ti = 0; _ti < len; _ti++) {