BLE Data Length Extension w/ RTT Logging

Hello, 

I am using the nRF5340 development kit alongside the nRF Connect mobile application for Android to establish a BLE connection and update the link layer packet size to the maximum of 251 bytes. This works as expected when my config is the following:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#
# Copyright (c) 2018 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
# Logger module
CONFIG_LOG=y
# Button and LED library
CONFIG_DK_LIBRARY=y
# Floating Point Unit
CONFIG_FPU=y
# Bluetooth LE
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="LiteBEST"
CONFIG_BT_LBS=y
CONFIG_BT_LBS_POLL_BUTTON=y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I have used Lesson 3 Exercise 2 from Nordic Academy code and the prj configs, which can be found at this GitHub linkto create the above prj.conf and attached (please_work.zip) code base. Here is the expected output from that prj.conf and code: 

expected output showing increased data length on BLE link layer

When I add the following lines to my config (the prj_candi.conf file), I get the unexpected output of the default BLE link layer packet size = 27 bytes. 

Fullscreen
1
2
3
4
5
# enable RTT logging
CONFIG_PRINTK=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_LOG_BACKEND_RTT=y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Following is the unexpected output:

unexpected BLE link layer packet length

I'll reiterate: the only change is the config file and, obviously, how I'm observing the incoming data, VCOM port vs JTAG. 

This is the same issue I was experiencing as described in my previous ticket's later replies, which I thought I had a workaround for, but I do not. Please help me understand why this is happening and how I can solve this. If you'd like BLE sniffer logs to further prove this, you can refer to the linked ticket, or I can provide more upon request, but I think you'll be able to recreate the problem using the attached zip. Please create a build using the default "prj.conf" file, this should work as expected on an nRF5340 dev kit when examining the output over VCOM1, and then a second build using the "prj_candi.conf" file and examine using RTT.

This is the minimum code/project I could come up with to recreate the issue I'm having in my main codebase. Thank you so much for your time and effort. 

Respectfully,

Brady Adcock

---

Tools Used: 

Toolchain and SDK are both v2.4.1
Windows 11, Version 10.0.22621 Build 22621
nRF5340-DK, PCA10095
nRF Connect for VS Code v2023.9.336
Pixel 7 Pro, android version 13, build #TQ3A.230901.001.C2
Entire Project zip w/ build: