diff --git a/mesh/config-client.c b/mesh/config-client.c
index 80c7fd8..92fca5a 100644
--- a/mesh/config-client.c
+++ b/mesh/config-client.c
bt_shell_printf("Failed to send \"SET MODEL PUBLICATION\"\n");
}
+static void cmd_get_pub(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_CONFIG_MODEL_PUB_GET, msg);
+
+ parm_cnt = read_input_parameters(argc, argv);
+ if (parm_cnt != 2) {
+ bt_shell_printf("Bad arguments: %s\n", argv[1]);
+ return;
+ }
+
+ /* Element Address */
+ put_le16(parms[0], msg + n);
+ n += 2;
+ /* Model Id */
+ if (parms[1] > 0xffff) {
+ put_le16(parms[1] >> 16, msg + n);
+ put_le16(parms[1], msg + n + 2);
+ n += 4;
+ } else {
+ put_le16(parms[1], msg + n);
+ n += 2;
+ }
+
+ if (!config_send(msg, n))
+ bt_shell_printf("Failed to send \"GET MODEL PUBLICATION\"\n");
+}
+
static void cmd_sub_add(int argc, char *argv[])
{
uint16_t n;
{"pub-set", "<ele_addr> <pub_addr> <app_idx> "
"<period (step|res)> <re-xmt (count|per)> <model>",
cmd_set_pub, "Set publication"},
+ {"pub-get", "<ele_addr> <model>", cmd_get_pub,
+ "Get publication"},
{"hb-pub-set", "<pub_addr> <count> <period> <features> <net_idx>",
cmd_set_hb, "Set heartbeati publish"},
{"sub-add", "<ele_addr> <sub_addr> <model id>",