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)

  • Have you tried adjusting the app_ram_base like it says: "app_ram_base should be adjusted to 0x20002DA0"? You can do this by right-clicking your project -> Edit Options, changing to Common Configuration, going to the Linker tab & double clicking on Section Placement Macros. There, you can change the RAM_START value to 0x20002DA0.

  • I have tried but still i'm getting the same error. Can I use mesh init function 2 times as for client and server?

    <t: 0>, main.c, 333, ----- BLE Mesh Light Switch Client Demo -----
    <t: 0>, mesh_softdevice_init.c, 117, Initializing SoftDevice...
    <t: 0>, mesh_softdevice_init.c, 75, Enabling BLE...
    <t: 60153>, main.c, 303, Initializing and adding models
    <t: 65038>, main.c, 366, Device UUID : 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 65046>, main.c, 443, ----- BLE Mesh Light Switch Server Demo -----
    <t: 65052>, app_error_weak.c, 105, Mesh error 8 at 0x00000000 (:0)

Reply
  • I have tried but still i'm getting the same error. Can I use mesh init function 2 times as for client and server?

    <t: 0>, main.c, 333, ----- BLE Mesh Light Switch Client Demo -----
    <t: 0>, mesh_softdevice_init.c, 117, Initializing SoftDevice...
    <t: 0>, mesh_softdevice_init.c, 75, Enabling BLE...
    <t: 60153>, main.c, 303, Initializing and adding models
    <t: 65038>, main.c, 366, Device UUID : 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 65046>, main.c, 443, ----- BLE Mesh Light Switch Server Demo -----
    <t: 65052>, app_error_weak.c, 105, Mesh error 8 at 0x00000000 (:0)

Children
No Data
Related