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

How to turn on/off mesh

I am using the RBC mesh in a networking product using the nRF51422. We would like to turn the mesh on and off at selected times, say once per hour for a minute or two. I know how to turn on (init) the mesh. But, what is the best way to turn it off such that the radio is at minimal power?

Thanks in advance --s

Parents
  • The turning on and off of mesh is not exposed. It should be, but we didn't really consider it at first. I think the easiest fix is to stop the timeslots. you would have to modify the way the radio events are handled to keep it from restarting the session, but it should be pretty straight forward.

    in ts_sd_event_handler instead of renewing the timeslot, renew it based on some condition something like this for example

            case NRF_EVT_RADIO_SESSION_IDLE:
                if(!switch_it_off)
                      timeslot_order_earliest(TIMESLOT_SLOT_LENGTH, true);
                else
                      err_code = sd_radio_session_close();
                      if (err_code != NRF_SUCCESS) {handle_error}
                break;
    

    so when the timeslot-start signal isn't triggered, there should be no unexpected hardware usage.

  • Thank you for the quick reply. I'll implement that solution. Does the sd_radio_session() call turn off the receiver as well? I am not completely familiar with the inner-workings of the mesh and timeslot handler, but is the receiver basically on all of the time and the timeslots are used to process not only transmissions but also reception of data from other nodes? Thanks

Reply Children
No Data
Related