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

Provisioning problem in Mesh SDK v2.1.1

I have combined the light switch server and client model to build control model. When i start provisioning for control model opcode status field : 2 error occurs which means invalid model. Can you please help me

  • Have you taken a look at the "creating new models" documentation in our infocenter? I would recommend starting there first. Also, there is some good documentation inside the mesh profile spec about control models. Could you please provide some more code snippets & some logging information?

  • I have to know whether need to use sever and client model ID for model id or need to use separate model id for control model.

  •  can i know why this UUID is not getting provision

    <t: 0>, main.c, 559, ----- BLE Mesh Light Switch Provisioner Demo -----
    <t: 0>, mesh_softdevice_init.c, 117, Initializing SoftDevice...
    <t: 0>, mesh_softdevice_init.c, 75, Enabling BLE...
    <t: 16>, mesh_softdevice_init.c, 109, sd_ble_enable: app_ram_base should be adjusted to 0x20002DA0
    <t: 570>, main.c, 497, Initializing and adding models
    <t: 581>, main.c, 540, Setup defaults: Adding keys, addresses, and bindings
    <t: 744>, provisioner_helper.c, 329, netkey_handle: 0
    <t: 755>, main.c, 589, <start>
    <t: 1062>, main.c, 120, Flash write complete
    <t: 1065>, main.c, 576, Starting application ...
    <t: 1067>, main.c, 578, Provisoned Nodes: 0, Configured Nodes: 0 Next Address: 0x0100
    <t: 1071>, main.c, 579, Dev key : A11F6F80AF875F710375FAE72F2C71CF
    <t: 1074>, main.c, 580, Net key : 67607D0900767703E841A1D984755BDD
    <t: 1077>, main.c, 581, App key : E585E567C5052D5BF53CD5B79ABBCB58
    <t: 1080>, main.c, 582, Press Button 1 to start provisioning and configuration process.
    <t: 22565>, main.c, 457, Button 1 pressed
    <t: 22568>, main.c, 364, Waiting for Client node to be provisioned ...
    <t: 27329>, provisioner_helper.c, 282, Scanning For Unprovisioned Devices
    <t: 46385>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 46389>, provisioner_helper.c, 95, UUID filter matched
    <t: 46739>, provisioner_helper.c, 259, Provisioning link established
    <t: 59660>, provisioner_helper.c, 254, Static authentication data provided
    <t: 137087>, provisioner_helper.c, 192, Provisioning completed received
    <t: 137090>, provisioner_helper.c, 197, Adding device address, and device keys
    <t: 137095>, provisioner_helper.c, 214, Addr: 0x0100 addr_handle: 0 netkey_handle: 0 devkey_handle: 2
    <t: 140633>, provisioner_helper.c, 155, Local provisioning link closed: prov_state: 2 remaining retries: 2
    <t: 140637>, main.c, 285, Provisioning successful
    <t: 140639>, provisioner_helper.c, 181, Provisioning complete. Node addr: 0x0100 elements: 5
    <t: 140643>, node_setup.c, 799, Configuring Node: 0x0100
    <t: 140646>, node_setup.c, 713, Config client setup: devkey_handle:2 addr_handle:0
    <t: 140649>, node_setup.c, 401, Getting composition data
    <t: 140691>, main.c, 120, Flash write complete
    <t: 144826>, main.c, 335, Config client event
    <t: 144829>, node_setup.c, 411, Adding appkey
    <t: 157642>, main.c, 335, Config client event
    <t: 157644>, node_setup.c, 312, opcode status field: 0
    <t: 157647>, node_setup.c, 422, App key bind: Health server
    <t: 159387>, main.c, 335, Config client event
    <t: 159389>, node_setup.c, 312, opcode status field: 0
    <t: 159392>, node_setup.c, 492, Setting publication address for the health server to 0x0001
    <t: 162006>, main.c, 335, Config client event
    <t: 162009>, node_setup.c, 312, opcode status field: 0
    <t: 162011>, node_setup.c, 456, App key bind: Simple On/Off client on element 0x0101
    <t: 163536>, main.c, 335, Config client event
    <t: 163538>, node_setup.c, 312, opcode status field: 0
    <t: 163541>, node_setup.c, 341, Set: on/off client: 0x0101 pub addr: 0x0105
    <t: 167230>, main.c, 335, Config client event
    <t: 167232>, node_setup.c, 312, opcode status field: 0
    <t: 167234>, node_setup.c, 341, Set: on/off client: 0x0102 pub addr: 0x0106
    <t: 171560>, main.c, 335, Config client event
    <t: 171562>, node_setup.c, 312, opcode status field: 0
    <t: 171565>, main.c, 251, Configuration of device 0 successful
    <t: 171568>, provisioner_helper.c, 282, Scanning For Unprovisioned Devices
    <t: 171604>, main.c, 120, Flash write complete
    <t: 193395>, provisioner_helper.c, 144, UUID seen: 0059DFFF00000000A46956D7E9F77D62
    <t: 259112>, provisioner_helper.c, 144, UUID seen: 0059DFFF00000000A46956D7E9F77D62

  • First off, you should adjust your app ram base to 0x20002DA0 like it says in the log. Which UUID are you trying to provision? Most likely you do not have a UUID filter match between the device you want to provision & the provisioner. If you take a look at the stock provisioner example code, the check_network_state() function is called when you press button 1 on the provisioner.

    Then, if no devices have been provisioned, the client device will be provisioned first. The provisioner filters the different mesh devices that want to be provisioned by the m_client_node_uuid. Once that node is provisioned, the server nodes will be provisioned via the m_server_uuid_filter.

    The provisioner receives unprovisioned node beacon messages from the unprovisioned nodes & then the NRF_MESH_EVT_UNPROVISIONED_RECEIVED event is handled via the prov_evt_handler() function in provisioner_helper.c. This function than calls uuid_filter_compare() & if your unprovisioned device does not contain the correct server UUID, it will not get provisioned. You will most likely need to update the UUID (see the light switch server example for more info regarding this).

Related