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

Simple ON Off Client, public address on Mesh 2.0

Hi all,

I am merging my code from Mesh 1.0 to 2.0.

I am trying to put both Provisioner and Simple On/Off Client into one board,

and then the other board is simple on/off server (as if the example in Mesh 1.0)

From Log, i believe i already config the node properly.

 0> <t:         24>, main.c,  932, ----- BLE Mesh Light Switch Mesh Demo -----
 0> <t:        508>, main.c,  861, Initializing and adding models
 0> <t:        513>, main.c,  880, Initializing and adding models finish
 0> <t:        525>, main.c,  911, Setup defaults: Adding keys, addresses, and bindings 
 0> <t:        688>, provisioner_helper.c,  378, netkey_handle: 0
 0> <t:       6018>, main.c, 1426, Device UUID : 0059ABCDEFABCDEFACCDEFABCDEFABCD
 0> <t:       6022>, main.c,  481, Waiting for Server node to be provisioned ...
 0> <t:    3679259>, provisioner_helper.c,  303, Static authentication data provided
 0> <t:    3822143>, provisioner_helper.c,  212, Provisioning completed received
 0> <t:    3822148>, provisioner_helper.c,  217, Adding device address, and device keys
 0> <t:    3822153>, provisioner_helper.c,  227, Going to address [0x0100]key_handle [0], dev_key[536886660]
 0> <t:    3822161>, access.c, 1101, #### public address handle 0, set to access_model_pool index 2
 0> <t:    3822166>, config_client.c,  438, >>>>>>>>>>>>>>>>>>>>>>>:0x02 Addr:0x00
 0> <t:    3822172>, provisioner_helper.c,  263, <t:    3826354>, provisioner_helper.c,  175, Local provisioning link closed: prov_state: 2  remaining retries: 2
 0> <t:    3826361>, main.c,  773, Provisioning successful
 0> <t:    3826365>, provisioner_helper.c,  201, Provisioning complete. Node addr: 0x0100 elements: 1
 0> <t:    3826371>, node_setup.c,  699, Configuring Node: 0x0100
 0> <t:    3826376>, config_client.c,  438, >>>>>>>>>>>>>>>>>>>>>>>:0x02 Addr:0x00
 0> <t:    3826381>, node_setup.c,  329, Setup select Step for addr 0x0100
 0> Getting composition data
 0> <t:    3826461>, main.c,  597, Flash write complete
 0> <t:    3826465>, main.c,  608, Flash write complete exit
 0> <t:    3901637>, main.c,  201, Config client event
 0> <t:    3901641>, node_setup.c,  393, Adding appkey
 0> <t:    3901662>, access_reliable.c,  413, access_model_publish statu 0
 0> <t:    3904830>, main.c,  201, Config client event
 0> <t:    3904834>, node_setup.c,  404, App key bind: Health server
 0> <t:    3904846>, access_reliable.c,  413, access_model_publish statu 0
 0> <t:    3905526>, main.c,  201, Config client event
 0> <t:    3905530>, node_setup.c,  419, App key bind: Simple On/Off server
 0> <t:    3905544>, access_reliable.c,  413, access_model_publish statu 0
 0> <t:    3906261>, main.c,  201, Config client event
 0> <t:    3906265>, node_setup.c,  472, Setting publication address for the health server to 0x0001
 0> <t:    3906285>, access_reliable.c,  413, access_model_publish statu 0
 0> <t:    3909966>, main.c,  201, Config client event
 0> <t:    3909970>, node_setup.c,  510, Adding subscription
 0> <t:    3909984>, access_reliable.c,  413, access_model_publish statu 0
 0> <t:    3919637>, main.c,  201, Config client event
 0> <t:    3919641>, main.c,  729, Configuration of device 0 successful
 0> <t:    3919646>, main.c,  742, Finish Init the Simple Onff 0 model handle 4
 0> <t:    3919652>, provisioner_helper.c,  331, Scanning For Unprovisioned Devices
 0> <t:    3919710>, main.c,  597, Flash write complete
 0> <t:    3919714>, main.c,  608, Flash write complete exit
 0> <t:    4235846>, main.c,  801, Node 0x0100 alive with 0 active fault(s), RSSI: -53
 0> <t:    4448517>, main.c,  332, Button 0 pressed
 0> <t:    4448521>, access.c,  351,  I am here 
 0> <t:    4448525>, access.c,  352,  App key Handle 0xFFFF
 0> <t:    4448529>, access.c,  353,  publish_address_handle key Handle 0xFFFF
 0> <t:    4448534>, access.c,  354,  Is valid opcode 1??
 0> <t:    4448538>, access.c,  374, packet tx return here. . at the handle 4
 0> <t:    4448545>, access_reliable.c,  413, access_model_publish statu 7
 0> <t:    4448549>, access_reliable.c,  442, access_model_reliable_publish failed 7
 0> <t:    4891751>, main.c,  801, Node 0x0100 alive with 0 active fault(s), RSSI: -67
 0> <t:    5219310>, main.c,  801, Node 0x0100 alive with 0 active fault(s), RSSI: -53

But When I send out the command thru simple_on_off_client_set(&m_clients[button_number], !hal_led_pin_get(BSP_LED_0 + button_number));

It say NRF_ERROR_INVALID_PARAM: -->
            /* Publication not enabled for this client. One (or more) of the following is wrong:
             * - An application key is missing, or there is no application key bound to the model
             * - The client does not have its publication state set
             *
             * It is the provisioner that adds an application key, binds it to the model and sets
             * the model's publication state.
             */
            __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Publication not configured for client %u\n", button_number);

How should I configure the Publication?

Regards,

Ajay

Parents
  • Yes, i have read the migration guide in the In Infocenter?

    I think my bluetooth mesh stack and the provision process is done correctly (I can read from my Board #2, it said it is correctly provisioned.)

    The problem is, seems i did not make the configuration of the node properly. That's why i am asking a if there is reference config_steps.

    As, now i am doing the same in Mesh v1.0, the Board #1 will be the provisioner , also the on/off client. And Board #2 is the on/off server.

    Now, sees it said it did not have the publication state set for the board #1

  • Hi ajay,

    It seems from your logging information that you have done the provisioning & configuration steps correctly. It also seems that the appkey was bound correctly to the light switch server example. Was the appkey bound to the client though? Have you done the provisioning & configuration of the client?

    We have some provisioning & configuration documenatation available on our Infocenter. 

    Also, I would recommend running the regular stock light switch example from one of the newest mesh sdks (>= v2.0.1). Then, you can run the provisioner, client & server examples in debug mode & get debugging RTT logging information directly via Segger Embedded Studio. You can then copy & paste this logging information in a text document & use that as a reference solution to compare with your own logging information.

     

Reply
  • Hi ajay,

    It seems from your logging information that you have done the provisioning & configuration steps correctly. It also seems that the appkey was bound correctly to the light switch server example. Was the appkey bound to the client though? Have you done the provisioning & configuration of the client?

    We have some provisioning & configuration documenatation available on our Infocenter. 

    Also, I would recommend running the regular stock light switch example from one of the newest mesh sdks (>= v2.0.1). Then, you can run the provisioner, client & server examples in debug mode & get debugging RTT logging information directly via Segger Embedded Studio. You can then copy & paste this logging information in a text document & use that as a reference solution to compare with your own logging information.

     

Children
No Data
Related