diff --git a/tools/mesh-cfgclient.c b/tools/mesh-cfgclient.c
index 50be82b..6d2d344 100644
--- a/tools/mesh-cfgclient.c
+++ b/tools/mesh-cfgclient.c
#define CFG_SRV_MODEL 0x0000
#define CFG_CLI_MODEL 0x0001
-#define RPR_SVR_MODEL 0xFFFF0004
+#define RPR_SVR_MODEL 0x0004
+#define RPR_CLI_MODEL 0x0005
#define PRV_BEACON_SVR 0x0008
#define PRV_BEACON_CLI 0x0009
remote_clear_rejected_addresses(ivi);
}
+ /* Read own node composition */
+ if (!cfgcli_get_comp(0x0001, 128))
+ l_error("Failed to read own composition");
+
return;
fail:
{
struct scan_data *data;
- if (model != RPR_SVR_MODEL)
+ if (model != (0xffff0000 | RPR_SVR_MODEL))
return;
data = l_malloc(sizeof(struct scan_data));
diff --git a/tools/mesh/cfgcli.c b/tools/mesh/cfgcli.c
index 4f6248e..1a404af 100644
--- a/tools/mesh/cfgcli.c
+++ b/tools/mesh/cfgcli.c
return bt_shell_noninteractive_quit(EXIT_SUCCESS);
}
+
+bool cfgcli_get_comp(uint16_t unicast, uint8_t page)
+{
+ uint16_t n;
+ uint8_t msg[32];
+
+ n = mesh_opcode_set(OP_DEV_COMP_GET, msg);
+
+ msg[n++] = page;
+
+ target = unicast;
+
+ return config_send(msg, n, OP_DEV_COMP_GET);
+}
+
static void cmd_composition_get(int argc, char *argv[])
{
uint16_t n;
diff --git a/tools/mesh/cfgcli.h b/tools/mesh/cfgcli.h
index 7281caa..621dd02 100644
--- a/tools/mesh/cfgcli.h
+++ b/tools/mesh/cfgcli.h
struct model_info *cfgcli_init(key_send_func_t key_func,
delete_remote_func_t del_node, void *user_data);
+
+bool cfgcli_get_comp(uint16_t unicast, uint8_t page);
void cfgcli_cleanup(void);
diff --git a/tools/mesh/util.c b/tools/mesh/util.c
index d8c47c0..dea496d 100644
--- a/tools/mesh/util.c
+++ b/tools/mesh/util.c
case 0x0001: return "Configuration Client";
case 0x0002: return "Health Server";
case 0x0003: return "Health Client";
+ case 0x0004: return "Remote Provisioning Server";
+ case 0x0005: return "Remote Provisioning Client";
case 0x0008: return "Private Beacon Server";
case 0x0009: return "Private Beacon Client";
case 0x1000: return "Generic OnOff Server";