Home
last modified time | relevance | path

Searched refs:fwid_len (Results 1 – 10 of 10) sorted by relevance

/Zephyr-Core-3.4.0/subsys/bluetooth/mesh/
Ddfu_slot.c66 const uint8_t *fwid, size_t fwid_len) in slot_eq() argument
68 return (slot->fwid_len == fwid_len) && in slot_eq()
69 !memcmp(fwid, slot->fwid, fwid_len); in slot_eq()
85 slot_to_store->slot.fwid, slot_to_store->slot.fwid_len); in slot_store()
120 size_t fwid_len, const uint8_t *metadata, in bt_mesh_dfu_slot_add() argument
126 if (size == 0 || fwid_len > CONFIG_BT_MESH_DFU_FWID_MAXLEN || in bt_mesh_dfu_slot_add()
130 size, fwid_len, metadata_len, uri_len); in bt_mesh_dfu_slot_add()
140 if (slot_eq(&slots[i].slot, fwid, fwid_len)) { in bt_mesh_dfu_slot_add()
150 slot->slot.fwid_len = fwid_len; in bt_mesh_dfu_slot_add()
153 memcpy(slot->slot.fwid, fwid, fwid_len); in bt_mesh_dfu_slot_add()
[all …]
Ddfd_srv.c352 srv->upload.slot->fwid_len); in upload_status_rsp()
372 size_t meta_len, fwid_len, size; in handle_upload_start() local
389 fwid_len = buf->len; in handle_upload_start()
390 fwid = net_buf_simple_pull_mem(buf, fwid_len); in handle_upload_start()
392 LOG_DBG("Upload Start: size: %d, fwid: %s, metadata: %s", size, bt_hex(fwid, fwid_len), in handle_upload_start()
396 fwid_len > CONFIG_BT_MESH_DFU_FWID_MAXLEN || in handle_upload_start()
410 if (srv->upload.slot->fwid_len == fwid_len && in handle_upload_start()
411 !memcmp(srv->upload.slot->fwid, fwid, fwid_len) && in handle_upload_start()
427 idx = bt_mesh_dfu_slot_get(fwid, fwid_len, &srv->upload.slot); in handle_upload_start()
442 srv->upload.slot = bt_mesh_dfu_slot_add(size, fwid, fwid_len, meta, in handle_upload_start()
[all …]
Ddfu_slot.h41 bt_mesh_dfu_slot_add(size_t size, const uint8_t *fwid, size_t fwid_len,
94 int bt_mesh_dfu_slot_get(const uint8_t *fwid, size_t fwid_len,
Ddfd_srv_internal.h38 enum bt_mesh_dfd_status bt_mesh_dfd_srv_fw_delete(struct bt_mesh_dfd_srv *srv, size_t *fwid_len,
Ddfu_cli.c575 if ((img->fwid_len != cli->xfer.slot->fwid_len) || in target_img_cb()
576 memcmp(cli->xfer.slot->fwid, img->fwid, img->fwid_len)) { in target_img_cb()
842 img.fwid_len = net_buf_simple_pull_u8(buf); in handle_info_status()
843 if (buf->len < img.fwid_len + 1) { in handle_info_status()
848 img.fwid = net_buf_simple_pull_mem(buf, img.fwid_len); in handle_info_status()
856 LOG_DBG("\tImage %u\n\r\tfwid: %s", idx, bt_hex(img.fwid, img.fwid_len)); in handle_info_status()
900 bt_hex(cli->xfer.slot->fwid, cli->xfer.slot->fwid_len)); in handle_info_status()
Ddfu_srv.c156 entry_len = 2 + srv->imgs[idx].fwid_len; in handle_info_get()
165 net_buf_simple_add_u8(&rsp, srv->imgs[idx].fwid_len); in handle_info_get()
167 srv->imgs[idx].fwid_len); in handle_info_get()
/Zephyr-Core-3.4.0/subsys/bluetooth/mesh/shell/
Ddfd.c43 uint16_t idx, const uint8_t *fwid, size_t fwid_len) in print_fw_status() argument
49 for (size_t i = 0; i < fwid_len; i++) { in print_fw_status()
322 size_t fwid_len = hex2bin(argv[1], hexlen, fwid, CONFIG_BT_MESH_DFU_FWID_MAXLEN); in cmd_dfd_fw_get() local
324 if (fwid_len != ((hexlen + 1) / 2)) { in cmd_dfd_fw_get()
329 int idx = bt_mesh_dfu_slot_get(fwid, fwid_len, &slot); in cmd_dfd_fw_get()
332 print_fw_status(sh, BT_MESH_DFD_SUCCESS, idx, fwid, fwid_len); in cmd_dfd_fw_get()
334 print_fw_status(sh, BT_MESH_DFD_ERR_FW_NOT_FOUND, 0xffff, fwid, fwid_len); in cmd_dfd_fw_get()
353 print_fw_status(sh, BT_MESH_DFD_SUCCESS, idx, slot->fwid, slot->fwid_len); in cmd_dfd_fw_get_by_idx()
372 size_t fwid_len = hex2bin(argv[1], hexlen, fwid_buf, CONFIG_BT_MESH_DFU_FWID_MAXLEN); in cmd_dfd_fw_delete() local
374 if (fwid_len != ((hexlen + 1) / 2)) { in cmd_dfd_fw_delete()
[all …]
Ddfu.c73 .fwid_len = sizeof(struct shell_dfu_fwid),
381 size_t fwid_len = 0; in cmd_dfu_slot_add() local
394 fwid_len = hex2bin(argv[2], strlen(argv[2]), fwid, in cmd_dfu_slot_add()
409 slot = bt_mesh_dfu_slot_add(size, fwid, fwid_len, metadata, in cmd_dfu_slot_add()
474 len = bin2hex(slot->fwid, slot->fwid_len, fwid, sizeof(fwid)); in slot_info_print()
631 len = bin2hex(img->fwid, img->fwid_len, fwid, sizeof(fwid)); in dfu_img_cb()
/Zephyr-Core-3.4.0/include/zephyr/bluetooth/mesh/
Ddfu.h145 size_t fwid_len; member
159 size_t fwid_len; member
/Zephyr-Core-3.4.0/tests/bsim/bluetooth/mesh/src/
Dtest_dfu.c49 .fwid_len = sizeof(target_fw_ver_curr),
444 size_t fwid_len = 4; in slot_add() local
449 ASSERT_EQUAL(sizeof(target_fw_ver_new), fwid_len); in slot_add()
451 new_slot = bt_mesh_dfu_slot_add(size, fwid, fwid_len, metadata, metadata_len, uri, in slot_add()
578 size_t fwid_len = 4; in test_dist_dfu_slot_create() local
596 slot[i] = bt_mesh_dfu_slot_add(size, fwid, fwid_len, metadata, metadata_len, uri, in test_dist_dfu_slot_create()
632 size_t fwid_len = 4; in check_slot() local
645 ASSERT_EQUAL(fwid_len, slot->fwid_len); in check_slot()
646 ASSERT_TRUE(memcmp(fwid, slot->fwid, fwid_len) == 0); in check_slot()
661 size_t fwid_len = 4; in test_dist_dfu_slot_create_recover() local
[all …]