From f32dc575db4615f380c6a13b1d966690a04759b8 Mon Sep 17 00:00:00 2001 From: lihuanhuan Date: Mon, 27 Nov 2023 21:26:52 +0800 Subject: [PATCH] Fixing firmware upgrade issues via Bluetooth (#8) * the accurate length of the last data packet sent. * reduce NRF_SDH_BLE_GAP_EVENT_LENGTH value * bump version to 1.4.2 --- app/firmware_config.h | 2 +- app/main.c | 2 +- app/sdk_config.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/firmware_config.h b/app/firmware_config.h index 6cca3c7..bbdc971 100644 --- a/app/firmware_config.h +++ b/app/firmware_config.h @@ -7,7 +7,7 @@ #define MANUFACTURER_ID 0x55AA55AA55 /**< DUMMY Manufacturer ID. Will be passed to Device Information Service. You shall use the ID for your Company*/ #define ORG_UNIQUE_ID 0xEEBBEE /**< DUMMY Organisation Unique ID. Will be passed to Device Information Service. You shall use the Organisation Unique ID relevant for your Company */ #define HW_REVISION "1.0.0" -#define FW_REVISION "1.4.1" +#define FW_REVISION "1.4.2" #define SW_REVISION "s132_nrf52_7.0.1" #endif //FIRMWARE_CONFIG diff --git a/app/main.c b/app/main.c index 46b167d..c670d01 100644 --- a/app/main.c +++ b/app/main.c @@ -1396,7 +1396,7 @@ static void nus_data_handler(ble_nus_evt_t * p_evt) if(data_recived_len-pad > msg_len) { rcv_head_flag = DATA_INIT; - //data_recived_len = msg_len + (msg_len+62)/63; + data_recived_len = msg_len + (msg_len+62)/63; msg_len = 0; } else diff --git a/app/sdk_config.h b/app/sdk_config.h index 00c755d..08ee869 100644 --- a/app/sdk_config.h +++ b/app/sdk_config.h @@ -11370,7 +11370,7 @@ // The time set aside for this connection on every connection interval in 1.25 ms units. #ifndef NRF_SDH_BLE_GAP_EVENT_LENGTH -#define NRF_SDH_BLE_GAP_EVENT_LENGTH 6 +#define NRF_SDH_BLE_GAP_EVENT_LENGTH 5 #endif // NRF_SDH_BLE_GATT_MAX_MTU_SIZE - Static maximum MTU size.