Page 1 of 1
Possible to relay info from one Raspberry Pi to another?
Posted: Fri Apr 28, 2017 2:59 pm
by afc25
Hello, I'm a beginner with Raspberry Pis. My question is, is it possible to relay information from one Raspberry Pi 3 to another using the wifi modules, almost as a repeater? I just want to know if this is doable is all, would I need to add a second wifi module to the Pi in order for this to be achievable? Also, is it possible to add information as it goes from one Pi to another? Attached is a picture of what it would look like if doable. Thank you in advance!
Re: Possible to relay info from one Raspberry Pi to another?
Posted: Fri Apr 28, 2017 6:48 pm
by JMK8
Not sure what you mean by "relay" but I send information from Pi to Pi over my home LAN using Linux sockets. It's fairly straight-forward and does the job.
JohnK.
Re: Possible to relay info from one Raspberry Pi to another?
Posted: Fri Apr 28, 2017 7:08 pm
by ghans
Look into "mesh networking".
ghans
Re: Possible to relay info from one Raspberry Pi to another?
Posted: Fri Apr 28, 2017 7:49 pm
by knute
Look at multicast sockets. You can put a message out on the network (wireless or ethernet) and any other device on the network can pick off that message. For example say you had one Pi that had a sensor that takes a periodic reading and you want all the other Pis on the network to have that reading. You select a multicast address, in the block of multicast addresses, and a port and transmit that information in a datagram packet. All of your other Pis join the group on that address and port and listen for datagram packets. When one is received they can process that information. You can actually have many senders and receivers operating at the same time. Programming this is really easy in Java, I don't know about Python or C.
Re: Possible to relay info from one Raspberry Pi to another?
Posted: Fri Apr 28, 2017 10:26 pm
by kusti8
I recently implemented mesh networking with many Pi3 and it worked very well. I used hsmm-pi to automate the install and customized it a bit for my needs. All the routing is automatically handled and it can grow and shrink dynamically. Worked very well for a project very similar to yours.