Skip to content

Commit

Permalink
Bluetooth: Mesh: Print URI and FWID in Upload OOB Start msg
Browse files Browse the repository at this point in the history
this is useful for debugging.

Signed-off-by: Pavel Vasilyev <[email protected]>
  • Loading branch information
PavelVPV committed Oct 10, 2023
1 parent 521582b commit 2dc37c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions subsys/bluetooth/mesh/dfd_srv.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,10 @@ static int handle_upload_start_oob(struct bt_mesh_model *mod, struct bt_mesh_msg
fwid_len = buf->len;
fwid = net_buf_simple_pull_mem(buf, fwid_len);

LOG_DBG("Upload OOB Start");
LOG_HEXDUMP_DBG(uri, uri_len, "URI");
LOG_HEXDUMP_DBG(fwid, fwid_len, "FWID");

if (upload_is_busy(srv)) {
#ifdef CONFIG_BT_MESH_DFD_SRV_OOB_UPLOAD
if (srv->upload.is_oob &&
Expand Down
6 changes: 3 additions & 3 deletions tests/bluetooth/tester/src/btp_mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <zephyr/logging/log.h>
#define LOG_MODULE_NAME bttester_mesh
LOG_MODULE_REGISTER(LOG_MODULE_NAME, CONFIG_BTTESTER_LOG_LEVEL);
LOG_MODULE_REGISTER(LOG_MODULE_NAME, 4);//CONFIG_BTTESTER_LOG_LEVEL);

Check failure on line 24 in tests/bluetooth/tester/src/btp_mesh.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

C99_COMMENTS

tests/bluetooth/tester/src/btp_mesh.c:24 do not use C99 // comments

#include "btp/btp.h"
#include "dfu_slot.h"
Expand Down Expand Up @@ -250,11 +250,11 @@ static void oob_check_handler(struct k_work *work)
int err;

if (dfd_srv_oob_ctx.uri_len < 4 || memcmp(dfd_srv_oob_ctx.uri, SUPPORTED_SCHEME,
sizeof(SUPPORTED_SCHEME))) {
strlen(SUPPORTED_SCHEME))) {
status = BT_MESH_DFD_ERR_URI_NOT_SUPPORTED;
} else if (dfd_srv_oob_ctx.uri_len < 7 || memcmp(dfd_srv_oob_ctx.uri,
SUPPORTED_SCHEME "://",
sizeof(SUPPORTED_SCHEME) + 3)) {
strlen(SUPPORTED_SCHEME) + 3)) {
status = BT_MESH_DFD_ERR_URI_MALFORMED;
} else {
status = BT_MESH_DFD_SUCCESS;
Expand Down

0 comments on commit 2dc37c3

Please sign in to comment.