Lines Matching +full:rx +full:- +full:addr +full:- +full:mode
4 * SPDX-License-Identifier: Apache-2.0
28 enum bt_mesh_blob_io_mode mode) in blob_io_open() argument
42 for (i = 0; i < chunk->size; ++i) { in blob_chunk_wr()
43 blob_rx_sum += chunk->data[i]; in blob_chunk_wr()
44 if (chunk->data[i] != in blob_chunk_wr()
45 blob_data[(i + chunk->offset) % sizeof(blob_data)]) { in blob_chunk_wr()
58 for (int i = 0; i < chunk->size; ++i) { in blob_chunk_rd()
59 chunk->data[i] = in blob_chunk_rd()
60 blob_data[(i + chunk->offset) % sizeof(blob_data)]; in blob_chunk_rd()
89 target->addr, reason); in blob_cli_lost_target()
109 shell_print(bt_mesh_shell_ctx_shell, "\tMax BLOB size: %u bytes", caps->max_size); in blob_cli_caps()
110 shell_print(bt_mesh_shell_ctx_shell, "\tBlock size: %u-%u (%u-%u bytes)", in blob_cli_caps()
111 caps->min_block_size_log, caps->max_block_size_log, in blob_cli_caps()
112 1 << caps->min_block_size_log, in blob_cli_caps()
113 1 << caps->max_block_size_log); in blob_cli_caps()
114 shell_print(bt_mesh_shell_ctx_shell, "\tMax chunks: %u", caps->max_chunks); in blob_cli_caps()
115 shell_print(bt_mesh_shell_ctx_shell, "\tChunk size: %u", caps->max_chunk_size); in blob_cli_caps()
116 shell_print(bt_mesh_shell_ctx_shell, "\tMTU size: %u", caps->mtu_size); in blob_cli_caps()
117 shell_print(bt_mesh_shell_ctx_shell, "\tModes: %s", modes[caps->modes]); in blob_cli_caps()
137 total_blocks = DIV_ROUND_UP(info->size, 1U << info->block_size_log); in get_progress()
142 blocks_not_rxed += info->missing_blocks[i % 8] & (1 << (i % 8)); in get_progress()
145 return (total_blocks - blocks_not_rxed) / total_blocks; in get_progress()
158 target->addr, info->phase, progress); in xfer_progress()
238 return -EINVAL; in cmd_flash_stream_set()
287 uint16_t addr = blob_cli_xfer.targets[i].addr; in blob_cli_inputs_prepare() local
291 blob_cli_xfer.targets[i].addr = addr; in blob_cli_inputs_prepare()
305 return -ENODEV; in cmd_tx()
320 blob_cli_xfer.xfer.mode = BT_MESH_BLOB_XFER_MODE_PUSH; in cmd_tx()
322 blob_cli_xfer.xfer.mode = BT_MESH_BLOB_XFER_MODE_PULL; in cmd_tx()
324 shell_print(sh, "Mode must be either push or pull"); in cmd_tx()
325 return -EINVAL; in cmd_tx()
347 "Sending transfer 0x%x (mode: %s, %u bytes) to 0x%04x", in cmd_tx()
349 blob_cli_xfer.xfer.mode == BT_MESH_BLOB_XFER_MODE_PUSH ? in cmd_tx()
354 err = bt_mesh_blob_cli_send((struct bt_mesh_blob_cli *)mod_cli->rt->user_data, in cmd_tx()
376 t->addr = shell_strtoul(argv[1], 0, &err); in cmd_target()
383 shell_print(sh, "Added target 0x%04x", t->addr); in cmd_target()
395 return -ENODEV; in cmd_caps()
424 err = bt_mesh_blob_cli_caps_get((struct bt_mesh_blob_cli *)mod_cli->rt->user_data, in cmd_caps()
437 return -ENODEV; in cmd_tx_cancel()
441 bt_mesh_blob_cli_cancel((struct bt_mesh_blob_cli *)mod_cli->rt->user_data); in cmd_tx_cancel()
452 return -ENODEV; in cmd_tx_get()
463 return -EINVAL; in cmd_tx_get()
468 err = bt_mesh_blob_cli_xfer_progress_get((struct bt_mesh_blob_cli *)mod_cli->rt->user_data, in cmd_tx_get()
481 return -ENODEV; in cmd_tx_suspend()
485 bt_mesh_blob_cli_suspend((struct bt_mesh_blob_cli *)mod_cli->rt->user_data); in cmd_tx_suspend()
493 return -ENODEV; in cmd_tx_resume()
497 bt_mesh_blob_cli_resume((struct bt_mesh_blob_cli *)mod_cli->rt->user_data); in cmd_tx_resume()
515 return -ENODEV; in cmd_rx()
533 err = bt_mesh_blob_srv_recv((struct bt_mesh_blob_srv *)mod_srv->rt->user_data, in cmd_rx()
536 shell_print(sh, "BLOB RX setup failed (%d)", err); in cmd_rx()
547 return -ENODEV; in cmd_rx_cancel()
550 shell_print(sh, "Cancelling BLOB rx"); in cmd_rx_cancel()
551 err = bt_mesh_blob_srv_cancel((struct bt_mesh_blob_srv *)mod_srv->rt->user_data); in cmd_rx_cancel()
572 SHELL_CMD_ARG(target, NULL, "<Addr>", cmd_target, 2, 0),
575 "<ChunkSize> [<Group> [<Mode(push, pull)> "
577 SHELL_CMD_ARG(tx-cancel, NULL, NULL, cmd_tx_cancel, 1, 0),
578 SHELL_CMD_ARG(tx-get, NULL, "[Group]", cmd_tx_get, 1, 1),
579 SHELL_CMD_ARG(tx-suspend, NULL, NULL, cmd_tx_suspend, 1, 0),
580 SHELL_CMD_ARG(tx-resume, NULL, NULL, cmd_tx_resume, 1, 0),
589 SHELL_CMD_ARG(rx, NULL, "<ID> [<TimeoutBase(10s steps)>]", cmd_rx, 2, 1),
590 SHELL_CMD_ARG(rx-cancel, NULL, NULL, cmd_rx_cancel, 1, 0),
598 SHELL_CMD_ARG(flash-stream-set, NULL, "<AreaID> [<Offset>]",
600 SHELL_CMD_ARG(flash-stream-unset, NULL, NULL, cmd_flash_stream_unset, 1, 0),