Bluetooth: Mesh: shell supports 32 bytes static oob
Commit adds support of 32 bytes static oob in mesh shell. Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
This commit is contained in:
parent
707d1ed819
commit
236e3b64db
2 changed files with 5 additions and 5 deletions
|
@ -297,7 +297,7 @@ To allow a device to provision devices over GATT, the :kconfig:option:`CONFIG_BT
|
|||
* ``String``: Unquoted alphanumeric authentication string.
|
||||
|
||||
|
||||
``mesh prov static-oob [Val(1-16 hex)]``
|
||||
``mesh prov static-oob [Val(1-32 hex)]``
|
||||
----------------------------------------
|
||||
|
||||
Set or clear the static OOB authentication value. The static OOB authentication value must be set before provisioning starts to have any effect. The static OOB value must be same on both participants in the provisioning. To enable this command, the :kconfig:option:`BT_MESH_SHELL_PROV_CTX_INSTANCE` option must be enabled.
|
||||
|
@ -358,7 +358,7 @@ To allow a device to provision devices over GATT, the :kconfig:option:`CONFIG_BT
|
|||
------------------------------------------------
|
||||
From the provisioner device, instruct the unprovisioned device to use static OOB authentication, and use the given static authentication value when provisioning.
|
||||
|
||||
* ``Val`` - Static OOB value. Providing a hex-string shorter than 16 bytes will populate the N most significant bytes of the array and zero-pad the rest.
|
||||
* ``Val`` - Static OOB value. Providing a hex-string shorter than 32 bytes will populate the N most significant bytes of the array and zero-pad the rest.
|
||||
|
||||
``mesh prov auth-method none``
|
||||
------------------------------
|
||||
|
|
|
@ -611,7 +611,7 @@ static void link_close(bt_mesh_prov_bearer_t bearer)
|
|||
shell_print_ctx("Provisioning link closed on %s", bearer2str(bearer));
|
||||
}
|
||||
|
||||
static uint8_t static_val[16];
|
||||
static uint8_t static_val[32];
|
||||
|
||||
struct bt_mesh_prov bt_mesh_shell_prov = {
|
||||
.uuid = dev_uuid,
|
||||
|
@ -645,7 +645,7 @@ static int cmd_static_oob(const struct shell *sh, size_t argc, char *argv[])
|
|||
bt_mesh_shell_prov.static_val_len = 0U;
|
||||
} else {
|
||||
bt_mesh_shell_prov.static_val_len = hex2bin(argv[1], strlen(argv[1]),
|
||||
static_val, 16);
|
||||
static_val, 32);
|
||||
if (bt_mesh_shell_prov.static_val_len) {
|
||||
bt_mesh_shell_prov.static_val = static_val;
|
||||
} else {
|
||||
|
@ -886,7 +886,7 @@ static int cmd_auth_method_set_output(const struct shell *sh, size_t argc, char
|
|||
static int cmd_auth_method_set_static(const struct shell *sh, size_t argc, char *argv[])
|
||||
{
|
||||
size_t len;
|
||||
uint8_t static_oob_auth[16];
|
||||
uint8_t static_oob_auth[32];
|
||||
int err = 0;
|
||||
|
||||
len = hex2bin(argv[1], strlen(argv[1]), static_oob_auth, sizeof(static_oob_auth));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue