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

Provisioning problem with Mesh SDK 2.0

I try to make a simple project based on a "simple message model" (https://devzone.nordicsemi.com/f/nordic-q-a/29836/send-and-receive-a-string-via-access-layer) with Mesh SDK 2.0 and S132 ver. 6.0. I implemented logging on both sides (see attached file).

I was able to trace the problem to the following issue (check last 6 lines of the attached file): A number of configured devices is increased to 1 in provisioner_helper.c, however the main.c still reads the value as 0. How is this possible and how to fix this?

Server side:

<t:          0>, main.c,  343, ----- BLE Mesh Light Switch Server Demo -----
<t:          0>, mesh_softdevice_init.c,  107, Initializing SoftDevice...
<t:          0>, mesh_softdevice_init.c,   72, Enabling BLE...
<t:          2>, mesh_softdevice_init.c,   83, Ram base: 0x20006000
<t:         18>, mesh_softdevice_init.c,   99, sd_ble_enable: app_ram_base should be adjusted to 0x200032C8
<t:        532>, main.c,  317, Initializing and adding models
<t:       5389>, main.c,  374, Device UUID : 0059FFFF000000001FBA307C8E0811BF
<t:     531088>, main.c,  192, Successfully provisioned

Client & provisioner:

<t:          0>, mesh_softdevice_init.c,  107, Initializing SoftDevice...
<t:          0>, mesh_softdevice_init.c,   72, Enabling BLE...
<t:          2>, mesh_softdevice_init.c,   83, Ram base: 0x20006000
<t:         18>, mesh_softdevice_init.c,   99, sd_ble_enable: app_ram_base should be adjusted to 0x200032C8
<t:        531>, main.c,  508, Initializing and adding models
<t:        543>, main.c,  600, Load cleared app data
<t:        545>, main.c,  618, Configured & provisioned devices set to 0
<t:        549>, main.c,  722, Setup defaults: Adding keys, addresses, and bindings 
<t:        694>, provisioner_helper.c,  292, netkey_handle: 0
<t:        705>, main.c,  689, Waiting for Server node to be provisioned ...
<t:       5556>, provisioner_helper.c,  217, Scanning For Unprovisioned Devices
<t:       5559>, main.c,  762, <start> 
<t:       5671>, main.c,  652, Flash write complete
<t:       5967>, main.c,  652, Flash write complete
<t:      53994>, provisioner_helper.c,  125, UUID seen: 0059FFFF000000001FBA307C8E0811BF
<t:      53997>, provisioner_helper.c,   77, Any UUID accepted
<t:      54534>, provisioner_helper.c,  196, Provisioning link established
<t:      67500>, provisioner_helper.c,  191, Static authentication data provided
<t:      79053>, provisioner_helper.c,  160, Provisioning completed received
<t:      79056>, provisioner_helper.c,  412, Provisioning complete. Adding address 0x0100.
<t:      79062>, provisioner_helper.c,  311, Getting composition data
<t:      83012>, provisioner_helper.c,  135, Local provisioning link closed: prov_state: 4  remaining retries: 2
<t:     135077>, provisioner_helper.c,  441, Config client event
<t:     135080>, provisioner_helper.c,  454, Composition data: 0059000000000020000100000002010000020059000000
<t:     135084>, provisioner_helper.c,  318, Adding appkey
<t:     138854>, provisioner_helper.c,  441, Config client event
<t:     138857>, provisioner_helper.c,  326, Binding appkey to the Health model
<t:     139686>, provisioner_helper.c,  441, Config client event
<t:     139689>, provisioner_helper.c,  337, Binding appkey to the Simple On/Off model
<t:     140614>, provisioner_helper.c,  441, Config client event
<t:     140616>, provisioner_helper.c,  361, Setting publication address for the health server to 0x0001
<t:     143736>, provisioner_helper.c,  441, Config client event
<t:     143738>, provisioner_helper.c,  382, Setting publication address for the On/Off server to 0x0001
<t:     147294>, provisioner_helper.c,  441, Config client event
<t:     147297>, provisioner_helper.c,  390, Adding subscription
<t:     149178>, provisioner_helper.c,  441, Config client event
<t:     149517>, main.c,  170, 4.55 : Configuration of device 0 successful
<t:     149521>, provisioner_helper.c,  509, Configured devices++, now 1
<t:     149524>, provisioner_helper.c,  217, Scanning For Unprovisioned Devices
<t:     373040>, main.c,  170, 11.37 : Button 0 pressed
<t:     373043>, main.c,  340, Configured devices = 0
<t:     373378>, main.c,  170, 11.38 : No devices provisioned

Parents
  • I am doing the similar project

    - 1 board is used for the Client & provisioner:

    - 1 board is used for Server side.

    Seems the device is provisioned, and the node is already configured.

    But afterwards, when i send the simple on off message to the server side, it say Publication not configured for client

     0> <t:         24>, main.c,  932, ----- BLE Mesh Light Switch Mesh Demo -----
     0> <t:        520>, main.c,  861, Initializing and adding models
     0> <t:        526>, main.c,  880, Initializing and adding models finish
     0> <t:        537>, main.c,  911, Setup defaults: Adding keys, addresses, and bindings 
     0> <t:        701>, provisioner_helper.c,  378, netkey_handle: 0
     0> <t:       6030>, main.c, 1426, Device UUID : 0059ABCDEFABCDEFACCDEFABCDEFABCD
     0> <t:       6035>, main.c,  481, Waiting for Server node to be provisioned ...
     0> <t:     995699>, provisioner_helper.c,  303, Static authentication data provided
     0> <t:    1205425>, provisioner_helper.c,  212, Provisioning completed received
     0> <t:    1205430>, provisioner_helper.c,  217, Adding device address, and device keys
     0> <t:    1205436>, provisioner_helper.c,  227, Going to address [0x0100]key_handle [0], dev_key[536886660]
     0> <t:    1205443>, access.c, 1101, #### public address handle 0, set to access_model_pool index 2
     0> <t:    1205448>, config_client.c,  438, >>>>>>>>>>>>>>>>>>>>>>>:0x02 Addr:0x00
     0> <t:    1205454>, provisioner_helper.c,  263, <t:    1209434>, provisioner_helper.c,  175, Local provisioning link closed: prov_state: 2  remaining retries: 2
     0> <t:    1209440>, main.c,  773, Provisioning successful
     0> <t:    1209445>, provisioner_helper.c,  201, Provisioning complete. Node addr: 0x0100 elements: 1
     0> <t:    1209450>, node_setup.c,  699, Configuring Node: 0x0100
     0> <t:    1209455>, config_client.c,  438, >>>>>>>>>>>>>>>>>>>>>>>:0x02 Addr:0x00
     0> <t:    1209461>, node_setup.c,  329, Setup select Step for addr 0x0100
     0> Getting composition data
     0> <t:    1285449>, main.c,  201, Config client event
     0> <t:    1285454>, node_setup.c,  393, Adding appkey
     0> <t:    1285474>, access_reliable.c,  413, access_model_publish statu 0
     0> <t:    1329861>, main.c,  201, Config client event
     0> <t:    1329865>, node_setup.c,  404, App key bind: Health server
     0> <t:    1329877>, access_reliable.c,  413, access_model_publish statu 0
     0> <t:    1332259>, main.c,  201, Config client event
     0> <t:    1332263>, node_setup.c,  419, App key bind: Simple On/Off server
     0> <t:    1332277>, access_reliable.c,  413, access_model_publish statu 0
     0> <t:    1335080>, main.c,  201, Config client event
     0> <t:    1335084>, node_setup.c,  472, Setting publication address for the health server to 0x0001
     0> <t:    1335103>, access_reliable.c,  413, access_model_publish statu 0
     0> <t:    1382356>, main.c,  201, Config client event
     0> <t:    1382361>, node_setup.c,  499, Set: on/off server pub addr: 0x0100
     0> <t:    1382366>, access_reliable.c,  413, access_model_publish statu 4
     0> <t:    1397084>, main.c,  201, Config client event
     0> <t:    1397089>, node_setup.c,  510, Adding subscription
     0> <t:    1397102>, access_reliable.c,  413, access_model_publish statu 0
     0> <t:    1398643>, main.c,  201, Config client event
     0> <t:    1398647>, main.c,  729, Configuration of device 0 successful
     0> <t:    1398652>, main.c,  742, Finish Init the Simple Onff 0 model handle 4
     0> <t:    1398658>, provisioner_helper.c,  331, Scanning For Unprovisioned Devices
     0> <t:    1398716>, main.c,  597, Flash write complete
     0> <t:    1398720>, main.c,  608, Flash write complete exit
     0> <t:    1584330>, main.c,  332, Button 0 pressed
     0> <t:    1584334>, access.c,  351,  I am here 
     0> <t:    1584338>, access.c,  352,  App key Handle 0xFFFF
     0> <t:    1584342>, access.c,  353,  publish_address_handle key Handle 0xFFFF
     0> <t:    1584346>, access.c,  354,  Is valid opcode 1??
     0> <t:    1584350>, access.c,  374, packet tx return here. . at the handle 4
     0> <t:    1584355>, access_reliable.c,  413, access_model_publish statu 7
     0> <t:    1584359>, access_reliable.c,  442, access_model_reliable_publish failed 7
     0> <t:    1680696>, main.c,  332, Button 0 pressed
     0> <t:    1680700>, access.c,  351,  I am here 
     0> <t:    1680704>, access.c,  352,  App key Handle 0xFFFF
     0> <t:    1680708>, access.c,  353,  publish_address_handle key Handle 0xFFFF
     0> <t:    1680712>, access.c,  354,  Is valid opcode 1??
     0> <t:    1680716>, access.c,  374, packet tx return here. . at the handle 4
     0> <t:    1680721>, access_reliable.c,  413, access_model_publish statu 7
     0> <t:    1680727>, access_reliable.c,  442, access_model_reliable_publish failed 7
     0> <t:    1707525>, main.c,  332, Button 0 pressed
     0> <t:    1707529>, access.c,  351,  I am here 
     0> <t:    1707532>, access.c,  352,  App key Handle 0xFFFF
     0> <t:    1707536>, access.c,  353,  publish_address_handle key Handle 0xFFFF
     0> <t:    1707540>, access.c,  354,  Is valid opcode 1??
     0> <t:    1707544>, access.c,  374, packet tx return here. . at the handle 4
     0> <t:    1707549>, access_reliable.c,  413, access_model_publish statu 7
     0> <t:    1707553>, access_reliable.c,  442, access_model_reliable_publish failed 7
     0> <t:    1710307>, main.c,  801, Node 0x0100 alive with 0 active fault(s), RSSI: -67

    Can you teach me your setting on the mp_config_step in the setup_select_steps? I think i am not correctly config all the necessary appkey??

Reply
  • I am doing the similar project

    - 1 board is used for the Client & provisioner:

    - 1 board is used for Server side.

    Seems the device is provisioned, and the node is already configured.

    But afterwards, when i send the simple on off message to the server side, it say Publication not configured for client

     0> <t:         24>, main.c,  932, ----- BLE Mesh Light Switch Mesh Demo -----
     0> <t:        520>, main.c,  861, Initializing and adding models
     0> <t:        526>, main.c,  880, Initializing and adding models finish
     0> <t:        537>, main.c,  911, Setup defaults: Adding keys, addresses, and bindings 
     0> <t:        701>, provisioner_helper.c,  378, netkey_handle: 0
     0> <t:       6030>, main.c, 1426, Device UUID : 0059ABCDEFABCDEFACCDEFABCDEFABCD
     0> <t:       6035>, main.c,  481, Waiting for Server node to be provisioned ...
     0> <t:     995699>, provisioner_helper.c,  303, Static authentication data provided
     0> <t:    1205425>, provisioner_helper.c,  212, Provisioning completed received
     0> <t:    1205430>, provisioner_helper.c,  217, Adding device address, and device keys
     0> <t:    1205436>, provisioner_helper.c,  227, Going to address [0x0100]key_handle [0], dev_key[536886660]
     0> <t:    1205443>, access.c, 1101, #### public address handle 0, set to access_model_pool index 2
     0> <t:    1205448>, config_client.c,  438, >>>>>>>>>>>>>>>>>>>>>>>:0x02 Addr:0x00
     0> <t:    1205454>, provisioner_helper.c,  263, <t:    1209434>, provisioner_helper.c,  175, Local provisioning link closed: prov_state: 2  remaining retries: 2
     0> <t:    1209440>, main.c,  773, Provisioning successful
     0> <t:    1209445>, provisioner_helper.c,  201, Provisioning complete. Node addr: 0x0100 elements: 1
     0> <t:    1209450>, node_setup.c,  699, Configuring Node: 0x0100
     0> <t:    1209455>, config_client.c,  438, >>>>>>>>>>>>>>>>>>>>>>>:0x02 Addr:0x00
     0> <t:    1209461>, node_setup.c,  329, Setup select Step for addr 0x0100
     0> Getting composition data
     0> <t:    1285449>, main.c,  201, Config client event
     0> <t:    1285454>, node_setup.c,  393, Adding appkey
     0> <t:    1285474>, access_reliable.c,  413, access_model_publish statu 0
     0> <t:    1329861>, main.c,  201, Config client event
     0> <t:    1329865>, node_setup.c,  404, App key bind: Health server
     0> <t:    1329877>, access_reliable.c,  413, access_model_publish statu 0
     0> <t:    1332259>, main.c,  201, Config client event
     0> <t:    1332263>, node_setup.c,  419, App key bind: Simple On/Off server
     0> <t:    1332277>, access_reliable.c,  413, access_model_publish statu 0
     0> <t:    1335080>, main.c,  201, Config client event
     0> <t:    1335084>, node_setup.c,  472, Setting publication address for the health server to 0x0001
     0> <t:    1335103>, access_reliable.c,  413, access_model_publish statu 0
     0> <t:    1382356>, main.c,  201, Config client event
     0> <t:    1382361>, node_setup.c,  499, Set: on/off server pub addr: 0x0100
     0> <t:    1382366>, access_reliable.c,  413, access_model_publish statu 4
     0> <t:    1397084>, main.c,  201, Config client event
     0> <t:    1397089>, node_setup.c,  510, Adding subscription
     0> <t:    1397102>, access_reliable.c,  413, access_model_publish statu 0
     0> <t:    1398643>, main.c,  201, Config client event
     0> <t:    1398647>, main.c,  729, Configuration of device 0 successful
     0> <t:    1398652>, main.c,  742, Finish Init the Simple Onff 0 model handle 4
     0> <t:    1398658>, provisioner_helper.c,  331, Scanning For Unprovisioned Devices
     0> <t:    1398716>, main.c,  597, Flash write complete
     0> <t:    1398720>, main.c,  608, Flash write complete exit
     0> <t:    1584330>, main.c,  332, Button 0 pressed
     0> <t:    1584334>, access.c,  351,  I am here 
     0> <t:    1584338>, access.c,  352,  App key Handle 0xFFFF
     0> <t:    1584342>, access.c,  353,  publish_address_handle key Handle 0xFFFF
     0> <t:    1584346>, access.c,  354,  Is valid opcode 1??
     0> <t:    1584350>, access.c,  374, packet tx return here. . at the handle 4
     0> <t:    1584355>, access_reliable.c,  413, access_model_publish statu 7
     0> <t:    1584359>, access_reliable.c,  442, access_model_reliable_publish failed 7
     0> <t:    1680696>, main.c,  332, Button 0 pressed
     0> <t:    1680700>, access.c,  351,  I am here 
     0> <t:    1680704>, access.c,  352,  App key Handle 0xFFFF
     0> <t:    1680708>, access.c,  353,  publish_address_handle key Handle 0xFFFF
     0> <t:    1680712>, access.c,  354,  Is valid opcode 1??
     0> <t:    1680716>, access.c,  374, packet tx return here. . at the handle 4
     0> <t:    1680721>, access_reliable.c,  413, access_model_publish statu 7
     0> <t:    1680727>, access_reliable.c,  442, access_model_reliable_publish failed 7
     0> <t:    1707525>, main.c,  332, Button 0 pressed
     0> <t:    1707529>, access.c,  351,  I am here 
     0> <t:    1707532>, access.c,  352,  App key Handle 0xFFFF
     0> <t:    1707536>, access.c,  353,  publish_address_handle key Handle 0xFFFF
     0> <t:    1707540>, access.c,  354,  Is valid opcode 1??
     0> <t:    1707544>, access.c,  374, packet tx return here. . at the handle 4
     0> <t:    1707549>, access_reliable.c,  413, access_model_publish statu 7
     0> <t:    1707553>, access_reliable.c,  442, access_model_reliable_publish failed 7
     0> <t:    1710307>, main.c,  801, Node 0x0100 alive with 0 active fault(s), RSSI: -67

    Can you teach me your setting on the mp_config_step in the setup_select_steps? I think i am not correctly config all the necessary appkey??

Children
No Data
Related