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

Issue after provisioning Light Switch example using Androip App (Mesh SDK 2.0.1)

Hi,

I'm facing an issue after provisioning the Client and Servers from Light Switch example of Mesh SDK 2.0.1, using the Android App.

Provisioning is successful, however, when I try to send an on/off command from the Client board, I get the following message in the Debug Terminal: Ignored. Node is not configured.

I changed the code in client_publication_configured() to only check for the button that has been pressed, instead of checking all the buttons, as suggested here.

static bool client_publication_configured(int button_number)
{
    dsm_handle_t pub_addr_handle;

        if (access_model_publish_address_get(m_clients[button_number].model_handle, &pub_addr_handle) == NRF_SUCCESS)
        {
            if (pub_addr_handle == DSM_HANDLE_INVALID)
            {
                return false;
            }
        }
        else
        {
            return false;
        }

    return true;
}

And also the button_event_handler(), accordingly:

static void button_event_handler(uint32_t button_number)
{
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Button %u pressed\n", button_number);

    if (client_publication_configured(button_number))
    
    (...)

But it didn't solve.

The problem is that the pub_addr_handle always get the value of 0xffff, meaning DSM_HANDLE_INVALID, and thus the client_publication_configured() always return false.

This is the watch for m_clients array (if it's of any help):

I'm using the light switch example from Mesh SDK 2.0.1 (Softdevice s132_6_0_0) on the nRF52 DK (PCA10040 1.2.1).

BR,
Paulo Zacarias

Parents
  • Hi Paulo, 

     

    When you do provisioning and configuration using the phone, did you configure the publication address of the client ? You need to set this to either the server's unicast address or the server's subscription address (a group address). You can have a look at this demo

    I would suggest you to try with our latest SDK v2.1.1 , we removed the client_publication_configured() function in this version. 

     

  • Hi,

    Sorry, I was being a bit dummy. After watching again the demo video you provided I realized that we need to assign a publication address for the client.

    At first, I just assumed that it would be as the provisioner on the light_switch example, i.e., it would assign the publish address of the first provisioned server and so on.

    Anyway, I switched also to SDK v2.1.1.

    Thank you for your support!

    BR,
    Paulo Zacarias

Reply
  • Hi,

    Sorry, I was being a bit dummy. After watching again the demo video you provided I realized that we need to assign a publication address for the client.

    At first, I just assumed that it would be as the provisioner on the light_switch example, i.e., it would assign the publish address of the first provisioned server and so on.

    Anyway, I switched also to SDK v2.1.1.

    Thank you for your support!

    BR,
    Paulo Zacarias

Children
No Data
Related