From dd839d90ac7dec0b5053f6b59b0a0f1bc9391057 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 1 Dec 2017 13:01:18 +0200 Subject: [PATCH] Bluetooth: Mesh: shell: Fix AppKey Add command handler The command handler already has support for decoding from hex, however it was not using the decoded value when calling the client API. Signed-off-by: Johan Hedberg --- subsys/bluetooth/host/mesh/shell.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/subsys/bluetooth/host/mesh/shell.c b/subsys/bluetooth/host/mesh/shell.c index 0e83f6911d..2ca8fea657 100644 --- a/subsys/bluetooth/host/mesh/shell.c +++ b/subsys/bluetooth/host/mesh/shell.c @@ -918,10 +918,8 @@ static int cmd_app_key_add(int argc, char *argv[]) memcpy(key_val, default_key, sizeof(key_val)); } - /* TODO: decode key value that's given in hex */ - err = bt_mesh_cfg_app_key_add(net.net_idx, net.dst, key_net_idx, - key_app_idx, default_key, &status); + key_app_idx, key_val, &status); if (err) { printk("Unable to send App Key Add (err %d)\n", err); return 0;