Where is the bear handler started?

Hi support team,

Now i am trying to understand the LPN machenism based on the LPN example.  I cannot make sure where the bear handler is started. 

There is a function bearer_handler_start() which is called in nrf_mesh_enable(), but it can be called only m_mesh_state is MESH_STATE_DISABLED or MESH_STATE_DISABLING. I cannot find the clue where m_mesh_state is set to one of the two macroes before the function nrf_mesh_enable() is called after the device reset. Could you give some tips for this? 

Thanks in advance!

Parents
  • Hi,

    For new projects, we highly recommend nRF Connect SDK, not the older nRF5 SDK which is now in maintenance mode. See our nRF Connect SDK and nRF5 SDK statement.

    Regarding the deep inner workings of the nRF5 SDK for Mesh stack, LPN is best understood at a higher level. For nRF5 SDK for Mesh, I recommend the Low Power node feature documentation. It also teaches the general idea behind LPN and friendship, which means it is of value also if you are going to use nRF Connect SDK.

    Regards,
    Terje

  • Hi tesc,

    We have two projects based on the nRF5 SDK for Mesh stack. Now we temporaly want to use the nRF5 SDK for Mesh stack for this project. I have read the document  you mentioned, but when I tried to understand the source code about the lpn feature, I faced the questions. 

    Actually we are trying to make a battery based switch i the mesh network (just work as a transmitter, not receive any message), so I try to understand the lpn example to get how the node can work under the low power situation.   In the real scene, it is quite possible that all friend nodes can be out of the mesh network (turn off) for over poll timeout, so the lpn node will go to high power option without the friendship. 

    How to implement this kind of switch which work under low power situation and can also send out the mesh packets to other nodes of the mesh network?  

    Is there some clue for those questions above?

    I have been stucked in here for a few days, could you give some tips or clue?  Thanks in advance!

Reply
  • Hi tesc,

    We have two projects based on the nRF5 SDK for Mesh stack. Now we temporaly want to use the nRF5 SDK for Mesh stack for this project. I have read the document  you mentioned, but when I tried to understand the source code about the lpn feature, I faced the questions. 

    Actually we are trying to make a battery based switch i the mesh network (just work as a transmitter, not receive any message), so I try to understand the lpn example to get how the node can work under the low power situation.   In the real scene, it is quite possible that all friend nodes can be out of the mesh network (turn off) for over poll timeout, so the lpn node will go to high power option without the friendship. 

    How to implement this kind of switch which work under low power situation and can also send out the mesh packets to other nodes of the mesh network?  

    Is there some clue for those questions above?

    I have been stucked in here for a few days, could you give some tips or clue?  Thanks in advance!

Children
Related