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 Reply Children
No Data
Related