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!

  • 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                                                      

  • Dear experts  

         you  said "Yes, as long as the devices are router devices and the distances between the devices are large enough." This means that key information can be forwarded by the intermediate router.  Isn't the process of forwarding keystroke information just the process of receiving and sending?   

         you also  said"  If there are no server devices, then there are no devices to receive the command. 

    I'm a little confused about this point. Why does the router in the middle not forward  when there is no server?    Why can the router in the middle forward when there has a server  ?

         My understanding is that whether there is no server, the router(client) will receive and forward the keystroke information, but the router(client) has no corresponding action to execute , right?

         

        

  • Hi,

    I need to clear up some things about Thread. Thread in itself is a transport layer that implements IPv6. Technically, you do not send messages directly over Thread; you need to use an application to communicate. The most basic applications are Ping, UDP, and TCP. The picture shows the OpenThread architecture:

    This runs on top of the IEEE 802.15.4 physical layer (PHY). A border router provides connectivity from IEEE 802.15.4 networks to networks on other physical layers (for example, Wi-Fi). 

    CoAP, which is used in these samples, is a web transfer protocol that runs over UDP.
    What you need to do to send messages to other devices that are not on the Thread network is to send messages over, for example, UDP. For example, you can look at Socket Echo Client and Socket Echo Server. These can be built with Thread support by setting overlay-ot.conf as overlay configuration.

    We have two webinars about Thread that I strongly recommend watching:
    https://webinars.nordicsemi.com/introduction-to-thread-networking-4
    https://webinars.nordicsemi.com/developing-thread-products-with-nrf-1

    caidehen said:
    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

    This needs to be implemented in the application. Look at the Socket Echo samples I link to above. 

    caidehen said:
    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?

    No. The server will not forward the command to a non-Thread network since the command is not meant to be sent to another device that is not on the Thread network. The server is the destination of the command. 

    caidehen said:
    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?

    You can send messages to Raspberry Pi if you run a server on the Pi that can receive the messages.

    caidehen said:
    This means that key information can be forwarded by the intermediate router.  Isn't the process of forwarding keystroke information just the process of receiving and sending?   

    Yes. The router receives the message. If the message's destination is this router, then it will handle the message. If it is not the destination, then it will forward the message.

    caidehen said:
    I'm a little confused about this point. Why does the router in the middle not forward  when there is no server?    Why can the router in the middle forward when there has a server  ?

    My answer was in response to this:

    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?

    This has nothing to do with whether the middle router will forward. All the clients will receive the message, see that they are not the message's destination, then forward the message and not handle it further. This is true for both the routers and the leader. The leader will not handle this message any differently than the routers, as it is not the message's destination.

    caidehen said:
    My understanding is that whether there is no server, the router(client) will receive and forward the keystroke information, but the router(client) has no corresponding action to execute , right?

    Correct.

    Best regards,

    Marte

Related