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

Get source address of publisher node in nrf mesh

I have used light_Switch example from nrf mesh sdk nrf5_SDK_for_Mesh_v4.2.0_src

I like to get the client source address in nrf_switch_server 

what should I need to modify to get client source address in below function

static void app_onoff_server_set_cb(const app_onoff_server_t * p_server, bool onoff){

........................

}

Thanks

Parents Reply
  • You would need to pass it from generic_onoff_state_set_cb(), either by calling your own callback to main.c inside that function, or pass it through the process of transition which can be a little bit more complex. Or you can store it in a variable and then pass the variable back to main when  onoff_current_value_update() is executed. 
    But I think calling a callback inside generic_onoff_state_set_cb() would be the the most straight forward.

Children
Related