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