feat(ble_audio): Add specific libs for BLE Audio log compression

This commit is contained in:
Liu Linyan
2026-07-23 17:18:46 +08:00
parent cf73b0c616
commit 30fd193df0
30 changed files with 567 additions and 450 deletions

View File

@@ -230,6 +230,16 @@ menu "BT Logs"
Enable mesh log encoding via the async transport.
The per-level compression options are configured in:
Settings of BLE Log Compression → BLE Mesh log compression.
config BT_LOG_CRITICAL_ONLY_ISO
bool "ISO: bandwidth-optimized logging"
depends on BT_ISO
select BLE_ISO_COMPRESSED_LOG_ENABLE
default y
help
Enable BLE Audio/ISO log encoding via the async transport.
The per-level compression options are configured in:
Settings of BLE Log Compression → BLE Audio/ISO log compression.
endif # BT_LOG_CRITICAL_ONLY
source "$IDF_PATH/components/bt/common/ble_log/Kconfig.in"

View File

@@ -4,7 +4,23 @@ function(register_ble_audio_libs)
endif()
if(CONFIG_SOC_BLE_AUDIO_SUPPORTED)
add_prebuilt_library(ble_audio "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/lib/lib/${idf_target}/libble_audio.a")
# Compressed-log builds link the log_compressed/ prebuilt lib (its logs
# call bt_le_audio_lib_compressed_out(), which is only functional under
# the same config); otherwise link the normal lib.
set(ble_audio_lib_dir "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/lib/lib/${idf_target}")
if(CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE)
set(ble_audio_lib "${ble_audio_lib_dir}/log_compressed/libble_audio.a")
if(NOT EXISTS "${ble_audio_lib}")
message(FATAL_ERROR
"BLE_ISO_COMPRESSED_LOG_ENABLE is set but the compressed lib is missing:\n"
" ${ble_audio_lib}\n"
"Build and copy it (in lib/ble_audio_development/tools/lib/):\n"
" ./compile.sh ${idf_target} -c && ./copy_lib.sh ${idf_target} -c")
endif()
else()
set(ble_audio_lib "${ble_audio_lib_dir}/libble_audio.a")
endif()
add_prebuilt_library(ble_audio "${ble_audio_lib}")
target_link_libraries(${COMPONENT_LIB} PRIVATE ble_audio)
endif()
endfunction()

View File

@@ -151,6 +151,8 @@ menu "BLE Audio Lib Debug Log Level"
choice BT_AUDIO_LOG_LEVEL
prompt "BLE_AUDIO_LIB_LOG_LEVEL"
default BT_AUDIO_LOG_LEVEL_INFO if BT_LOG_CRITICAL_ONLY_ISO
default BT_AUDIO_LOG_LEVEL_DEBUG if BLE_COMPRESSED_LOG_ENABLE
default BT_AUDIO_LOG_LEVEL_WARNING
depends on !BT_AUDIO_NO_LOG
help

View File

