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

How to configure a node for control model?

How to configure a node for control model. I have used light switch on/off template to implement a control mode but i i don't know how to make a control logic for client. Have to use only client at a time but if i run the code i'm getting error and it run both client and sever at same time. I have merge the client and server program for control model but i'm getting a error as NRF_INVALID_STATE which is in nrf_mesh_init function.Please help me and thanks in advance.

Parents
  • Which mesh sdk version are you currently using? Have you taken a look at the creating new models documentation? This documentation might also be helpful. What error are you currently receiving? As far as I know, we have not implemented a control model yet, but I have asked about this internally & will get back to you soon. 

  • Thanks for your reply. I'm using mesh sdk 2.1.1. For control model i used light switch control example by merge client and server main.c i'm getting error as NRF_INVALID_STATE. I have problem to initialize mesh stack & softdevice for both client and server same time. only for first time i can use mesh stack and softdevice if use the same for server i get this error.

    I have added the log which i get error:

    <t: 0>, mesh_softdevice_init.c, 117, Initializing SoftDevice...
    <t: 0>, mesh_softdevice_init.c, 75, Enabling BLE...
    <t: 16>, mesh_softdevice_init.c, 109, sd_ble_enable: app_ram_base should be adjusted to 0x20002DA0
    <t: 58413>, main.c, 303, Initializing and adding models
    <t: 63311>, main.c, 366, Device UUID : 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 63318>, main.c, 443, ----- BLE Mesh Light Switch Server Demo -----
    <t: 63325>, app_error_weak.c, 105, Mesh error 8 at 0x00000000 (:0)

  • If i wont modify main.c file then only client or server will execute at a time. I think have to merge both client and server main.c files also because the uuid is in main.c

  • You can download this github repo to take a look how we integrated the generic on off client & server models in one example. This works to provision the 52840 dev kit (should work with the 52832 too I believe) with the nrf mesh app. More info is given in the two pdfs below:

    Mesh Hands-on Android_october2018.pdf

    Mesh Hands-on iOS_October2018.pdf

  • sure i will go through with those pdf. Can i know if we use control model first it act as client model for all servers after that should i need to erase(firmware)  the same board of control model to act as server for a client.

  • This example acts only one model at a time (acting as server model). I cant access both client and server in one example.

Reply Children