Closed dathpo closed 2 months ago
Hi @dathpo! We appreciate you submitting your first issue for our open-source project. 🌟
Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙
CC @vChavezB
@dathpo Thanks for raising the issue I will take a look.
Describe the bug
When the
CONFIG_LOG_BACKEND_BLE
option is enabled, the BLE Peripheral sends log messages to the Central. The Peripheral appears to send the full buffer on every logging call as opposed to only sending the actual content of a log message.To Reproduce
CONFIG_LOG_BACKEND_BLE=y
in theprj.conf
LOG_INF("Hello, world")
Expected behavior
The BLE frame size should be 14 octets.
Impact
It causes a waste of resources by sending a BLE frame larger than necessary.
Logs and console output
The following log message received below should not have been 492 octets. The end of the log message is "bonded: 1", the rest of the buffer is either zero-filled or full of old log data.
Environment (please complete the following information):
Additional context
Suggestions:
This code here is the cause of the problem:
The following change addresses the problem: