diff --git a/mesh/config-client.c b/mesh/config-client.c
index 901ebe9..80c7fd8 100644
--- a/mesh/config-client.c
+++ b/mesh/config-client.c
get_le16(data + i));
break;
+ /* Per Mesh Profile 4.3.2.50 */
+ case OP_MODEL_APP_LIST:
+ bt_shell_printf("\nModel App Key list for node %4.4x "
+ "length: %u status: %s\n", src, len,
+ data[0] == MESH_STATUS_SUCCESS ? "Success" :
+ mesh_status_str(data[0]));
+
+ if (data[0] != MESH_STATUS_SUCCESS)
+ return true;
+
+ bt_shell_printf("Element Addr:\t%4.4x\n", get_le16(data + 1));
+ bt_shell_printf("Model ID:\t%4.4x\n", get_le16(data + 3));
+
+ for (i = 5; i < len; i += 2)
+ bt_shell_printf("Model App Key:\t%4.4x\n",
+ get_le16(data + i));
+ break;
+
/* Per Mesh Profile 4.3.2.63 */
case OP_CONFIG_HEARTBEAT_PUB_STATUS:
bt_shell_printf("\nSet heartbeat for node %4.4x status: %s\n",
bt_shell_printf("Failed to send \"GET SUB GET\"\n");
}
+static void cmd_get_app(int argc, char *argv[])
+{
+ uint16_t n;
+ uint8_t msg[32];
+ int parm_cnt;
+
+ if (IS_UNASSIGNED(target)) {
+ bt_shell_printf("Destination not set\n");
+ return;
+ }
+
+ n = mesh_opcode_set(OP_MODEL_APP_GET, msg);
+
+ parm_cnt = read_input_parameters(argc, argv);
+ if (parm_cnt != 2) {
+ bt_shell_printf("Bad arguments: %s\n", argv[1]);
+ return;
+ }
+
+ /* Per Mesh Profile 4.3.2.49 */
+ /* Element Address */
+ put_le16(parms[0], msg + n);
+ n += 2;
+ /* Model ID */
+ put_le16(parms[1], msg + n);
+ n += 2;
+
+ if (!config_send(msg, n))
+ bt_shell_printf("Failed to send \"GET APP GET\"\n");
+}
+
static void cmd_set_hb(int argc, char *argv[])
{
uint16_t n;
cmd_sub_add, "Subscription add"},
{"sub-get", "<ele_addr> <model id>",
cmd_sub_get, "Subscription get"},
-
+ {"app-get", "<ele_addr> <model id>",
+ cmd_get_app, "Get App Keys"},
{} },
};