About forwarding information through the router

  • Hello, experts.

  •        Now I have four nrf52833dk_nrf52833 development boards, among which Nos. 1, 2 and 3 burn openthread client program, and the fourth one burns openthread server program. Through serial port, Nos. 1, 2 and 3 are obtained as routers. The fourth is leader, as shown in the figure below.The actual spatial location is also shown in the figure below
  • So what I want to do is press the button on router1 and the information sent by router2 can be forwarded by Router2 and then forwarded by router3 and last to the leader, In fact, the information sent by pressing 2 on router1 is directly sent to the leader without being forwarded by router2 and router3

           What should I do to achieve this effect? Doesn't my router have the function of data forwarding? How can I realize router forwarding?

         

  •                                                                                                                                                                                 Looking forward to your reply. Thank you very much!

  • I opened four PuttYs for listening and status query, and found that the router did not forward messages And what does the yellow print failure mean?

  • Hi,

    Doesn't my router have the function of data forwarding?

    The routers have routing and message-forwarding capabilities.
    In Thread, the routers will determine the best next hop for a message based on neighbor link quality and path cost. Based on this, they will choose the cheapest and most optimal path to the destination. In your case, this means that router 1 found that the cheapest path to the leader is to send the message directly through the leader. This will often be the case if the devices are close by and without disturbances between them, as it is cheaper to send the message directly than through additional devices.

    Since you want to force the devices to route the message from 1 -> 2 -> 3 -> leader, you need to ensure that the devices are far apart. You must make it cheaper to route the message through the closest neighbor than directly to the destination, possibly putting the devices that should not communicate directly out of range of each other.

    caidehen said:
    And what does the yellow print failure mean?

    Failed to process Link Request: InvalidState
    As you see on the line above in the log, the device is currently a child.


    Link requests are sent to routers. Since the device is a child and not a router when it receives the link request, it is in an invalid state to process the link request.

    Failed to process UDP: Duplicated
    The device received a duplicate UDP message, so the duplicate will not be processed.

    I recommend reading up on device roles, see Node Roles and Types, and Router Selection.

    Best regards,
    Marte

  • Just like the yellow link in the picture below, how does the router transmit? 

    • How can I measure the router forwarding process?

  • 1、Dear Professor Marte Myrvold, can I understand that as long as I burn nrf52833dk into the client or server program, I don't need to consider the whole networking process and the role change will be automatically completed?

    2、As you said, if the four devices are far enough apart and placed in a straight line, then the router1 presses the button 2 to send data, which will be forwarded by router2 and then router3 and finally to the leader (server), right?

    3、In the process of retesting, I found that when I powered off the leader (be burned into the server program), the remaining three (burned into the client program) automatically decided to create a new leader ,he original router3 is elected leader  (I understood this principle after reading information). When I powered on the development board of the burned server program again, which changed the itself to a router. as shown in the following figure

    I wonder why I pressed the key on router1 at this point. 2 still broadcasts the message to the rightmost burning server development board (led4 lights on or off) but why not to the leader? Or am I not monitoring the data? how should I monitor the data transfer in between ?  who is the data ultimately going to?

  • Hi,

    caidehen said:
    can I understand that as long as I burn nrf52833dk into the client or server program, I don't need to consider the whole networking process and the role change will be automatically completed?

    That is correct. Router selection happens automatically. If there is a need for more routers, one of the router-eligible end devices (REEDs) will automatically be promoted from child to router.

    caidehen said:
    As you said, if the four devices are far enough apart and placed in a straight line, then the router1 presses the button 2 to send data, which will be forwarded by router2 and then router3 and finally to the leader (server), right?

    Yes, as long as the devices are router devices and the distances between the devices are large enough.

    caidehen said:
    I wonder why I pressed the key on router1 at this point. 2 still broadcasts the message to the rightmost burning server development board (led4 lights on or off) but why not to the leader?

    Are you asking why it did not route the message through the leader or why the final destination was the server? If router 2 sent the message directly to the server without routing it through the leader, it was because that was the optimal path. Regarding the latter, the server is the destination because of how the example works. The clients will send the message to a server. The leader role is irrelevant here.

    caidehen said:
    how should I monitor the data transfer in between ?

    You can look at the network traffic in a sniffer log. See nRF Sniffer for 802.15.4 for how to set up and use our 802.15.4 sniffer.

    caidehen said:
    who is the data ultimately going to?

    It is going to the server.

    Best regards,
    Marte

Related