diff --git a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/dbn_ble_srv.c b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/dbn_ble_srv.c index b7f16d5..46dd290 100644 --- a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/dbn_ble_srv.c +++ b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/dbn_ble_srv.c @@ -1053,8 +1053,17 @@ void poll_dbn_ble(void) } if(g_notify_buftemp.flag == 0) { -// report_sens_acs(); - g_flag_notify_temp = set_response_to_notify(&g_buf_ble_response, &g_notify_buftemp); + static uint8_t _last_resp_flag = 0; + uint8_t _pull = set_response_to_notify(&g_buf_ble_response, &g_notify_buftemp); + g_flag_notify_temp = _pull; + if(g_buf_ble_response.flag != _last_resp_flag) + { + PRINT("BLE resp flag %d->%d (pull=%d amt=%d seq=%d off=%d)\n", + _last_resp_flag, g_buf_ble_response.flag, _pull, + g_buf_ble_response.pkg_amount, g_buf_ble_response.pkg_seq, + g_buf_ble_response.dat_offset); + _last_resp_flag = g_buf_ble_response.flag; + } } } diff --git a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/peripheral.c b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/peripheral.c index 22f9ee6..4190b21 100644 --- a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/peripheral.c +++ b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/peripheral.c @@ -695,6 +695,10 @@ static void performPeriodicTask(void) } if(g_flag_notify_temp){ g_flag_notify_temp = 0; + PRINT("BLE send: len=%d resp=%d amt=%d seq=%d off=%d\n", + g_notify_buftemp.len, g_buf_ble_response.flag, + g_buf_ble_response.pkg_amount, g_buf_ble_response.pkg_seq, + g_buf_ble_response.dat_offset); peripheralChar4Notify(g_notify_buftemp.buf, g_notify_buftemp.len); clear_ble_notify_buf(&g_notify_buftemp); }