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

BLE Mesh Project with BLE_NUS

Hello,

I'm using the sample project from this post.

Following the steps and using nRF52DK, one for server and one for client. I've modified the server count from 3 to 1 in client project .

#define SERVER_COUNT (<<1>>)

The provisioning is success, the server side will get the response and show

RX: [aop: 0x00C3]

on the J-Link RTT Viewer when I press button 3,but there is no response in server side when I press button0.

I don't have any idea how to solve this problem, could you give me some hints? Thanks.

P.S. The following image is the log of client side. image description

[Updated on 2017/10/18]

Based on Hung Bui's comment, I tried to get the unicast address by dsm_local_unicast_addresses_get() function. I get the same unicast address "1" when I press button 0 or 3.

image description

Still can NOT solve the problem...

Parents
  • Hi Sara,

    It's not really what I want you to do. I want you to get the unicast address of the server, not the client. You need to understand how the example works. There are 3 servers (or one in your case), and there are 3 clients on the provisioner (the client project). Each client control one server.

    The publication address of the client should match with the unicast address of the server.

    To get the publication address of the client you need to call smth like this:

     for (uint32_t i = 0; i <= CLIENT_COUNT; i++)
     {
              dsm_handle_t address_handle = DSM_HANDLE_INVALID;
              nrf_mesh_address_t publish_address;
              ERROR_CHECK(access_model_publish_address_get(m_clients[i].model_handle, &address_handle));
              ERROR_CHECK(dsm_address_get(address_handle,&publish_address));
              __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Client %d's publish address: 0x%x\n",i,publish_address.value);
     }
    
Reply
  • Hi Sara,

    It's not really what I want you to do. I want you to get the unicast address of the server, not the client. You need to understand how the example works. There are 3 servers (or one in your case), and there are 3 clients on the provisioner (the client project). Each client control one server.

    The publication address of the client should match with the unicast address of the server.

    To get the publication address of the client you need to call smth like this:

     for (uint32_t i = 0; i <= CLIENT_COUNT; i++)
     {
              dsm_handle_t address_handle = DSM_HANDLE_INVALID;
              nrf_mesh_address_t publish_address;
              ERROR_CHECK(access_model_publish_address_get(m_clients[i].model_handle, &address_handle));
              ERROR_CHECK(dsm_address_get(address_handle,&publish_address));
              __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Client %d's publish address: 0x%x\n",i,publish_address.value);
     }
    
Children
No Data
Related