From 070db9f38343ba2937e51bf03361f9c0b461c900 Mon Sep 17 00:00:00 2001 From: wangfq Date: Wed, 12 Aug 2026 11:55:44 +0800 Subject: [PATCH] =?UTF-8?q?debug(vd960DBN):=20performPeriodicTask=20?= =?UTF-8?q?=E6=8B=89=E5=8C=85=E5=A4=B1=E8=B4=A5=E6=89=93=E5=8D=B0=20resp?= =?UTF-8?q?=20=E7=8A=B6=E6=80=81=20+=20=E6=B3=A8=E9=87=8A=E9=97=AD?= =?UTF-8?q?=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 第二分包未进发送函数, 加条件打印 (仅当队列有货但拉包返回0时) BLE pull FAIL: resp flag/amt/seq/off 一烧录即知第二包断在哪 - 补 ble_notify_chunk_max 注释块闭合 */ --- vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/dbn_ble_srv.c | 1 + vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/peripheral.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/dbn_ble_srv.c b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/dbn_ble_srv.c index 54fe98a..b7f16d5 100644 --- a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/dbn_ble_srv.c +++ b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/dbn_ble_srv.c @@ -190,6 +190,7 @@ static uint8_t set_net_info_to_ready(uint8_t * dat_dst) * and whole pkt <= MAX_BLE_Notify_Buf_LEN (local buf, no overflow) * MTU=23 -> 14, MTU=96 -> 87, MTU>=103 -> 94 * ============================================================= + */ static uint16_t ble_notify_chunk_max(void) { uint16_t _mtu = peripheral_get_mtu(); diff --git a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/peripheral.c b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/peripheral.c index f59d1be..f19479f 100644 --- a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/peripheral.c +++ b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/peripheral.c @@ -694,7 +694,14 @@ static void performPeriodicTask(void) do NOT rely on poll_dbn_ble rx events */ if(g_notify_buftemp.flag == 0) { - g_flag_notify_temp = set_response_to_notify(&g_buf_ble_response, &g_notify_buftemp); + uint8_t _pull = set_response_to_notify(&g_buf_ble_response, &g_notify_buftemp); + g_flag_notify_temp = _pull; + if(_pull == 0 && g_buf_ble_response.flag) + { + PRINT("BLE pull FAIL: resp flag=%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); + } } }