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!

Parents
  • 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

  • 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

  • Dear Professor Marte Myrvold

         

    • Thank you very much for your patient reply,but But there are still some problems

    • 1、nRF Sniffer for 802.15.4  It seems that this sniffer can only be applied to nrf52840dk. I only have nrf52833dk, so it seems impossible to achieve. i've followed this procedure before and it hasn't worked , is there any other sniffing method?
    • 2、If I burn all the above four devices as clients, they will still decide the leader and their respective router. Then when I press the button 2 of any development board, will all the information sent out at this time be summarized to the leader?
    • 3、If you add a boundary route to the network at this time (router1's key 2 is pressed to send the message)then the leader is going to send this key information to the network is that right?
  • Hi,

    caidehen said:
    1、nRF Sniffer for 802.15.4  It seems that this sniffer can only be applied to nrf52840dk. I only have nrf52833dk, so it seems impossible to achieve. i've followed this procedure before and it hasn't worked , is there any other sniffing method?

    Not using our sniffer, it only supports nRF52840 DK and dongle.

    caidehen said:
    2、If I burn all the above four devices as clients, they will still decide the leader and their respective router. Then when I press the button 2 of any development board, will all the information sent out at this time be summarized to the leader?

    No. Pressing button 2 on the client will send a light on/off command to server devices. If there are no server devices, then there are no devices to receive the command. The leader role does not have anything to do with this. A Thread leader is simply the router in the network responsible for managing the other routers (such as assigning router IDs).

    caidehen said:
    3、If you add a boundary route to the network at this time (router1's key 2 is pressed to send the message)then the leader is going to send this key information to the network is that right?

    The other routers can communicate with the border router, not just the leader. There is a picture showing an example of what a Thread network with a border router might look like in Node Roles and Types:

    The messages will be sent through the border router if you send information to a non-Thread network (such as Wi-Fi). However, that is not the case here. The client sends the light on/off command to Thread CoAP servers. As before, if there are no servers on the network, there are no devices to receive the command. The client will not suddenly send the light on/off command to a non-Thread network when no servers receive the command.

    Best regards,
    Marte

  • Dear experts

    It's a great honor to receive your patient answer. Thank you very much  

    Please allow me to ask another question. I'm going to have a rest

    1. If I want to generate a message in the router and forward it to the non-thread network through the intermediate router, how should I generate this message? It doesn't seem to be generated by pressing keys

    2、You mean that the message generated by pressing the key seems to be uploaded to the non-thread network through the server only after it is received by the server. What should I do on the server? Or don't do any operation. If necessary, which api should I add to upload the received key data to the non-thread network?

    3. Is it possible for me to upload data to non-thread network data monitoring through raspberry pie as long as I establish a border route?

                                                          Thank you again and wish you a pleasant work                                                      

Reply
  • Dear experts

    It's a great honor to receive your patient answer. Thank you very much  

    Please allow me to ask another question. I'm going to have a rest

    1. If I want to generate a message in the router and forward it to the non-thread network through the intermediate router, how should I generate this message? It doesn't seem to be generated by pressing keys

    2、You mean that the message generated by pressing the key seems to be uploaded to the non-thread network through the server only after it is received by the server. What should I do on the server? Or don't do any operation. If necessary, which api should I add to upload the received key data to the non-thread network?

    3. Is it possible for me to upload data to non-thread network data monitoring through raspberry pie as long as I establish a border route?

                                                          Thank you again and wish you a pleasant work                                                      

Children
No Data
Related