LowPowerLab Forum

Hardware support => Moteino => Topic started by: hemalchelvi on December 11, 2013, 07:35:13 AM

Title: Gateway to Gateway(or NW to NW) communications
Post by: hemalchelvi on December 11, 2013, 07:35:13 AM
Hello,
I've created two moteino clones
(http://black-electronics.com/blog/wp-content/uploads/2013/12/Bay2kUgCYAAu6En.jpg)
The gateway and node sketches worked out of the box, I looked around the library a bit, but I couldn't find any function that lets two gateways talk,
Say 10 nodes on network 1(GW 1) and 10 node on network 2(GW 2) and another network 3 with GW 3 and some nodes, And all the gateways are in each others range.
A picture worth a thousand words.
(http://black-electronics.com/blog/wp-content/uploads/2013/12/IMG-20131211-00496-e1386764634262.jpg)
and I want to send some data from node 7 on network 1 to gateway  on network 3 at a rate of say 1packet per half a minute.
Now this can be done by changing the REG_SYNCVALUE2 to new network ID and when the data is sent change back to original network ID.
Right now I have only one pair, on gateway I wrote a small code that changes the reg value to new id and after 5s back to old, it is working I get no packets when on different network
Question Is there any better way to do this?
With two or three gateways its not a problem,is there some possibility to implement some routing algorithms?
Thanks!
Title: Re: Gateway to Gateway(or NW to NW) communications
Post by: Felix on December 11, 2013, 08:29:07 AM
Unless you change the frequency, they will still all have to talk 1 at 1 time, otherwise there is collisions. The library compensates for that by first listening then talking when the channel is free.
Yes you can do simpler - just keep everything on 1 network, then all could report directly to 3. If you still want the chaining or tree-mesh forwarding you are illustrating, then I'd still keep them all on the same network, and just forward messages without messing with the registers or changing the network ID. Because it's pointless. You are merely changing the signature of the packet header, and consequently it filters out in nodes that have a different signature (different network ID). But the same thing happens when you have a different target node ID, that ID only listens for a signature that matches its network ID AND its node ID (unless in promiscuous mode). So it's not worth the trouble. Just keep unique IDs and same network ID.
Title: Re: Gateway to Gateway(or NW to NW) communications
Post by: hemalchelvi on December 12, 2013, 12:30:56 AM
Ya, makes sense, so I'll keep just one gateway and one nw and configure the node that need chaining to forward the data
thank you.