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

combine light switch and remore mesh don't control light

Hi all,

After I combile light switch example and remote example for my client and server board . Function Remote run fine . But when I push button for send unicast message . 2 board seem dont receiver correct .I define light switch and remote is different elements . I use Mesh SDK v2.0.1 . Show my picture : 

  

Please show me my mistake. Thank very much

Parents
  • Hi Giang, 

     

    Remote you mean remote provisioning client or server ? 

    I assume it's server. 

    If you have a look into the code (button_event_handler() ) you can find that  "Ignored. Node is not configured.\n" thrown when the light switch client is not configured. 

    You need to configure the client locally, in this case setting the publication address. It's similar to this case. Have a look at Mesh SDK v1.x to see how it works. 

  • Hi ,

    After I using light switch client provisioning for light switch server . I only need use access_model_publish_address_set for Set publish address for the client to the corresponding server . We can send data to each other . It correct ?

  • 1. As I mentioned, if you add the light switch client to the provisioner, you need to configure the model, add applicationkey, publication address. 

    2. If you add the remote provisioner client into the light switch client, you still need to configure your light switch client. 

     

    What do you mean exactly by "gateway"  ?  In BLE Mesh there isn't a well defined name for gateway. 

    In SDK v1.x we combine the provisioner and the light switch into one device, but different elements. The provisioning and configuration of the clients on the device is done manually and locally. It's not standard to do so. The client doesn't have to be on the same device as the provisioner. And in most case it won't. 

    Why exactly do you want to combine the light switch to the light blub ? 

     

    Can you use an extra device to work as provisioner and can do remote provisioning. But be aware even you do so, you still need to do configuration from the provisioner. 

     

    Of course, there is nothing wrong to combine the provisioner to the light switch client, for example you can sell a package of 1 or multiple light blub and one light switch. And the light switch should be able to do provisioning and setup the network. If you want to do that, you follow what we do in SDK v1.x 

  • Thank for reply,

    After I add light switch client to provisioner , I add some code for set public address for provisioner with Nodes . Provisioner can send data for Node success , But I'm still very vague about configuration part. Why not have a tutorial for this issue ? Can you give a small tutorial on this issue on here . Steps about provisioner add public address with others node. Thank very much !!!

  • Hi Giang, 

     

    I agree that we lack good tutorial and documentation about Mesh especially provisioning part. I have a plan to make one. For now please try the python interactive API. By going through the tutorial you will have good understanding about provision and configuration. 

  • Hi , I have question, in the description above , when I send data from provisioner to Node , it ok . But provisioner not receiver data from Node . I guess is due : I don't config for provisioner subscribe to Node for receiver changes from it . So I find out function : 

    config_client_model_subscription_add(uint16_t element_address, nrf_mesh_address_t address, access_model_id_t model_id)
    But I dont understand parameter of function . Please explain for me , how config for provisioner subscribe to model of Node . Thank for help

  • Hi Giang, 

     

    Sorry for late response. I was on vacation last week. 

    config_client_model_subscription_add() is to be used when you do configuration from the provisioner to the provisionee.

    Basically the process is like this: provisioner do provision, assign address, device key, network key to the provisionee. 

    After that, if the provisioner has the configuration client and the provisionee has the configuration server, the configuration process happens. In this process, the config client assign the application keys to the provisionee, assign the subscription address, publication address to the provisionee via the config server. 

    Please follow the interactive python tutorial.

    The function you mentioned is used for the config client to assign subscription address to provisionee. 

    This is not needed when you have the light switch client on the provisioner. If it's on the provisioner, you need to do it locally. Have a look here.

     

     

Reply
  • Hi Giang, 

     

    Sorry for late response. I was on vacation last week. 

    config_client_model_subscription_add() is to be used when you do configuration from the provisioner to the provisionee.

    Basically the process is like this: provisioner do provision, assign address, device key, network key to the provisionee. 

    After that, if the provisioner has the configuration client and the provisionee has the configuration server, the configuration process happens. In this process, the config client assign the application keys to the provisionee, assign the subscription address, publication address to the provisionee via the config server. 

    Please follow the interactive python tutorial.

    The function you mentioned is used for the config client to assign subscription address to provisionee. 

    This is not needed when you have the light switch client on the provisioner. If it's on the provisioner, you need to do it locally. Have a look here.

     

     

Children
  • Thank for reply, 

    I resume that : In server Node , provisioner will config for server node . Server node subscribe to 1 group (0xC002) . In provisoner , I add 1 client and Set publish address for it is 0xC002 . So , I can use simple_on_off_client_set_unreliable for send data from client on provisoner to server node . But on receiver side of provisoner , I dont know how to set up it , So I execute step 2.

    2. I add client 2 on provisioner , and set public address of it is 0x0101. In server node , I set public address is 0x0101 . I think this way they can send data to each other . Is this right ? But I  have not done it yet . I do not understand what is wrong ?

  • There is nothing call "public address" in mesh, it's publication address I assume you talk about ? (or publish address) Or it's the unicast address ? 

    You should use subscription address on your client on your provisioner. 

    A node can receive data either by their unicast address or the subscription addresses it subscribed to.  

    In our example we made up two group address GROUP_ADDRESS_EVEN and GROUP_ADDRESS_ODD that we assign them as subscription address for the light switch servers and as publication address for the light switch client 3 and 4 (button 3 and 4).

    Please read more about Bluetooth Mesh concept here.

     

     

  • Hi ,

    I have 1 provisioner and 1 server .

    Provisioner has 2 client , 1 client for group address, 1 client to match to server .

    I can send from provisioner to server by 2 way ok (simple_on_off_client_set and simple_on_off_client_set_unreliable) . But I still dont receiver data from server . I follow example light switch client at SDK 1.x . Can you show me the code at this example  for the function receiver data from server of client . Thank !!!

  • In the example, the client receive data from the server by the status message reply to the set command of the client (handle_status_cb() with SIMPLE_ON_OFF_OPCODE_STATUS ) , it can also send its status when the client send a simple_on_off_client_get() to get the status. 

    By design, the command set/get should go from the client to the server, the server reply with its status. 

    If you want to send data from the server node to the client node, you can implement a client on the server node and a server on the client node as well. 

  • Hi, 

    In Provisioner has 2 client , client 1 for group address, client 2 to match to server.

    - Provisioner config for serrver : 

    LOG: Set: on/off server pub addr: 0x00FC

    - In side client 2 , I add code : 

        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Adding subscription to client\n");
        uint16_t element_address = PROVISIONER_ADDRESS + 2;
        nrf_mesh_address_t address = {NRF_MESH_ADDRESS_TYPE_INVALID, 0, NULL};
        address.type = NRF_MESH_ADDRESS_TYPE_UNICAST;
        address.value = 0x00FC;
        access_model_id_t model_id;
        model_id.company_id = ACCESS_COMPANY_ID_NORDIC;
        model_id.model_id = SIMPLE_ON_OFF_CLIENT_MODEL_ID;
        config_client_model_subscription_add(element_address, address, model_id);

    Why client of provisioner still dont receiver messager from server Node ?

    I still misunderstand where? 

    Thank

Related