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.

  • Aryan, I tried what you suggested above and it isn't working. In fact, the ts_sd_event_handler() function isn't even being called. Nor is the rbc_mesh_sd_irq_handler() function. I'm using the template example on a PCA10031 dongle. And, I have confirmed that the mesh is working because it is periodically sending (and receiving) updates between the dongle and another board running the mesh. Can you please confirm that your suggestion is correct? thanks

Reply
  • Aryan, I tried what you suggested above and it isn't working. In fact, the ts_sd_event_handler() function isn't even being called. Nor is the rbc_mesh_sd_irq_handler() function. I'm using the template example on a PCA10031 dongle. And, I have confirmed that the mesh is working because it is periodically sending (and receiving) updates between the dongle and another board running the mesh. Can you please confirm that your suggestion is correct? thanks

Children
No Data
Related