Skip to content

Commit 9327eb2

Browse files
committed
chore: tie the DFU packet length to the shared ATT MTU and fix two stale notes
1 parent caf56fe commit 9327eb2

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎AGENTS.md‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,7 @@ itself; a human has to edit it too.
153153

154154
- **ARM GCC version matters.** CI pins exactly `12.3.Rel1`; 13.3.Rel1 also
155155
compiles clean and is the closest verified-working version if you can't
156-
get the exact CI-pinned one. GCC 15 is unverified here; Adafruit's scoped
157-
`#pragma GCC diagnostic` for its `-Werror=array-bounds` false positive in
158-
`lib/sdk11/components/libraries/bootloader_dfu/bootloader_settings.c`
159-
(a fixed MBR-address read) is in.
156+
get the exact CI-pinned one. GCC 15 is unverified here.
160157
- **MeshCore/Ripple content has been deliberately removed** from the docs
161158
(README, changelog) — this is Meshtastic's own branded fork now, not a
162159
place to re-add other companion-firmware documentation. If you're

‎lib/sdk11/components/ble/ble_services/ble_dfu/ble_dfu.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
#include "ble_srv_common.h"
1717
#include <stddef.h>
1818
#include "sdk_common.h"
19+
#include "ble_dfu_cfg.h"
1920

20-
#define MAX_DFU_PKT_LEN (247 - 3) // MTU - 3 bytes for ATT header /**< Maximum length (in bytes) of the DFU Packet characteristic. */
21+
#define MAX_DFU_PKT_LEN (BLEGATT_ATT_MTU_MAX - 3) // MTU - 3 bytes for ATT header /**< Maximum length (in bytes) of the DFU Packet characteristic. */
2122
#define PKT_START_DFU_PARAM_LEN 2 /**< Length (in bytes) of the parameters for Packet Start DFU Request. */
2223
#define PKT_INIT_DFU_PARAM_LEN 2 /**< Length (in bytes) of the parameters for Packet Init DFU Request. */
2324
#define PKT_RCPT_NOTIF_REQ_LEN 3 /**< Length (in bytes) of the Packet Receipt Notification Request. */

‎src/main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ uint32_t* dbl_reset_mem = ((uint32_t*) DFU_DBL_RESET_MEM);
130130
// true if ble, false if serial
131131
bool _ota_dfu = false;
132132
bool _ota_connected = false;
133-
// Set after the OTA session so the app jump does not init the SoftDevice twice.
133+
// Set when the OTA session initializes the SoftDevice, so the app jump does not initialize it twice.
134134
bool _sd_inited = false;
135135

136136
bool is_ota(void) {

0 commit comments

Comments
 (0)