This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PB Remote + Configuration model fail

Dear Nordic Support,

I am using nRF SDK for Mesh version 3.2.0 with nRF52840-DK. I am making 2 devices like the below:

1. First device: the provisioner, able to do PB Remote and node configuration. I combined the code from the light switch provisioner example and PB remote client example. I only use function

2. Second device: the provisionne, light switch client/server. I combined the code from light switch client and PB remote server.

The code runs but it is not as I expected. After The provisioning steps runs successfully but the software fails to configure the configuration model. The function app_config_client_event_cb is not executed and after testing, I find that the m_client.event_cb in file config_client.c is never called.

Here is the code for prov_evt_handler function:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
static void prov_evt_handler(const nrf_mesh_prov_evt_t * p_evt)
{
switch (p_evt->type)
{
case NRF_MESH_PROV_EVT_UNPROVISIONED_RECEIVED:
{
if (m_device_state == DEVICE_STATE_PB_ADV_MODE)
{
start_provisioning(p_evt->params.unprov.device_uuid, NRF_MESH_PROV_BEARER_ADV);
m_device_state = DEVICE_STATE_NONE;
}
break;
}
case NRF_MESH_PROV_EVT_LINK_ESTABLISHED:
{
__LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Local provisioning link established\n");
m_current_prov_address = m_next_unprov_address;
break;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

And here is the debug log for the PB client (privisioner) and PB server (light switch - provisionee):

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<t: 0>, main.c, 892, ----- BLE Mesh Provisioner + Remote Provisioning Client Demo -----
<t: 13027>, main.c, 818, Initializing and adding models
<t: 13053>, main.c, 225, Unable to add flash manager for app data
<t: 13059>, main.c, 871, Setup defaults: Adding keys, addresses, and bindings
<t: 13186>, provisioner_helper.c, 414, netkey_handle: 0
<t: 13206>, mesh_app_utils.c, 65, Device UUID (raw): C5E4C95EB78319448F01568565066AAF
<t: 13213>, mesh_app_utils.c, 70, Device UUID : 5EC9E4C5-83B7-4419-8F01-568565066AAF
<t: 13224>, main.c, 936, Next unprovisioned device address: 0x0100
<t: 13230>, main.c, 937, Next unprovisioned device index: 0
<t: 13243>, main.c, 941,
--------------------------------
1) Provision first available device with PB-ADV
2) Set current client publish handle (corresponding to a known server)
2.1) <address handle>
3) Start remote scanning
4) Cancel the remote scanning
5) Start remote provisioning
5.1) Device number
<t: 13687>, main.c, 171, Flash write complete
<t: 13692>, main.c, 904, Starting application ...
<t: 13698>, main.c, 906, Provisoned Nodes: 0, Configured Nodes: 0 Next Address: 0x0100
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<t: 0>, main.c, 568, ----- BLE Mesh Light Switch Client Demo -----
<t: 14021>, main.c, 525, Initializing and adding models
<t: 20514>, mesh_app_utils.c, 65, Device UUID (raw): 9BE5201B8630204C8E73991513B2CA0B
<t: 20521>, mesh_app_utils.c, 70, Device UUID : 1B20E59B-3086-4C20-8E73-991513B2CA0B
<t: 1255333>, main.c, 175, Successfully provisioned
<t: 1255338>, main.c, 178, Node Address: 0x1337
(There should be something like this)
<t: 700915>, config_server.c, 629, dsm_appkey_add(appkey_handle:0 appkey_index:0)
<t: 705220>, config_server.c, 2441, Access Info:
element_index=0 model_id = 2-FFFF model_handle=1
<t: 716239>, config_server.c, 2441, Access Info:
element_index=1 model_id = 1001-FFFF model_handle=2
<t: 717114>, config_server.c, 2441, Access Info:
element_index=2 model_id = 1001-FFFF model_handle=3
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Can you give me some advices where to start debugging this, or the reasons which causes this issue? I would really appreciate that.

Thank you and best regards,

                   Duy