@@ -88,7 +88,7 @@ static int gatts_access_cb(uint16_t conn_handle, uint16_t attr_handle,
rc = attr->read(conn, attr, (void *)&cb, UINT16_MAX, 0);
if (rc < 0) {
LOG_DBG("[N]RdGattErr[%u][%d]", attr_handle, rc);
LOG_WRN("[N]RdGattErr[%u][%d]", attr_handle, rc);
return BT_GATT_ERR(rc);
}
@@ -148,7 +148,7 @@ static int gatts_access_cb(uint16_t conn_handle, uint16_t attr_handle,
data = NULL;
}
if (rc < 0) {
LOG_DBG("[N]WrGattErr[%u][%d]", attr_handle, rc);
LOG_WRN("[N]WrGattErr[%u][%d]", attr_handle, rc);
return BT_GATT_ERR(rc);
}

View File

@@ -180,7 +180,7 @@ static const uint16_t ext_structs[] = {
sizeof(struct bt_bond_info),
};
#define LEA_VERSION (0x20260722)
#define LEA_VERSION (0x20260724)
struct lib_ext_cfgs {
/* BLE */

View File

@@ -121,7 +121,7 @@ static ssize_t ots_feature_read(struct bt_conn *conn,
{
struct bt_ots *ots = (struct bt_ots *) attr->user_data;
LOG_DBG("OTS Feature GATT Read Operation");
LOG_DBG("OtsFeatRd");
return bt_gatt_attr_read(conn, attr, buf, len, offset, &ots->features,
sizeof(ots->features));
@@ -133,15 +133,15 @@ static ssize_t ots_obj_name_read(struct bt_conn *conn,
{
struct bt_ots *ots = (struct bt_ots *) attr->user_data;
LOG_DBG("OTS Object Name GATT Read Operation");
LOG_DBG("OtsObjNameRd");
if (!ots->cur_obj) {
LOG_DBG("No Current Object selected in OTS!");
LOG_WRN("OtsCurObjNotSel");
return BT_GATT_ERR(BT_GATT_OTS_OBJECT_NOT_SELECTED);
}
if (!ots->cur_obj->metadata.name) {
LOG_DBG("Current Object has no name!");
LOG_WRN("OtsCurObjNoName");
return BT_GATT_ERR(BT_GATT_OTS_OBJECT_NOT_SELECTED);
}
@@ -161,26 +161,26 @@ ssize_t ots_obj_name_write(struct bt_conn *conn,
int rc = 0;
char name[CONFIG_BT_OTS_OBJ_MAX_NAME_LEN + 1];
LOG_DBG("OTS Object Name GATT Write Operation");
LOG_DBG("OtsObjNameWr");
if (!ots->cur_obj) {
LOG_DBG("No Current Object selected in OTS!");
LOG_WRN("OtsCurObjNotSel");
return BT_GATT_ERR(BT_GATT_OTS_OBJECT_NOT_SELECTED);
}
if (IS_ENABLED(CONFIG_BT_OTS_DIR_LIST_OBJ) &&
ots->cur_obj->id == OTS_OBJ_ID_DIR_LIST) {
LOG_DBG("Rejecting name write for the directory list object.");
LOG_WRN("OtsDirListNameWrRej");
return BT_GATT_ERR(BT_GATT_OTS_WRITE_REQUEST_REJECTED);
}
if (offset > 0) {
LOG_DBG("Rejecting a long write, offset must be 0!");
LOG_WRN("OtsNameWrInvOft");
return BT_GATT_ERR(BT_GATT_OTS_WRITE_REQUEST_REJECTED);
}
if (len == 0 || len > CONFIG_BT_OTS_OBJ_MAX_NAME_LEN) {
LOG_DBG("Invalid object name length!");
LOG_WRN("OtsInvObjNameLen");
return BT_GATT_ERR(BT_GATT_OTS_WRITE_REQUEST_REJECTED);
}
@@ -191,7 +191,7 @@ ssize_t ots_obj_name_write(struct bt_conn *conn,
rc = bt_gatt_ots_obj_manager_first_obj_get(ots->obj_manager, &obj);
while (rc == 0) {
if (obj != ots->cur_obj && strcmp(name, obj->metadata.name) == 0) {
LOG_DBG("Object name is duplicated!");
LOG_WRN("OtsObjNameDup");
return BT_GATT_ERR(BT_GATT_OTS_OBJECT_NAME_ALREADY_EXISTS);
}
rc = bt_gatt_ots_obj_manager_next_obj_get(ots->obj_manager, obj, &obj);
@@ -220,10 +220,10 @@ static ssize_t ots_obj_type_read(struct bt_conn *conn,
struct bt_ots *ots = (struct bt_ots *) attr->user_data;
struct bt_ots_obj_metadata *obj_meta;
LOG_DBG("OTS Object Type GATT Read Operation");
LOG_DBG("OtsObjTypeRd");
if (!ots->cur_obj) {
LOG_DBG("No Current Object selected in OTS!");
LOG_WRN("OtsCurObjNotSel");
return BT_GATT_ERR(BT_GATT_OTS_OBJECT_NOT_SELECTED);
}
@@ -248,10 +248,10 @@ static ssize_t ots_obj_size_read(struct bt_conn *conn,
{
struct bt_ots *ots = (struct bt_ots *) attr->user_data;
LOG_DBG("OTS Object Size GATT Read Operation");
LOG_DBG("OtsObjSizeRd");
if (!ots->cur_obj) {
LOG_DBG("No Current Object selected in OTS!");
LOG_WRN("OtsCurObjNotSel");
return BT_GATT_ERR(BT_GATT_OTS_OBJECT_NOT_SELECTED);
}
@@ -268,10 +268,10 @@ static ssize_t ots_obj_id_read(struct bt_conn *conn,
uint8_t id[BT_OTS_OBJ_ID_SIZE];
char id_str[BT_OTS_OBJ_ID_STR_LEN];
LOG_DBG("OTS Object ID GATT Read Operation");
LOG_DBG("OtsObjIdRd");
if (!ots->cur_obj) {
LOG_DBG("No Current Object selected in OTS!");
LOG_WRN("OtsCurObjNotSel");
return BT_GATT_ERR(BT_GATT_OTS_OBJECT_NOT_SELECTED);
}
@@ -279,7 +279,7 @@ static ssize_t ots_obj_id_read(struct bt_conn *conn,
bt_ots_obj_id_to_str(ots->cur_obj->id, id_str,
sizeof(id_str));
LOG_DBG("Current Object ID: %s", id_str);
LOG_DBG("OtsCurObjId[%s]", id_str);
return bt_gatt_attr_read(conn, attr, buf, len, offset, id, sizeof(id));
}
@@ -290,10 +290,10 @@ static ssize_t ots_obj_prop_read(struct bt_conn *conn,
{
struct bt_ots *ots = (struct bt_ots *) attr->user_data;
LOG_DBG("OTS Object Properties GATT Read Operation");
LOG_DBG("OtsObjPropRd");
if (!ots->cur_obj) {
LOG_DBG("No Current Object selected in OTS!");
LOG_WRN("OtsCurObjNotSel");
return BT_GATT_ERR(BT_GATT_OTS_OBJECT_NOT_SELECTED);
}
@@ -312,13 +312,13 @@ int bt_ots_obj_add_internal(struct bt_ots *ots, struct bt_conn *conn,
if (IS_ENABLED(CONFIG_BT_OTS_DIR_LIST_OBJ) && ots->dir_list &&
!bt_ots_dir_list_is_idle(ots->dir_list)) {
LOG_DBG("Directory Listing Object is being read");
LOG_DBG("OtsDirListBusy");
return -EBUSY;
}
err = bt_gatt_ots_obj_manager_obj_add(ots->obj_manager, &new_obj);
if (err) {
LOG_ERR("No space available in the object manager");
LOG_ERR("OtsObjMgrNoSpace");
return err;
}
@@ -334,7 +334,7 @@ int bt_ots_obj_add_internal(struct bt_ots *ots, struct bt_conn *conn,
}
if (!ots_obj_validate_prop_against_oacp(created_desc.props, ots->features.oacp)) {
LOG_ERR("Object properties (0x%04X) are not a subset of OACP (0x%04X)",
LOG_ERR("OtsObjPropNotSubsetOacp[%04x][%04x]",
created_desc.props, ots->features.oacp);
(void)bt_ots_obj_delete(ots, new_obj->id);
@@ -342,21 +342,21 @@ int bt_ots_obj_add_internal(struct bt_ots *ots, struct bt_conn *conn,
}
if (created_desc.name == NULL) {
LOG_ERR("Object name must be set by application after object creation.");
LOG_ERR("OtsObjNameNotSet");
(void)bt_ots_obj_delete(ots, new_obj->id);
return -ECANCELED;
}
if (created_desc.size.alloc < param->size) {
LOG_ERR("Object allocated size must >= requested size.");
LOG_ERR("OtsObjAllocSizeTooSmall");
(void)bt_ots_obj_delete(ots, new_obj->id);
return -ECANCELED;
}
} else {
/* obj_created callback is required to populate the descriptor */
LOG_ERR("obj_created callback is not set");
LOG_ERR("OtsObjCreatedCbNotSet");
(void)bt_gatt_ots_obj_manager_obj_delete(new_obj);
return -EINVAL;
@@ -386,7 +386,7 @@ int bt_ots_obj_add(struct bt_ots *ots, const struct bt_ots_obj_add_param *param)
}
if (obj->metadata.name == NULL) {
LOG_ERR("Object name is NULL");
LOG_ERR("OtsObjNameNull");
(void)bt_ots_obj_delete(ots, obj->id);
return -ECANCELED;
@@ -394,14 +394,14 @@ int bt_ots_obj_add(struct bt_ots *ots, const struct bt_ots_obj_add_param *param)
name_len = strlen(obj->metadata.name);
if (name_len == 0 || name_len > CONFIG_BT_OTS_OBJ_MAX_NAME_LEN) {
LOG_ERR("Invalid name length %zu", name_len);
LOG_ERR("OtsInvNameLen[%zu]", name_len);
(void)bt_ots_obj_delete(ots, obj->id);
return -ECANCELED;
}
if (obj->metadata.size.cur > param->size) {
LOG_ERR("Object current size must be less than or equal to requested size.");
LOG_ERR("OtsObjCurSizeTooBig");
(void)bt_ots_obj_delete(ots, obj->id);
return -ECANCELED;
@@ -416,7 +416,7 @@ int bt_ots_obj_delete(struct bt_ots *ots, uint64_t id)
struct bt_gatt_ots_object *obj;
CHECKIF(!BT_OTS_VALID_OBJ_ID(id)) {
LOG_DBG("Invalid object ID 0x%016llx", id);
LOG_WRN("OtsInvObjId[%016llx]", id);
return -EINVAL;
}
@@ -432,7 +432,7 @@ int bt_ots_obj_delete(struct bt_ots *ots, uint64_t id)
if (IS_ENABLED(CONFIG_BT_OTS_DIR_LIST_OBJ) && ots->dir_list &&
!bt_ots_dir_list_is_idle(ots->dir_list)) {
LOG_DBG("Directory Listing Object is being read");
LOG_DBG("OtsDirListBusy");
return -EBUSY;
}
@@ -514,14 +514,14 @@ int bt_ots_init(struct bt_ots *ots,
"Object creation requires object write to be supported");
ots->features.oacp = ots_init->features.oacp;
LOG_DBG("OACP features: 0x%04X", ots->features.oacp);
LOG_DBG("OtsOacpFeat[%04x]", ots->features.oacp);
/* Check OLCP supported features against Kconfig. */
if (ots_init->features.olcp & (~((uint32_t) OLCP_FEAT))) {
return -ENOTSUP;
}
ots->features.olcp = ots_init->features.olcp;
LOG_DBG("OLCP features: 0x%04X", ots->features.olcp);
LOG_DBG("OtsOlcpFeat[%04x]", ots->features.olcp);
/* Register L2CAP context. */
err = bt_gatt_ots_l2cap_register(&ots->l2cap);
@@ -543,7 +543,7 @@ int bt_ots_init(struct bt_ots *ots,
k_work_init(&ots->oacp_ind.work, oacp_indicate_work_handler);
k_work_init(&ots->olcp_ind.work, olcp_indicate_work_handler);
LOG_DBG("Initialized OTS");
LOG_DBG("OtsInit");
return 0;
}
@@ -629,14 +629,14 @@ static void ots_delete_empty_name_objects(struct bt_ots *ots, struct bt_conn *co
if (strlen(obj->metadata.name) == 0) {
bt_ots_obj_id_to_str(obj->id, id_str, sizeof(id_str));
LOG_DBG("Deleting object with %s ID due to empty name", id_str);
LOG_DBG("OtsDelEmptyNameObj[%s]", id_str);
if (ots->cb && ots->cb->obj_deleted) {
ots->cb->obj_deleted(ots, conn, obj->id);
}
if (bt_gatt_ots_obj_manager_obj_delete(obj)) {
LOG_ERR("Failed to remove object with %s ID from object manager",
LOG_ERR("OtsObjMgrDelFail[%s]",
id_str);
}
}
@@ -652,7 +652,7 @@ static void ots_conn_disconnected(struct bt_conn *conn, uint8_t reason)
index < instance_cnt;
instance++, index++) {
LOG_DBG("Processing disconnect for OTS instance %u", index);
LOG_DBG("OtsInstDisconnect[%u]", index);
if (instance->cur_obj != NULL) {
__ASSERT(instance->cur_obj->state.type == BT_GATT_OTS_OBJECT_IDLE_STATE,
@@ -690,7 +690,7 @@ static int bt_gatt_ots_instances_prepare(void)
instance->obj_manager = bt_gatt_ots_obj_manager_assign();
if (!instance->obj_manager) {
LOG_ERR("OTS Object manager instance not available");
LOG_ERR("OtsObjMgrInstUnavail");
return -ENOMEM;
}

File diff suppressed because it is too large Load Diff

View File

@@ -146,7 +146,7 @@ static int bt_ots_dir_list_search_forward(struct bt_ots_dir_list *dir_list, void
size_t rec_len = dir_list_object_record_size(obj);
bt_ots_obj_id_to_str(obj->id, id_str, sizeof(id_str));
LOG_DBG("Searching forward for offset %ld starting at %ld with object ID %s",
LOG_DBG("OtsDirListSrchFwd[%ld][%ld][%s]",
(long)offset, (long)dir_list->anchor_offset, id_str);
while (dir_list->anchor_offset + rec_len <= offset) {
@@ -173,7 +173,7 @@ static int bt_ots_dir_list_search_backward(struct bt_ots_dir_list *dir_list, voi
struct bt_gatt_ots_object *obj = dir_list->anchor_object;
bt_ots_obj_id_to_str(obj->id, id_str, sizeof(id_str));
LOG_DBG("Searching backward for offset %ld starting at %ld with object ID %s",
LOG_DBG("OtsDirListSrchBwd[%ld][%ld][%s]",
(long)offset, (long)dir_list->anchor_offset, id_str);
while (dir_list->anchor_offset > offset) {
@@ -208,7 +208,7 @@ static int bt_ots_dir_list_search(struct bt_ots_dir_list *dir_list, void *obj_ma
} else {
size_t rec_len;
LOG_DBG("Offset %ld is closer to %zu than %ld, start from end",
LOG_DBG("OtsDirListSrchFromEnd[%ld][%zu][%ld]",
(long)offset, last, (long)dir_list->anchor_offset);
err = bt_gatt_ots_obj_manager_last_obj_get(obj_manager, &dir_list->anchor_object);
if (err) {
@@ -222,7 +222,7 @@ static int bt_ots_dir_list_search(struct bt_ots_dir_list *dir_list, void *obj_ma
const size_t mid = dir_list->anchor_offset / 2;
if (offset < mid) {
LOG_DBG("Offset %ld is closer to 0 than %ld, start from beginning",
LOG_DBG("OtsDirListSrchFromStart[%ld][%ld]",
(long)offset, (long)dir_list->anchor_offset);
bt_ots_dir_list_reset_anchor(dir_list, obj_manager);
err = bt_ots_dir_list_search_forward(dir_list, obj_manager, offset);
@@ -236,7 +236,7 @@ static int bt_ots_dir_list_search(struct bt_ots_dir_list *dir_list, void *obj_ma
}
bt_ots_obj_id_to_str(dir_list->anchor_object->id, id_str, sizeof(id_str));
LOG_DBG("Found offset %ld starting at %ld in object with ID %s",
LOG_DBG("OtsDirListFoundOft[%ld][%ld][%s]",
(long)offset, (long)dir_list->anchor_offset, id_str);
return 0;
@@ -259,7 +259,7 @@ static void dir_list_update_size(struct bt_ots_dir_list *dir_list, void *obj_man
err = bt_gatt_ots_obj_manager_next_obj_get(obj_manager, obj, &obj);
} while (!err);
LOG_DBG("Update directory listing current size to 0x%zx", len);
LOG_DBG("OtsDirListUpdCurSize[%zx]", len);
dir_list->dir_list_obj->metadata.size.cur = len;
}

View File

@@ -49,7 +49,7 @@ static int ots_l2cap_send(struct bt_gatt_ots_l2cap *l2cap_ctx)
/* Prepare buffer for sending. */
buf = net_buf_alloc(&ot_chan_tx_pool, K_FOREVER);
if (buf == NULL) {
LOG_ERR("OtsTxBufAllocFail");
LOG_ERR("OtsL2capTxBufAllocFail");
return -ENOMEM;
}
@@ -58,7 +58,7 @@ static int ots_l2cap_send(struct bt_gatt_ots_l2cap *l2cap_ctx)
ret = bt_l2cap_chan_send(&l2cap_ctx->ot_chan.chan, buf);
if (ret < 0) {
LOG_ERR("Unable to send data over CoC: %d", ret);
LOG_WRN("OtsL2capChanSendFail[%d]", ret);
net_buf_unref(buf);
return -ENOEXEC;
@@ -67,7 +67,7 @@ static int ots_l2cap_send(struct bt_gatt_ots_l2cap *l2cap_ctx)
/* Mark that L2CAP TX was accepted. */
l2cap_ctx->tx.len_sent += len;
LOG_DBG("Sending TX chunk with %d bytes on L2CAP CoC", len);
LOG_DBG("OtsL2capTxChunk[%u]", len);
return 0;
}
@@ -75,7 +75,7 @@ static int ots_l2cap_send(struct bt_gatt_ots_l2cap *l2cap_ctx)
#if (CONFIG_BT_OTS_L2CAP_CHAN_RX_MTU > BT_L2CAP_SDU_RX_MTU)
static struct net_buf *l2cap_alloc_buf(struct bt_l2cap_chan *chan)
{
LOG_DBG("Channel %p allocating buffer", chan);
LOG_DBG("OtsL2capAllocBuf");
return net_buf_alloc(&ot_chan_rx_pool, K_FOREVER);
}
@@ -86,7 +86,7 @@ static void l2cap_sent(struct bt_l2cap_chan *chan)
struct bt_l2cap_le_chan *l2chan = CONTAINER_OF(chan, struct bt_l2cap_le_chan, chan);
struct bt_gatt_ots_l2cap *l2cap_ctx;
LOG_DBG("Outgoing data channel %p transmitted", chan);
LOG_DBG("OtsL2capSent");
l2cap_ctx = CONTAINER_OF(l2chan, struct bt_gatt_ots_l2cap, ot_chan);
@@ -94,7 +94,7 @@ static void l2cap_sent(struct bt_l2cap_chan *chan)
if (l2cap_ctx->tx.len != l2cap_ctx->tx.len_sent) {
if (ots_l2cap_send(l2cap_ctx)) {
/* Send failed - clean up TX state to unblock channel. */
LOG_ERR("Failed to send next chunk, aborting TX");
LOG_WRN("OtsL2capTxAbort");
memset(&l2cap_ctx->tx, 0, sizeof(l2cap_ctx->tx));
if (l2cap_ctx->tx_done) {
l2cap_ctx->tx_done(l2cap_ctx, chan->conn);
@@ -107,7 +107,7 @@ static void l2cap_sent(struct bt_l2cap_chan *chan)
/* TX completed - notify upper layers and clean up. */
memset(&l2cap_ctx->tx, 0, sizeof(l2cap_ctx->tx));
LOG_DBG("Scheduled TX on L2CAP CoC is complete");
LOG_DBG("OtsL2capTxComp");
if (l2cap_ctx->tx_done) {
l2cap_ctx->tx_done(l2cap_ctx, chan->conn);
@@ -119,7 +119,7 @@ static int l2cap_recv(struct bt_l2cap_chan *chan, struct net_buf *buf)
struct bt_l2cap_le_chan *l2chan = CONTAINER_OF(chan, struct bt_l2cap_le_chan, chan);
struct bt_gatt_ots_l2cap *l2cap_ctx;
LOG_DBG("Incoming data channel %p received", chan);
LOG_DBG("OtsL2capRecv");
l2cap_ctx = CONTAINER_OF(l2chan, struct bt_gatt_ots_l2cap, ot_chan);
@@ -132,12 +132,12 @@ static int l2cap_recv(struct bt_l2cap_chan *chan, struct net_buf *buf)
static void l2cap_status(struct bt_l2cap_chan *chan, atomic_t *status)
{
LOG_DBG("Channel %p status %lu", chan, atomic_get(status));
LOG_DBG("OtsL2capStatus[%u]", atomic_get(status));
}
static void l2cap_connected(struct bt_l2cap_chan *chan)
{
LOG_DBG("Channel %p connected", chan);
LOG_DBG("OtsL2capConnected");
}
static void l2cap_disconnected(struct bt_l2cap_chan *chan)
@@ -145,7 +145,7 @@ static void l2cap_disconnected(struct bt_l2cap_chan *chan)
struct bt_l2cap_le_chan *l2chan = CONTAINER_OF(chan, struct bt_l2cap_le_chan, chan);
struct bt_gatt_ots_l2cap *l2cap_ctx;
LOG_DBG("Channel %p disconnected", chan);
LOG_DBG("OtsL2capDisconnected");
l2cap_ctx = CONTAINER_OF(l2chan, struct bt_gatt_ots_l2cap, ot_chan);
@@ -173,7 +173,7 @@ static inline void l2cap_chan_init(struct bt_l2cap_le_chan *chan)
chan->rx.mtu = CONFIG_BT_OTS_L2CAP_CHAN_RX_MTU;
chan->chan.ops = &l2cap_ops;
LOG_DBG("RX MTU set to %u", chan->rx.mtu);
LOG_DBG("OtsL2capRxMtu[%u]", chan->rx.mtu);
}
static struct bt_gatt_ots_l2cap *find_free_l2cap_ctx(void)
@@ -196,7 +196,7 @@ static int l2cap_accept(struct bt_conn *conn, struct bt_l2cap_server *server,
{
struct bt_gatt_ots_l2cap *l2cap_ctx;
LOG_DBG("Incoming conn %p", (void *)conn);
LOG_DBG("OtsL2capIncomingConn");
l2cap_ctx = find_free_l2cap_ctx();
if (l2cap_ctx) {
@@ -224,11 +224,11 @@ static int bt_gatt_ots_l2cap_init(void)
err = bt_l2cap_server_register(&l2cap_server);
if (err) {
LOG_ERR("Unable to register OTS PSM");
LOG_ERR("OtsL2capPsmRegFail");
return err;
}
LOG_DBG("Initialized OTS L2CAP");
LOG_DBG("OtsL2capInit");
return 0;
}
@@ -245,7 +245,7 @@ int bt_gatt_ots_l2cap_send(struct bt_gatt_ots_l2cap *l2cap_ctx,
int err;
if (l2cap_ctx->tx.len != 0) {
LOG_ERR("L2CAP TX in progress");
LOG_WRN("OtsL2capTxInProgress");
return -EAGAIN;
}
@@ -253,11 +253,11 @@ int bt_gatt_ots_l2cap_send(struct bt_gatt_ots_l2cap *l2cap_ctx,
l2cap_ctx->tx.data = data;
l2cap_ctx->tx.len = len;
LOG_DBG("Starting TX on L2CAP CoC with %d byte packet", len);
LOG_DBG("OtsL2capTxStart[%u]", len);
err = ots_l2cap_send(l2cap_ctx);
if (err) {
LOG_ERR("Unable to send data over CoC: %d", err);
LOG_WRN("OtsL2capSendFail[%d]", err);
memset(&l2cap_ctx->tx, 0, sizeof(l2cap_ctx->tx));
return err;
@@ -288,12 +288,12 @@ int bt_gatt_ots_l2cap_connect(struct bt_conn *conn,
struct bt_gatt_ots_l2cap *ctx;
if (!conn) {
LOG_WRN("Invalid Connection");
LOG_WRN("OtsL2capConnNull");
return -ENOTCONN;
}
if (!l2cap_ctx) {
LOG_WRN("Invalid context");
LOG_WRN("OtsL2capCtxNull");
return -EINVAL;
}
@@ -307,12 +307,12 @@ int bt_gatt_ots_l2cap_connect(struct bt_conn *conn,
l2cap_chan_init(&ctx->ot_chan);
(void)memset(&ctx->tx, 0, sizeof(ctx->tx));
LOG_DBG("Connecting L2CAP CoC");
LOG_DBG("OtsL2capConnecting");
err = bt_l2cap_chan_connect(conn, &ctx->ot_chan.chan, BT_GATT_OTS_L2CAP_PSM);
if (err) {
LOG_WRN("Unable to connect to psm %u (err %d)", BT_GATT_OTS_L2CAP_PSM, err);
LOG_WRN("OtsL2capConnFail[%u][%d]", BT_GATT_OTS_L2CAP_PSM, err);
} else {
LOG_DBG("L2CAP connection pending");
LOG_DBG("OtsL2capConnPending");
*l2cap_ctx = ctx;
}

View File

@@ -61,11 +61,10 @@ static enum bt_gatt_ots_oacp_res_code oacp_create_proc_validate(
};
bt_uuid_to_str(&param.type.uuid, str, BT_UUID_STR_LEN);
LOG_DBG("Validating Create procedure with size: 0x%08X and "
"type: %s", param.size, str);
LOG_DBG("OtsOacpValCreate[%08x][%s]", param.size, str);
if (!BT_OTS_OACP_GET_FEAT_CREATE(ots->features.oacp)) {
LOG_DBG("Create Procedure is not supported.");
LOG_DBG("OtsOacpCreateNotSupp");
return BT_GATT_OTS_OACP_RES_OPCODE_NOT_SUP;
}
@@ -76,21 +75,21 @@ static enum bt_gatt_ots_oacp_res_code oacp_create_proc_validate(
/* Verify Initialization Metadata */
if (strlen(obj->metadata.name) > 0) {
LOG_ERR("Object name shall be a zero length string after object creation.");
LOG_ERR("OtsOacpObjNameNotEmpty");
(void)bt_ots_obj_delete(ots, obj->id);
err = -ECANCELED;
goto exit;
}
if (obj->metadata.size.cur > 0) {
LOG_ERR("Object current size must be 0.");
LOG_ERR("OtsOacpObjCurSizeNotZero");
(void)bt_ots_obj_delete(ots, obj->id);
err = -ECANCELED;
goto exit;
}
if (!BT_OTS_OBJ_GET_PROP_WRITE(obj->metadata.props)) {
LOG_ERR("Created object must have write property.");
LOG_ERR("OtsOacpObjNoWrProp");
(void)bt_ots_obj_delete(ots, obj->id);
err = -ECANCELED;
goto exit;
@@ -99,7 +98,7 @@ static enum bt_gatt_ots_oacp_res_code oacp_create_proc_validate(
ots->cur_obj = obj;
ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE;
LOG_DBG("Create procedure is complete");
LOG_DBG("OtsOacpCreateComp");
exit:
switch (err) {
@@ -127,27 +126,27 @@ static enum bt_gatt_ots_oacp_res_code oacp_delete_proc_validate(
int err;
if (!BT_OTS_OACP_GET_FEAT_DELETE(ots->features.oacp)) {
LOG_DBG("Delete Procedure is not supported.");
LOG_DBG("OtsOacpDeleteNotSupp");
return BT_GATT_OTS_OACP_RES_OPCODE_NOT_SUP;
}
if (!ots->cur_obj) {
LOG_DBG("No object is selected.");
LOG_DBG("OtsOacpNoObjSel");
return BT_GATT_OTS_OACP_RES_INV_OBJ;
}
if (!BT_OTS_OBJ_GET_PROP_DELETE(ots->cur_obj->metadata.props)) {
LOG_DBG("Object properties do not permit deletion.");
LOG_DBG("OtsOacpDeleteNotPermitted");
return BT_GATT_OTS_OACP_RES_NOT_PERMITTED;
}
err = bt_ots_obj_delete(ots, ots->cur_obj->id);
if (err) {
LOG_ERR("Deleting object during Delete procedure failed: %d", err);
LOG_ERR("OtsOacpDeleteObjFail[%d]", err);
goto exit;
}
LOG_DBG("Delete procedure is complete");
LOG_DBG("OtsOacpDeleteComp");
exit:
switch (err) {
@@ -173,8 +172,7 @@ static enum bt_gatt_ots_oacp_res_code oacp_checksum_proc_validate(
int err;
uint32_t checksum;
LOG_DBG("Validating Checksum procedure with offset: 0x%08X and "
"length: 0x%08X", params->offset, params->len);
LOG_DBG("OtsOacpValChecksum[%08x][%08x]", params->offset, params->len);
if (!ots->cur_obj) {
return BT_GATT_OTS_OACP_RES_INV_OBJ;
@@ -201,8 +199,7 @@ static enum bt_gatt_ots_oacp_res_code oacp_checksum_proc_validate(
checksum = bt_ots_client_calc_checksum((const uint8_t *)obj_data, params->len);
net_buf_simple_add_le32(resp_param, checksum);
LOG_DBG("Calculate from offset %u len %u checksum 0x%08x", params->offset,
params->len, checksum);
LOG_DBG("OtsOacpChecksumCalc[%u][%u][%08x]", params->offset, params->len, checksum);
return BT_GATT_OTS_OACP_RES_SUCCESS;
} else {
return BT_GATT_OTS_OACP_RES_OPER_FAILED;
@@ -217,8 +214,7 @@ static enum bt_gatt_ots_oacp_res_code oacp_read_proc_validate(
{
const struct bt_gatt_ots_oacp_read_params *params = &proc->read_params;
LOG_DBG("Validating Read procedure with offset: 0x%08X and "
"length: 0x%08X", params->offset, params->len);
LOG_DBG("OtsOacpValRd[%08x][%08x]", params->offset, params->len);
if (!ots->cur_obj) {
return BT_GATT_OTS_OACP_RES_INV_OBJ;
@@ -246,7 +242,7 @@ static enum bt_gatt_ots_oacp_res_code oacp_read_proc_validate(
memcpy(&ots->cur_obj->state.read_op.oacp_params, &proc->read_params,
sizeof(ots->cur_obj->state.read_op.oacp_params));
LOG_DBG("Read procedure is accepted");
LOG_DBG("OtsOacpRdAccepted");
return BT_GATT_OTS_OACP_RES_SUCCESS;
}
@@ -259,15 +255,14 @@ static enum bt_gatt_ots_oacp_res_code oacp_write_proc_validate(
{
struct bt_gatt_ots_oacp_write_params *params = &proc->write_params;
LOG_DBG("Validating Write procedure with offset: 0x%08X and "
"length: 0x%08X", params->offset, params->len);
LOG_DBG("OtsOacpValWr[%08x][%08x]", params->offset, params->len);
if (!ots->cur_obj) {
return BT_GATT_OTS_OACP_RES_INV_OBJ;
}
if (!BT_OTS_OACP_GET_FEAT_WRITE(ots->features.oacp)) {
LOG_DBG("Write Procedure is not supported.");
LOG_DBG("OtsOacpWrNotSupp");
return BT_GATT_OTS_OACP_RES_OPCODE_NOT_SUP;
}
@@ -318,7 +313,7 @@ static enum bt_gatt_ots_oacp_res_code oacp_write_proc_validate(
memcpy(&ots->cur_obj->state.write_op.oacp_params, params,
sizeof(ots->cur_obj->state.write_op.oacp_params));
LOG_DBG("Write procedure is accepted");
LOG_DBG("OtsOacpWrAccepted");
return BT_GATT_OTS_OACP_RES_SUCCESS;
}
@@ -463,14 +458,14 @@ static void oacp_read_proc_cb(struct bt_gatt_ots_l2cap *l2cap_ctx,
ots = CONTAINER_OF(l2cap_ctx, struct bt_ots, l2cap);
if (!ots->cur_obj) {
LOG_ERR("OTS Read operation failed: no current object");
LOG_ERR("OtsOacpRdNoCurObj");
return;
}
if (ots->cb->obj_read == NULL &&
!(IS_ENABLED(CONFIG_BT_OTS_DIR_LIST_OBJ) && ots->cur_obj->id == OTS_OBJ_ID_DIR_LIST)) {
ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE;
LOG_ERR("OTS Read operation failed: there is no OTS Read callback");
LOG_ERR("OtsOacpRdNoCb");
return;
}
@@ -479,10 +474,10 @@ static void oacp_read_proc_cb(struct bt_gatt_ots_l2cap *l2cap_ctx,
offset = read_op->oacp_params.offset + read_op->sent_len;
if (read_op->sent_len >= read_op->oacp_params.len) {
LOG_DBG("OACP Read Op over L2CAP is completed");
LOG_DBG("OtsOacpRdL2capComp");
if (read_op->sent_len > read_op->oacp_params.len) {
LOG_WRN("More bytes sent that the client requested");
LOG_WRN("OtsOacpSentMoreThanReq");
}
ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE;
@@ -508,7 +503,7 @@ static void oacp_read_proc_cb(struct bt_gatt_ots_l2cap *l2cap_ctx,
}
if (len < 0) {
LOG_ERR("OCAP Read Op failed with error: %zd", len);
LOG_ERR("OtsOacpRdOpFail[%zd]", len);
bt_gatt_ots_l2cap_disconnect(&ots->l2cap);
ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE;
@@ -520,8 +515,7 @@ static void oacp_read_proc_cb(struct bt_gatt_ots_l2cap *l2cap_ctx,
ots->l2cap.closed = oacp_l2cap_closed;
err = bt_gatt_ots_l2cap_send(&ots->l2cap, obj_chunk, len);
if (err) {
LOG_ERR("L2CAP CoC error: %d while trying to execute OACP "
"Read procedure", err);
LOG_WRN("OtsOacpL2capErr[%d]", err);
ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE;
} else {
read_op->sent_len += len;
@@ -534,14 +528,13 @@ static void oacp_read_proc_execute(struct bt_ots *ots,
struct bt_gatt_ots_oacp_read_params *params;
if (!ots->cur_obj) {
LOG_ERR("Invalid Current Object on OACP Read procedure");
LOG_ERR("OtsOacpRdInvCurObj");
return;
}
params = &ots->cur_obj->state.read_op.oacp_params;
LOG_DBG("Executing Read procedure with offset: 0x%08X and "
"length: 0x%08X", params->offset, params->len);
LOG_DBG("OtsOacpExecRd[%08x][%08x]", params->offset, params->len);
oacp_read_proc_cb(&ots->l2cap, conn);
}
@@ -560,13 +553,12 @@ static ssize_t oacp_write_proc_cb(struct bt_gatt_ots_l2cap *l2cap_ctx,
ots = CONTAINER_OF(l2cap_ctx, struct bt_ots, l2cap);
if (!ots->cur_obj) {
LOG_ERR("Invalid Current Object on OACP Write procedure");
LOG_ERR("OtsOacpWrInvCurObj");
return -ENODEV;
}
if (!ots->cb->obj_write) {
LOG_ERR("OTS Write operation failed: "
"there is no OTS Write callback");
LOG_ERR("OtsOacpWrNoCb");
ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE;
return -ENODEV;
}
@@ -575,7 +567,7 @@ static ssize_t oacp_write_proc_cb(struct bt_gatt_ots_l2cap *l2cap_ctx,
offset = write_op->oacp_params.offset + write_op->recv_len;
len = buf->len;
if (write_op->recv_len + len > write_op->oacp_params.len) {
LOG_WRN("More bytes received than the client indicated");
LOG_WRN("OtsOacpRecvMoreThanInd");
len = write_op->oacp_params.len - write_op->recv_len;
}
rem = write_op->oacp_params.len - (write_op->recv_len + len);
@@ -591,24 +583,24 @@ static ssize_t oacp_write_proc_cb(struct bt_gatt_ots_l2cap *l2cap_ctx,
* released by the l2cap layer. This is an unsupported use case at the moment.
*/
if (rc == -EINPROGRESS) {
LOG_ERR("Unsupported error code %zd returned by object write callback", rc);
LOG_ERR("OtsOacpWrCbUnsuppRc[%zd]", rc);
}
LOG_ERR("OTS Write operation failed with error: %zd", rc);
LOG_ERR("OtsOacpWrOpFail[%zd]", rc);
ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE;
} else {
/* Return -EIO as an error if all of data was not written */
if (rc != len) {
len = 0;
rc = -EIO;
LOG_ERR("OTS Write operation partially failed");
LOG_ERR("OtsOacpWrPartialFail");
ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE;
}
}
write_op->recv_len += len;
if (write_op->recv_len == write_op->oacp_params.len) {
LOG_DBG("OACP Write Op over L2CAP is completed");
LOG_DBG("OtsOacpWrL2capComp");
ots->cur_obj->state.type = BT_GATT_OTS_OBJECT_IDLE_STATE;
}
@@ -626,10 +618,10 @@ static void oacp_ind_cb(struct bt_conn *conn,
{
struct bt_ots *ots = (struct bt_ots *) params->attr->user_data;
LOG_DBG("Received OACP Indication ACK with status: 0x%04X", err);
LOG_DBG("OtsOacpRecvIndAck[%04x]", err);
if (!ots->cur_obj) {
LOG_DBG("There is no object associated with this ACK");
LOG_DBG("OtsOacpNoObjForAck");
return;
}
@@ -644,7 +636,7 @@ static void oacp_ind_cb(struct bt_conn *conn,
/* procedure is not in progress and was already completed */
break;
default:
LOG_ERR("Unsupported OTS state: %d", ots->cur_obj->state.type);
LOG_ERR("OtsOacpUnsuppState[%d]", ots->cur_obj->state.type);
break;
}
}
@@ -664,7 +656,7 @@ static void oacp_ind_send(const struct bt_gatt_attr *oacp_attr,
oacp_res[oacp_res_len++] = oacp_status;
if (oacp_proc.type == BT_GATT_OTS_OACP_PROC_CHECKSUM_CALC &&
oacp_status == BT_GATT_OTS_OACP_RES_SUCCESS) {
oacp_status == BT_GATT_OTS_OACP_RES_SUCCESS) {
sys_put_le32(net_buf_simple_pull_le32(resp_param), (oacp_res + oacp_res_len));
oacp_res_len += sizeof(uint32_t);
}
@@ -677,7 +669,7 @@ static void oacp_ind_send(const struct bt_gatt_attr *oacp_attr,
ots->oacp_ind.params.data = oacp_res;
ots->oacp_ind.params.len = oacp_res_len;
LOG_DBG("Sending OACP indication");
LOG_DBG("OtsOacpSendInd");
k_work_submit(&ots->oacp_ind.work);
}
@@ -693,20 +685,20 @@ ssize_t bt_gatt_ots_oacp_write(struct bt_conn *conn,
struct bt_ots *ots = (struct bt_ots *) attr->user_data;
NET_BUF_SIMPLE_DEFINE(resp_param, sizeof(uint32_t));
LOG_DBG("Object Action Control Point GATT Write Operation");
LOG_DBG("OtsOacpGattWr");
if (!ots->oacp_ind.is_enabled) {
LOG_WRN("OACP indications not enabled");
LOG_WRN("OtsOacpIndNotEnabled");
return BT_GATT_ERR(BT_ATT_ERR_CCC_IMPROPER_CONF);
}
if (offset != 0) {
LOG_ERR("Invalid offset of OACP Write Request");
LOG_WRN("OtsOacpWrReqInvOft");
return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET);
}
if (k_work_is_pending(&ots->oacp_ind.work)) {
LOG_ERR("OACP Write received before indication sent");
LOG_WRN("OtsOacpWrBeforeIndSent");
return BT_GATT_ERR(BT_ATT_ERR_PROCEDURE_IN_PROGRESS);
}
@@ -715,22 +707,21 @@ ssize_t bt_gatt_ots_oacp_write(struct bt_conn *conn,
case 0:
oacp_status = oacp_proc_validate(conn, ots, &oacp_proc, &resp_param);
if (oacp_status != BT_GATT_OTS_OACP_RES_SUCCESS) {
LOG_WRN("OACP Write error status: 0x%02X", oacp_status);
LOG_WRN("OtsOacpWrErrStatus[%02x]", oacp_status);
}
break;
case -ENOTSUP:
oacp_status = BT_GATT_OTS_OACP_RES_OPCODE_NOT_SUP;
LOG_WRN("OACP unsupported procedure type: 0x%02X", oacp_proc.type);
LOG_WRN("OtsOacpUnsuppProcType[%02x]", oacp_proc.type);
break;
case -EBADMSG:
LOG_ERR("Invalid length of OACP Write Request for 0x%02X "
"Op Code", oacp_proc.type);
LOG_WRN("OtsOacpWrReqInvLen[%02x]", oacp_proc.type);
return BT_GATT_ERR(BT_ATT_ERR_INVALID_ATTRIBUTE_LEN);
case -ENODATA:
LOG_ERR("Invalid length of OACP Write Request");
LOG_WRN("OtsOacpWrReqNoData");
return BT_GATT_ERR(BT_ATT_ERR_INVALID_ATTRIBUTE_LEN);
default:
LOG_ERR("Invalid return code from oacp_command_decode: %d", decode_status);
LOG_ERR("OtsOacpDecodeInvRc[%d]", decode_status);
return BT_GATT_ERR(BT_ATT_ERR_UNLIKELY);
}
@@ -745,7 +736,7 @@ void bt_gatt_ots_oacp_cfg_changed(const struct bt_gatt_attr *attr,
CONTAINER_OF((struct bt_gatt_ccc_managed_user_data *) attr->user_data,
struct bt_gatt_ots_indicate, ccc);
LOG_DBG("Object Action Control Point CCCD value: 0x%04X", value);
LOG_DBG("OtsOacpCccd[%04x]", value);
oacp_ind->is_enabled = false;
if (value == BT_GATT_CCC_INDICATE) {

View File

@@ -119,7 +119,7 @@ static enum bt_gatt_ots_olcp_res_code olcp_goto_proc_execute(
struct bt_gatt_ots_object *id_obj;
if (!BT_OTS_VALID_OBJ_ID(id)) {
LOG_DBG("Invalid object ID 0x%016llx", id);
LOG_WRN("OtsOlcpInvObjId[%016llx]", id);
return BT_GATT_OTS_OLCP_RES_INVALID_PARAMETER;
}
@@ -139,7 +139,7 @@ static enum bt_gatt_ots_olcp_res_code olcp_goto_proc_execute(
static enum bt_gatt_ots_olcp_res_code olcp_proc_execute(
struct bt_ots *ots, struct bt_gatt_ots_olcp_proc *proc)
{
LOG_DBG("Executing OLCP procedure with 0x%02X Op Code", proc->type);
LOG_DBG("OtsOlcpExecProc[%02x]", proc->type);
switch (proc->type) {
case BT_GATT_OTS_OLCP_PROC_FIRST:
@@ -200,7 +200,7 @@ static void olcp_ind_cb(struct bt_conn *conn,
struct bt_gatt_indicate_params *params,
uint8_t err)
{
LOG_DBG("Received OLCP Indication ACK with status: 0x%04X", err);
LOG_DBG("OtsOlcpRecvIndAck[%04x]", err);
}
static void olcp_ind_send(const struct bt_gatt_attr *olcp_attr,
@@ -227,7 +227,7 @@ static void olcp_ind_send(const struct bt_gatt_attr *olcp_attr,
ots->olcp_ind.params.chan_opt = BT_ATT_CHAN_OPT_NONE;
#endif /* CONFIG_BT_EATT */
LOG_DBG("Sending OLCP indication");
LOG_DBG("OtsOlcpSendInd");
k_work_submit(&ots->olcp_ind.work);
}
@@ -243,20 +243,20 @@ ssize_t bt_gatt_ots_olcp_write(struct bt_conn *conn,
struct bt_gatt_ots_olcp_proc olcp_proc;
struct bt_ots *ots = (struct bt_ots *) attr->user_data;
LOG_DBG("Object List Control Point GATT Write Operation");
LOG_DBG("OtsOlcpGattWr");
if (!ots->olcp_ind.is_enabled) {
LOG_WRN("OLCP indications not enabled");
LOG_WRN("OtsOlcpIndNotEnabled");
return BT_GATT_ERR(BT_ATT_ERR_CCC_IMPROPER_CONF);
}
if (offset != 0) {
LOG_ERR("Invalid offset of OLCP Write Request");
LOG_WRN("OtsOlcpWrReqInvOft");
return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET);
}
if (k_work_is_pending(&ots->olcp_ind.work)) {
LOG_ERR("OLCP Write received before indication sent");
LOG_WRN("OtsOlcpWrBeforeIndSent");
return BT_GATT_ERR(BT_ATT_ERR_PROCEDURE_IN_PROGRESS);
}
@@ -267,14 +267,13 @@ ssize_t bt_gatt_ots_olcp_write(struct bt_conn *conn,
case 0:
olcp_status = olcp_proc_execute(ots, &olcp_proc);
if (olcp_status != BT_GATT_OTS_OLCP_RES_SUCCESS) {
LOG_WRN("OLCP Write error status: 0x%02X", olcp_status);
LOG_WRN("OtsOlcpWrErrStatus[%02x]", olcp_status);
} else if (old_obj != ots->cur_obj) {
char id[BT_OTS_OBJ_ID_STR_LEN];
bt_ots_obj_id_to_str(ots->cur_obj->id, id,
sizeof(id));
LOG_DBG("Selecting a new Current Object with id: %s",
id);
LOG_DBG("OtsOlcpSelNewCurObj[%s]", id);
if (IS_ENABLED(CONFIG_BT_OTS_DIR_LIST_OBJ)) {
bt_ots_dir_list_selected(ots->dir_list, ots->obj_manager,
@@ -288,17 +287,16 @@ ssize_t bt_gatt_ots_olcp_write(struct bt_conn *conn,
break;
case -ENOTSUP:
olcp_status = BT_GATT_OTS_OLCP_RES_PROC_NOT_SUP;
LOG_WRN("OLCP unsupported procedure type: 0x%02X", olcp_proc.type);
LOG_WRN("OtsOlcpUnsuppProcType[%02x]", olcp_proc.type);
break;
case -EBADMSG:
LOG_ERR("Invalid length of OLCP Write Request for 0x%02X "
"Op Code", olcp_proc.type);
LOG_WRN("OtsOlcpWrReqInvLen[%02x]", olcp_proc.type);
return BT_GATT_ERR(BT_ATT_ERR_INVALID_ATTRIBUTE_LEN);
case -ENODATA:
LOG_ERR("Invalid size of OLCP Write Request");
LOG_WRN("OtsOlcpWrReqNoData");
return BT_GATT_ERR(BT_ATT_ERR_INVALID_ATTRIBUTE_LEN);
default:
LOG_ERR("Invalid return code from olcp_command_decode: %d", decode_status);
LOG_ERR("OtsOlcpDecodeInvRc[%d]", decode_status);
return BT_GATT_ERR(BT_ATT_ERR_UNLIKELY);
}
@@ -313,7 +311,7 @@ void bt_gatt_ots_olcp_cfg_changed(const struct bt_gatt_attr *attr,
CONTAINER_OF((struct bt_gatt_ccc_managed_user_data *) attr->user_data,
struct bt_gatt_ots_indicate, ccc);
LOG_DBG("Object List Control Point CCCD value: 0x%04X", value);
LOG_DBG("OtsOlcpCccd[%04x]", value);
olcp_ind->is_enabled = false;
if (value == BT_GATT_CCC_INDICATE) {

View File

@@ -189,6 +189,8 @@ if BT_ISO
choice BT_ISO_LOG_LEVEL
prompt "BLE_ISO_LOG_LEVEL"
default BT_ISO_LOG_LEVEL_INFO if BT_LOG_CRITICAL_ONLY_ISO
default BT_ISO_LOG_LEVEL_DEBUG if BLE_COMPRESSED_LOG_ENABLE
default BT_ISO_LOG_LEVEL_WARNING
depends on !BT_ISO_NO_LOG
help

View File

@@ -1983,7 +1983,7 @@ static void handle_gatts_read_event(struct bt_le_gatts_read_event *event)
* values larger than one PDU (e.g. a BASS Broadcast Receive State). */
ret = attr->read(conn, attr, (void *)rsp, GATT_MAX_ATTR_LEN, event->offset);
if (ret < 0) {
LOG_DBG("[B]GattsRdEvtErr[%u][%d]", event->attr_handle, ret);
LOG_WRN("[B]GattsRdEvtErr[%u][%d]", event->attr_handle, ret);
status = BT_GATT_ERR(ret);
}
@@ -2178,7 +2178,7 @@ static void handle_gatts_write_event(struct bt_le_gatts_write_event *event)
} else {
ret = attr->write(conn, attr, event->value, event->len, 0, 0);
if (ret < 0) {
LOG_DBG("[B]GattsWrEvtErr[%u][%d]", event->attr_handle, ret);
LOG_WRN("[B]GattsWrEvtErr[%u][%d]", event->attr_handle, ret);
status = BT_GATT_ERR(ret);
}
@@ -2239,7 +2239,7 @@ static void handle_gatts_exec_write_event(struct bt_le_gatts_exec_write_event *e
} else {
ret = attr->write(conn, attr, gatt_conn->prep_buf, gatt_conn->prep_len, 0, 0);
if (ret < 0) {
LOG_DBG("[B]GattsExecWrErr[%u][%d]", gatt_conn->prep_attr_handle, (int)ret);
LOG_WRN("[B]GattsExecWrErr[%u][%d]", gatt_conn->prep_attr_handle, (int)ret);
status = BT_GATT_ERR(ret);
}
}

View File

@@ -307,7 +307,7 @@ static uint8_t gatt_foreach_iter(const struct bt_gatt_attr *attr,
/* Match attribute user_data if set */
if (attr_data && attr_data != attr->user_data) {
LOG_DBG("GattForeachIterMismatchData");
LOG_DBG("GattForeachIterSkipData");
return BT_GATT_ITER_CONTINUE;
}

View File

@@ -34,18 +34,16 @@ static void iso_timer_cb(void *arg)
err = bt_le_iso_task_post(ISO_QUEUE_ITEM_TYPE_TIMER_EVENT, work, 0);
if (err) {
LOG_ERR("IsoTimerPostFail[%d]", err);
LOG_ERR("TimerCbPostFail[%d]", err);
}
}
int k_work_submit(struct k_work *work)
{
LOG_DBG("WorkSubmit[%p]", work);
assert(work);
if (work->handler == NULL) {
LOG_WRN("WorkHdlrNull");
LOG_WRN("TimerSubmitHdlrNull");
return -EINVAL;
}
@@ -67,62 +65,52 @@ bool k_work_is_pending(struct k_work *work)
{
bool is_pending;
LOG_DBG("WorkIsPending[%p]", work);
assert(work);
if (work->handler == NULL) {
LOG_WRN("WorkHdlrNull");
LOG_WRN("TimerIsPendingHdlrNull");
return false;
}
is_pending = (work->timer ? esp_timer_is_active(work->timer) : false);
LOG_DBG("%sPending", is_pending ? "Is" : "Not");
LOG_DBG("TimerIsPendingRet[%s]", is_pending ? "Is" : "Not");
return is_pending;
}
void k_work_init(struct k_work *work, k_work_handler_t handler)
{
LOG_DBG("WorkInit[%p]", work);
assert(work);
work->handler = handler;
}
struct k_work_delayable *k_work_delayable_from_work(struct k_work *work)
{
LOG_DBG("DworkFromWork[%p]", work);
assert(work);
return (struct k_work_delayable *)work;
}
void k_work_init_delayable(struct k_work_delayable *dwork,
k_work_handler_t handler)
{
LOG_DBG("DworkInit[%p]", dwork);
assert(dwork);
const esp_timer_create_args_t timer_args = {
.callback = &iso_timer_cb,
.arg = &dwork->work,
.name = "iso_timer",
.name = "IsoTimer",
};
int err;
if (dwork->work.timer) {
LOG_WRN("TimerCreated");
LOG_WRN("TimerInitAlreadyCreated");
return;
}
err = esp_timer_create(&timer_args, (esp_timer_handle_t *)&dwork->work.timer);
if (err) {
LOG_ERR("CreateTimerFail[%d]", err);
LOG_ERR("TimerInitCreateFail[%d]", err);
/* Reset handler so the object remains in a clean uninitialized state */
dwork->work.handler = NULL;
return;
@@ -135,18 +123,16 @@ void k_work_deinit_delayable(struct k_work_delayable *dwork)
{
int err;
LOG_DBG("DworkDeinit[%p]", dwork);
assert(dwork);
if (dwork->work.timer == NULL) {
LOG_INF("TimerNotCreated");
LOG_INF("TimerDeinitNotCreated");
return;
}
err = esp_timer_delete(dwork->work.timer);
if (err) {
LOG_ERR("DeleteTimerFail[%d]", err);
LOG_ERR("TimerDeinitDelFail[%d]", err);
return;
}
@@ -155,12 +141,10 @@ void k_work_deinit_delayable(struct k_work_delayable *dwork)
int k_work_cancel_delayable(struct k_work_delayable *dwork)
{
LOG_DBG("DworkCancel[%p]", dwork);
assert(dwork);
if (dwork->work.timer == NULL) {
LOG_INF("TimerNotCreated");
LOG_INF("TimerCancelNotCreated");
return -EINVAL;
}
@@ -172,14 +156,12 @@ int k_work_cancel_delayable(struct k_work_delayable *dwork)
bool k_work_cancel_delayable_sync(struct k_work_delayable *dwork,
struct k_work_sync *sync)
{
LOG_DBG("DworkCancelSync[%p]", dwork);
assert(dwork);
ARG_UNUSED(sync);
if (dwork->work.timer == NULL) {
LOG_INF("TimerNotCreated");
LOG_INF("TimerCancelSyncNotCreated");
return false;
}
@@ -193,12 +175,10 @@ int k_work_schedule(struct k_work_delayable *dwork, k_timeout_t ms)
{
int err;
LOG_DBG("WorkSchedule[%p][%u]", dwork, ms);
assert(dwork);
if (dwork->work.timer == NULL) {
LOG_WRN("TimerNotCreated");
LOG_WRN("TimerSchNotCreated");
return -EINVAL;
}
@@ -213,7 +193,7 @@ int k_work_schedule(struct k_work_delayable *dwork, k_timeout_t ms)
err = esp_timer_start_once(dwork->work.timer, ms * 1000);
if (err) {
LOG_ERR("StartTimerFail[%d]", err);
LOG_ERR("TimerSchStartFail[%d]", err);
return -EIO;
}
@@ -224,12 +204,10 @@ int k_work_reschedule(struct k_work_delayable *dwork, k_timeout_t ms)
{
int err;
LOG_DBG("WorkReschedule[%p][%u]", dwork, ms);
assert(dwork);
if (dwork->work.timer == NULL) {
LOG_WRN("TimerNotCreated");
LOG_WRN("TimerReschNotCreated");
return -EINVAL;
}
@@ -244,7 +222,7 @@ int k_work_reschedule(struct k_work_delayable *dwork, k_timeout_t ms)
err = esp_timer_start_once(dwork->work.timer, ms * 1000);
if (err) {
LOG_ERR("RestartTimerFail[%d]", err);
LOG_ERR("TimerReschStartFail[%d]", err);
return -EIO;
}
@@ -255,13 +233,11 @@ int k_work_schedule_periodic_us(struct k_work_delayable *dwork, uint64_t period_
{
int err;
LOG_DBG("WorkSchedulePeriodicUs[%p][%llu]", dwork, (unsigned long long)period_us);
assert(dwork);
assert(period_us > 0);
if (dwork->work.timer == NULL) {
LOG_WRN("TimerNotCreated");
LOG_WRN("TimerPeriodicNotCreated");
return -EINVAL;
}
@@ -269,7 +245,7 @@ int k_work_schedule_periodic_us(struct k_work_delayable *dwork, uint64_t period_
err = esp_timer_start_periodic(dwork->work.timer, period_us);
if (err) {
LOG_ERR("StartPeriodicTimerFail[%d]", err);
LOG_ERR("TimerPeriodicStartFail[%d]", err);
return -EIO;
}
@@ -289,17 +265,15 @@ k_timeout_t k_work_delayable_remaining_get(struct k_work_delayable *dwork)
k_timeout_t timeout;
int64_t delta_us;
LOG_DBG("DworkRemainingGet[%p]", dwork);
assert(dwork);
if (dwork->work.timer == NULL) {
LOG_WRN("TimerNotCreated");
LOG_WRN("TimerRemainingNotCreated");
return 0;
}
if (dwork->work.timeout_us == 0) {
LOG_DBG("WorkTimeoutZero");
LOG_DBG("TimerRemainingTimeoutZero");
return 0;
}
@@ -307,7 +281,7 @@ k_timeout_t k_work_delayable_remaining_get(struct k_work_delayable *dwork)
timeout = (delta_us > 0 ? (k_timeout_t)(delta_us / 1000) : 0);
LOG_DBG("Timeout[%u]", timeout);
LOG_DBG("TimerRemaining[%u]", timeout);
return timeout;
}

View File

@@ -38,3 +38,15 @@ CONFIG_FREERTOS_HZ=1000
# CONFIG_BT_ISO_HEAP_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_HEAP_EXTERNAL_MEMORY=y
# Bandwidth-optimized (critical-only) compressed BLE Audio/ISO logging over
# UART DMA. Pins shown are for esp32s31 (UART0 TX = GPIO58, 3000000 baud); set
# CONFIG_BLE_LOG_PRPH_UART_DMA_* values to the port/pin your capture reads.
# CONFIG_BLE_LOG_ENABLED=y
# CONFIG_BT_LOG_CRITICAL_ONLY=y
# CONFIG_BLE_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_LOG_PRPH_UART_DMA=y
# CONFIG_BLE_LOG_PRPH_UART_DMA_PORT=0
# CONFIG_BLE_LOG_PRPH_UART_DMA_BAUD_RATE=3000000
# CONFIG_BLE_LOG_PRPH_UART_DMA_TX_IO_NUM=58

View File

@@ -28,3 +28,15 @@ CONFIG_FREERTOS_HZ=1000
# CONFIG_BT_ISO_HEAP_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_HEAP_EXTERNAL_MEMORY=y
# Bandwidth-optimized (critical-only) compressed BLE Audio/ISO logging over
# UART DMA. Pins shown are for esp32s31 (UART0 TX = GPIO58, 3000000 baud); set
# CONFIG_BLE_LOG_PRPH_UART_DMA_* values to the port/pin your capture reads.
# CONFIG_BLE_LOG_ENABLED=y
# CONFIG_BT_LOG_CRITICAL_ONLY=y
# CONFIG_BLE_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_LOG_PRPH_UART_DMA=y
# CONFIG_BLE_LOG_PRPH_UART_DMA_PORT=0
# CONFIG_BLE_LOG_PRPH_UART_DMA_BAUD_RATE=3000000
# CONFIG_BLE_LOG_PRPH_UART_DMA_TX_IO_NUM=58

View File

@@ -30,3 +30,15 @@ CONFIG_FREERTOS_HZ=1000
# CONFIG_BT_ISO_HEAP_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_HEAP_EXTERNAL_MEMORY=y
# Bandwidth-optimized (critical-only) compressed BLE Audio/ISO logging over
# UART DMA. Pins shown are for esp32s31 (UART0 TX = GPIO58, 3000000 baud); set
# CONFIG_BLE_LOG_PRPH_UART_DMA_* values to the port/pin your capture reads.
# CONFIG_BLE_LOG_ENABLED=y
# CONFIG_BT_LOG_CRITICAL_ONLY=y
# CONFIG_BLE_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_LOG_PRPH_UART_DMA=y
# CONFIG_BLE_LOG_PRPH_UART_DMA_PORT=0
# CONFIG_BLE_LOG_PRPH_UART_DMA_BAUD_RATE=3000000
# CONFIG_BLE_LOG_PRPH_UART_DMA_TX_IO_NUM=58

View File

@@ -37,3 +37,15 @@ CONFIG_FREERTOS_HZ=1000
# CONFIG_BT_ISO_HEAP_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_HEAP_EXTERNAL_MEMORY=y
# Bandwidth-optimized (critical-only) compressed BLE Audio/ISO logging over
# UART DMA. Pins shown are for esp32s31 (UART0 TX = GPIO58, 3000000 baud); set
# CONFIG_BLE_LOG_PRPH_UART_DMA_* values to the port/pin your capture reads.
# CONFIG_BLE_LOG_ENABLED=y
# CONFIG_BT_LOG_CRITICAL_ONLY=y
# CONFIG_BLE_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_LOG_PRPH_UART_DMA=y
# CONFIG_BLE_LOG_PRPH_UART_DMA_PORT=0
# CONFIG_BLE_LOG_PRPH_UART_DMA_BAUD_RATE=3000000
# CONFIG_BLE_LOG_PRPH_UART_DMA_TX_IO_NUM=58

View File

@@ -44,3 +44,15 @@ CONFIG_FREERTOS_HZ=1000
# CONFIG_BT_ISO_HEAP_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_HEAP_EXTERNAL_MEMORY=y
# Bandwidth-optimized (critical-only) compressed BLE Audio/ISO logging over
# UART DMA. Pins shown are for esp32s31 (UART0 TX = GPIO58, 3000000 baud); set
# CONFIG_BLE_LOG_PRPH_UART_DMA_* values to the port/pin your capture reads.
# CONFIG_BLE_LOG_ENABLED=y
# CONFIG_BT_LOG_CRITICAL_ONLY=y
# CONFIG_BLE_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_LOG_PRPH_UART_DMA=y
# CONFIG_BLE_LOG_PRPH_UART_DMA_PORT=0
# CONFIG_BLE_LOG_PRPH_UART_DMA_BAUD_RATE=3000000
# CONFIG_BLE_LOG_PRPH_UART_DMA_TX_IO_NUM=58

View File

@@ -35,3 +35,15 @@ CONFIG_FREERTOS_HZ=1000
# CONFIG_BT_ISO_HEAP_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_HEAP_EXTERNAL_MEMORY=y
# Bandwidth-optimized (critical-only) compressed BLE Audio/ISO logging over
# UART DMA. Pins shown are for esp32s31 (UART0 TX = GPIO58, 3000000 baud); set
# CONFIG_BLE_LOG_PRPH_UART_DMA_* values to the port/pin your capture reads.
# CONFIG_BLE_LOG_ENABLED=y
# CONFIG_BT_LOG_CRITICAL_ONLY=y
# CONFIG_BLE_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_LOG_PRPH_UART_DMA=y
# CONFIG_BLE_LOG_PRPH_UART_DMA_PORT=0
# CONFIG_BLE_LOG_PRPH_UART_DMA_BAUD_RATE=3000000
# CONFIG_BLE_LOG_PRPH_UART_DMA_TX_IO_NUM=58

View File

@@ -35,3 +35,15 @@ CONFIG_FREERTOS_HZ=1000
# CONFIG_BT_ISO_HEAP_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_HEAP_EXTERNAL_MEMORY=y
# Bandwidth-optimized (critical-only) compressed BLE Audio/ISO logging over
# UART DMA. Pins shown are for esp32s31 (UART0 TX = GPIO58, 3000000 baud); set
# CONFIG_BLE_LOG_PRPH_UART_DMA_* values to the port/pin your capture reads.
# CONFIG_BLE_LOG_ENABLED=y
# CONFIG_BT_LOG_CRITICAL_ONLY=y
# CONFIG_BLE_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_LOG_PRPH_UART_DMA=y
# CONFIG_BLE_LOG_PRPH_UART_DMA_PORT=0
# CONFIG_BLE_LOG_PRPH_UART_DMA_BAUD_RATE=3000000
# CONFIG_BLE_LOG_PRPH_UART_DMA_TX_IO_NUM=58

View File

@@ -30,3 +30,15 @@ CONFIG_FREERTOS_HZ=1000
# CONFIG_BT_ISO_HEAP_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_HEAP_EXTERNAL_MEMORY=y
# Bandwidth-optimized (critical-only) compressed BLE Audio/ISO logging over
# UART DMA. Pins shown are for esp32s31 (UART0 TX = GPIO58, 3000000 baud); set
# CONFIG_BLE_LOG_PRPH_UART_DMA_* values to the port/pin your capture reads.
# CONFIG_BLE_LOG_ENABLED=y
# CONFIG_BT_LOG_CRITICAL_ONLY=y
# CONFIG_BLE_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_LOG_PRPH_UART_DMA=y
# CONFIG_BLE_LOG_PRPH_UART_DMA_PORT=0
# CONFIG_BLE_LOG_PRPH_UART_DMA_BAUD_RATE=3000000
# CONFIG_BLE_LOG_PRPH_UART_DMA_TX_IO_NUM=58

View File

@@ -40,6 +40,18 @@ CONFIG_BT_TBS_SUPPORTED_FEATURES=3
# CONFIG_BT_AUDIO_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_HEAP_EXTERNAL_MEMORY=y
# Bandwidth-optimized (critical-only) compressed BLE Audio/ISO logging over
# UART DMA. Pins shown are for esp32s31 (UART0 TX = GPIO58, 3000000 baud); set
# CONFIG_BLE_LOG_PRPH_UART_DMA_* values to the port/pin your capture reads.
# CONFIG_BLE_LOG_ENABLED=y
# CONFIG_BT_LOG_CRITICAL_ONLY=y
# CONFIG_BLE_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_LOG_PRPH_UART_DMA=y
# CONFIG_BLE_LOG_PRPH_UART_DMA_PORT=0
# CONFIG_BLE_LOG_PRPH_UART_DMA_BAUD_RATE=3000000
# CONFIG_BLE_LOG_PRPH_UART_DMA_TX_IO_NUM=58
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
CONFIG_FREERTOS_HZ=1000

View File

@@ -54,3 +54,15 @@ CONFIG_FREERTOS_HZ=1000
# CONFIG_BT_ISO_HEAP_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_AUDIO_HEAP_EXTERNAL_MEMORY=y
# Bandwidth-optimized (critical-only) compressed BLE Audio/ISO logging over
# UART DMA. Pins shown are for esp32s31 (UART0 TX = GPIO58, 3000000 baud); set
# CONFIG_BLE_LOG_PRPH_UART_DMA_* values to the port/pin your capture reads.
# CONFIG_BLE_LOG_ENABLED=y
# CONFIG_BT_LOG_CRITICAL_ONLY=y
# CONFIG_BLE_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_LOG_PRPH_UART_DMA=y
# CONFIG_BLE_LOG_PRPH_UART_DMA_PORT=0
# CONFIG_BLE_LOG_PRPH_UART_DMA_BAUD_RATE=3000000
# CONFIG_BLE_LOG_PRPH_UART_DMA_TX_IO_NUM=58

View File

@@ -24,3 +24,15 @@ CONFIG_FREERTOS_HZ=1000
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_ISO_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_ISO_HEAP_EXTERNAL_MEMORY=y
# Bandwidth-optimized (critical-only) compressed BLE Audio/ISO logging over
# UART DMA. Pins shown are for esp32s31 (UART0 TX = GPIO58, 3000000 baud); set
# CONFIG_BLE_LOG_PRPH_UART_DMA_* values to the port/pin your capture reads.
# CONFIG_BLE_LOG_ENABLED=y
# CONFIG_BT_LOG_CRITICAL_ONLY=y
# CONFIG_BLE_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_LOG_PRPH_UART_DMA=y
# CONFIG_BLE_LOG_PRPH_UART_DMA_PORT=0
# CONFIG_BLE_LOG_PRPH_UART_DMA_BAUD_RATE=3000000
# CONFIG_BLE_LOG_PRPH_UART_DMA_TX_IO_NUM=58

View File

@@ -24,3 +24,15 @@ CONFIG_FREERTOS_HZ=1000
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_ISO_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_ISO_HEAP_EXTERNAL_MEMORY=y
# Bandwidth-optimized (critical-only) compressed BLE Audio/ISO logging over
# UART DMA. Pins shown are for esp32s31 (UART0 TX = GPIO58, 3000000 baud); set
# CONFIG_BLE_LOG_PRPH_UART_DMA_* values to the port/pin your capture reads.
# CONFIG_BLE_LOG_ENABLED=y
# CONFIG_BT_LOG_CRITICAL_ONLY=y
# CONFIG_BLE_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_LOG_PRPH_UART_DMA=y
# CONFIG_BLE_LOG_PRPH_UART_DMA_PORT=0
# CONFIG_BLE_LOG_PRPH_UART_DMA_BAUD_RATE=3000000
# CONFIG_BLE_LOG_PRPH_UART_DMA_TX_IO_NUM=58

View File

@@ -23,3 +23,15 @@ CONFIG_FREERTOS_HZ=1000
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_ISO_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_ISO_HEAP_EXTERNAL_MEMORY=y
# Bandwidth-optimized (critical-only) compressed BLE Audio/ISO logging over
# UART DMA. Pins shown are for esp32s31 (UART0 TX = GPIO58, 3000000 baud); set
# CONFIG_BLE_LOG_PRPH_UART_DMA_* values to the port/pin your capture reads.
# CONFIG_BLE_LOG_ENABLED=y
# CONFIG_BT_LOG_CRITICAL_ONLY=y
# CONFIG_BLE_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_LOG_PRPH_UART_DMA=y
# CONFIG_BLE_LOG_PRPH_UART_DMA_PORT=0
# CONFIG_BLE_LOG_PRPH_UART_DMA_BAUD_RATE=3000000
# CONFIG_BLE_LOG_PRPH_UART_DMA_TX_IO_NUM=58

View File

@@ -23,3 +23,15 @@ CONFIG_FREERTOS_HZ=1000
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_ISO_BSS_SEG_EXTERNAL_MEMORY=y
# CONFIG_BT_ISO_HEAP_EXTERNAL_MEMORY=y
# Bandwidth-optimized (critical-only) compressed BLE Audio/ISO logging over
# UART DMA. Pins shown are for esp32s31 (UART0 TX = GPIO58, 3000000 baud); set
# CONFIG_BLE_LOG_PRPH_UART_DMA_* values to the port/pin your capture reads.
# CONFIG_BLE_LOG_ENABLED=y
# CONFIG_BT_LOG_CRITICAL_ONLY=y
# CONFIG_BLE_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_ISO_COMPRESSED_LOG_ENABLE=y
# CONFIG_BLE_LOG_PRPH_UART_DMA=y
# CONFIG_BLE_LOG_PRPH_UART_DMA_PORT=0
# CONFIG_BLE_LOG_PRPH_UART_DMA_BAUD_RATE=3000000
# CONFIG_BLE_LOG_PRPH_UART_DMA_TX_IO_NUM=58