Home
last modified time | relevance | path

Searched refs:fwid (Results 1 – 12 of 12) sorted by relevance

/Zephyr-latest/subsys/bluetooth/mesh/
Ddfu_slot.c23 #define HEADER_SIZE offsetof(struct slot, slot.fwid)
49 const uint8_t *fwid, size_t fwid_len) in slot_eq() argument
52 !memcmp(fwid, slot->fwid, fwid_len); in slot_eq()
81 slot_to_store->slot.fwid, slot_to_store->slot.fwid_len); in slot_store()
176 const uint8_t *fwid, size_t fwid_len) in bt_mesh_dfu_slot_fwid_set() argument
190 slot_eq(&slots[i].slot, fwid, fwid_len)) { in bt_mesh_dfu_slot_fwid_set()
197 memcpy(slot->slot.fwid, fwid, fwid_len); in bt_mesh_dfu_slot_fwid_set()
222 bt_hex(slot->slot.fwid, slot->slot.fwid_len)); in bt_mesh_dfu_slot_commit()
279 int bt_mesh_dfu_slot_get(const uint8_t *fwid, size_t fwid_len, struct bt_mesh_dfu_slot **slot) in bt_mesh_dfu_slot_get() argument
285 if (slot_eq(&s->slot, fwid, fwid_len)) { in bt_mesh_dfu_slot_get()
[all …]
Ddfu_slot.h61 const uint8_t *fwid, size_t fwid_len);
114 int bt_mesh_dfu_slot_get(const uint8_t *fwid, size_t fwid_len, struct bt_mesh_dfu_slot **slot);
Ddfd_srv.c367 net_buf_simple_add_mem(&rsp, srv->upload.slot->fwid, in upload_status_rsp_with_progress()
403 const uint8_t *fwid, size_t fwid_len) in set_upload_fwid() argument
405 int err = bt_mesh_dfu_slot_fwid_set(srv->upload.slot, fwid, fwid_len); in set_upload_fwid()
418 err = bt_mesh_dfu_slot_get(fwid, fwid_len, &srv->upload.slot); in set_upload_fwid()
442 const uint8_t *meta, *fwid; in handle_upload_start() local
459 fwid = net_buf_simple_pull_mem(buf, fwid_len); in handle_upload_start()
461 LOG_DBG("Upload Start: size: %d, fwid: %s, metadata: %s", size, bt_hex(fwid, fwid_len), in handle_upload_start()
478 !memcmp(srv->upload.slot->fwid, fwid, fwid_len) && in handle_upload_start()
517 err = set_upload_fwid(srv, ctx, fwid, fwid_len); in handle_upload_start()
551 LOG_DBG("%s", bt_hex(fwid, fwid_len)); in handle_upload_start()
[all …]
Ddfd_srv_internal.h39 const uint8_t **fwid);
Ddfu_cli.c594 memcmp(cli->xfer.slot->fwid, img->fwid, img->fwid_len)) { in target_img_cb()
866 img.fwid = net_buf_simple_pull_mem(buf, img.fwid_len); in handle_info_status()
874 LOG_DBG("\tImage %u\n\r\tfwid: %s", idx, bt_hex(img.fwid, img.fwid_len)); in handle_info_status()
918 bt_hex(cli->xfer.slot->fwid, cli->xfer.slot->fwid_len)); in handle_info_status()
Ddfu_srv.c157 if (!srv->imgs[idx].fwid) { in handle_info_get()
171 net_buf_simple_add_mem(&rsp, srv->imgs[idx].fwid, in handle_info_get()
/Zephyr-latest/subsys/bluetooth/mesh/shell/
Ddfd.c43 uint16_t idx, const uint8_t *fwid, size_t fwid_len) in print_fw_status() argument
47 if (fwid) { in print_fw_status()
50 shell_fprintf(sh, SHELL_NORMAL, "%02x", fwid[i]); in print_fw_status()
320 uint8_t fwid[CONFIG_BT_MESH_DFU_FWID_MAXLEN]; in cmd_dfd_fw_get() local
322 size_t fwid_len = hex2bin(argv[1], hexlen, fwid, CONFIG_BT_MESH_DFU_FWID_MAXLEN); in cmd_dfd_fw_get()
328 int idx = bt_mesh_dfu_slot_get(fwid, fwid_len, NULL); in cmd_dfd_fw_get()
331 print_fw_status(sh, BT_MESH_DFD_SUCCESS, idx, fwid, fwid_len); in cmd_dfd_fw_get()
333 print_fw_status(sh, BT_MESH_DFD_ERR_FW_NOT_FOUND, 0xffff, fwid, fwid_len); in cmd_dfd_fw_get()
352 print_fw_status(sh, BT_MESH_DFD_SUCCESS, idx, slot->fwid, slot->fwid_len); in cmd_dfd_fw_get_by_idx()
377 const uint8_t *fwid = &fwid_buf[0]; in cmd_dfd_fw_delete() local
[all …]
Ddfu.c71 .fwid = &((struct shell_dfu_fwid){ 0x01, { 1, 0, 0, 0 } }),
142 struct shell_dfu_fwid *fwid = in bt_mesh_shell_dfu_cmds_init() local
143 (struct shell_dfu_fwid *)dfu_imgs[0].fwid; in bt_mesh_shell_dfu_cmds_init()
145 fwid->ver = img_header.h.v1.sem_ver; in bt_mesh_shell_dfu_cmds_init()
379 uint8_t fwid[CONFIG_BT_MESH_DFU_FWID_MAXLEN]; in cmd_dfu_slot_add() local
399 fwid_len = hex2bin(argv[2], strlen(argv[2]), fwid, in cmd_dfu_slot_add()
400 sizeof(fwid)); in cmd_dfu_slot_add()
401 bt_mesh_dfu_slot_fwid_set(slot, fwid, fwid_len); in cmd_dfu_slot_add()
461 char fwid[2 * CONFIG_BT_MESH_DFU_FWID_MAXLEN + 1]; in slot_info_print() local
465 len = bin2hex(slot->fwid, slot->fwid_len, fwid, sizeof(fwid)); in slot_info_print()
[all …]
/Zephyr-latest/include/zephyr/bluetooth/mesh/
Ddfu.h142 const void *fwid; member
160 uint8_t fwid[CONFIG_BT_MESH_DFU_FWID_MAXLEN]; member
Ddfd_srv.h143 const uint8_t *fwid, uint16_t fwid_len);
278 uint8_t *fwid, size_t fwid_len);
/Zephyr-latest/tests/bsim/bluetooth/mesh/src/
Dtest_dfu.c47 .fwid = &target_fw_ver_curr,
437 static struct bt_mesh_dfu_slot *slot_reserve_and_set(size_t size, uint8_t *fwid, size_t fwid_len, in slot_reserve_and_set() argument
447 int err = bt_mesh_dfu_slot_fwid_set(new_slot, fwid, fwid_len); in slot_reserve_and_set()
466 uint8_t fwid[CONFIG_BT_MESH_DFU_FWID_MAXLEN] = { 0xAA, 0xBB, 0xCC, 0xDD }; in slot_add() local
473 new_slot = slot_reserve_and_set(size, fwid, fwid_len, metadata, metadata_len); in slot_add()
598 uint8_t fwid[CONFIG_BT_MESH_DFU_FWID_MAXLEN] = { 0 }; in test_dist_dfu_slot_create() local
612 fwid[0] = i; in test_dist_dfu_slot_create()
614 slot[i] = slot_reserve_and_set(size, fwid, fwid_len, metadata, metadata_len); in test_dist_dfu_slot_create()
639 uint8_t fwid[CONFIG_BT_MESH_DFU_FWID_MAXLEN] = { 0 }; in check_slot() local
649 fwid[0] = idx + 2; in check_slot()
[all …]
/Zephyr-latest/tests/bluetooth/tester/src/
Dbtp_mesh.c169 uint8_t fwid[CONFIG_BT_MESH_DFU_FWID_MAXLEN]; member
184 const uint8_t *fwid, uint16_t fwid_len) in dfd_srv_start_oob_upload() argument
190 memcpy(dfd_srv_oob_ctx.fwid, fwid, fwid_len); in dfd_srv_start_oob_upload()
278 dfd_srv_oob_ctx.fwid, dfd_srv_oob_ctx.fwid_len); in oob_check_handler()
364 .fwid = &dfu_fwid,
431 memcpy(&dfu_fwid[0], dfu_self_update_slot->fwid, dfu_self_update_slot->fwid_len); in dfu_apply()
4184 static void dfu_slot_add(size_t size, uint8_t *fwid, size_t fwid_len, in dfu_slot_add() argument
4197 err = bt_mesh_dfu_slot_fwid_set(slot, fwid, fwid_len); in dfu_slot_add()
4217 char fwid[2 * CONFIG_BT_MESH_DFU_FWID_MAXLEN + 1]; in dfu_img_cb() local
4222 if (img->fwid_len <= sizeof(fwid)) { in dfu_img_cb()
[all …]