Code for 'repeater' node

Started by Sergegsx, January 26, 2017, 02:17:30 AM

Sergegsx

Hello,
Has anyone developed the code in order to create a node which can act as a signal extender/repeater for other nodes which are outside of reach to the gateway?

I have one node wich has -95dB and works ok but looses signal from time to time. I would like to place a node in between the gateway and the long distance node so that the far away node will send the message to the "repeater node"
and this "repeater node" will get the message and resend it to the gateway.
Given that I do not need to send messages from the gateway to the node, the code should be simpler.

Another doubt, how to deal with the gateway receiving the correct NodeID. When the message is send from node R (repeater) with its own Node_ID and not the Node_ID from the node far away? Ideally, this repeater node should be able to receive messages from multiple nodes,
the process is the same, only the Node_ID should be adjusted in each case.

Thank you for any info.

syrinxtech

Sergegsx,

One option would be to look at the meshed option in the RadioHead library.

To answer your second question, assuming you're using some form of struct to contain the data that is being sent from the gateway to the long distance node, you could just put the node ID in the struct for the other side.  In other words, if you're sending a packet from the long distance node to the gateway, you would have to send the packet to the node ID of the repeater node, which would read the data and automatically forward it to the gateway. 

If the gateway truly never needs to send a packet to the long distance node (ACKS?), as you said the code is much simpler.  In this case, you wouldn't need to put the long distance node ID in the packet.  The repeater takes in wireless packets and as long as the sender isn't the gateway, it should forward all packets to the gateway.  If you ever decide to send ACKS or other traffic from the gateway to the long distance node, the could would get slightly more complex but not unmanageable.

Hope this helps.

syrinxtech

On second look, the "router" option for RadioHead might be even simpler in your environment.  You have to build a static "map" of your network so that every node knows how to reach every other node.  It is similar in concept to "static routing" from the old days of networking.

captcha

A while ago I wrote some experimental code to extend the range of a Moteino by re-transmitting received signals using an in-between node. It's probably not the best fit for what you want but it's lean and simple.