afc25
Posts: 1
Joined: Fri Apr 28, 2017 2:40 pm

Possible to relay info from one Raspberry Pi to another?

Fri Apr 28, 2017 2:59 pm

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!
Attachments
Screen Shot 2017-04-28 at 10.57.21 AM.png
Visualization of what it would look like
Screen Shot 2017-04-28 at 10.57.21 AM.png (16.4 KiB) Viewed 857 times

JMK8
Posts: 42
Joined: Tue Apr 28, 2015 10:00 am

Re: Possible to relay info from one Raspberry Pi to another?

Fri Apr 28, 2017 6:48 pm

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.

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Possible to relay info from one Raspberry Pi to another?

Fri Apr 28, 2017 7:08 pm

Look into "mesh networking".

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

knute
Posts: 550
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas
Contact: Website

Re: Possible to relay info from one Raspberry Pi to another?

Fri Apr 28, 2017 7:49 pm

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.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Possible to relay info from one Raspberry Pi to another?

Fri Apr 28, 2017 10:26 pm

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.
There are 10 types of people: those who understand binary and those who don't.

Return to “Beginners”