thesisPi20
Posts: 11
Joined: Mon Apr 27, 2020 4:10 pm

Socket communication among multiple Raspberry Pis

Fri May 22, 2020 6:15 pm

Hi all,

As the title says, I need to create a system with multiple Raspberry Pis that the Pis can send simple socket messages among them. Do you have any suggestion how I can start this? Here are what I thought I can do:
1) Setup a mesh network and then start socket messaging.
2) Use TCP connection to start socket messaging without setting up a mesh network. I found sources mostly between PC and the Pi. No luck Pi-Pi so far.

Do you guys have any suggestions where I can start? I will appreciate any hint and help!

User avatar
B.Goode
Posts: 10191
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Socket communication among multiple Raspberry Pis

Fri May 22, 2020 6:32 pm

thesisPi20 wrote:
Fri May 22, 2020 6:15 pm
Hi all,

As the title says, I need to create a system with multiple Raspberry Pis that the Pis can send simple socket messages among them. Do you have any suggestion how I can start this? Here are what I thought I can do:
1) Setup a mesh network and then start socket messaging.
2) Use TCP connection to start socket messaging without setting up a mesh network. I found sources mostly between PC and the Pi. No luck Pi-Pi so far.

Do you guys have any suggestions where I can start? I will appreciate any hint and help!



Do you have to implement this with your own low-level socket code?

If you can re-use the efforts of others, MQTT seems like a good fit for your requirement.

jahboater
Posts: 5680
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Socket communication among multiple Raspberry Pis

Fri May 22, 2020 7:13 pm

thesisPi20 wrote:
Fri May 22, 2020 6:15 pm
2) Use TCP connection to start socket messaging without setting up a mesh network. I found sources mostly between PC and the Pi. No luck Pi-Pi so far.
Pi-Pi should be the same. The Pi wont know the difference been another Pi and a PC.

The basic documentation for Linux sockets is actually pre-installed with Raspbian.
Just type "man socket" to start ...
Pi4 8GB running PIOS64

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

Re: Socket communication among multiple Raspberry Pis

Fri May 22, 2020 9:30 pm

thesisPi20 wrote:
Fri May 22, 2020 6:15 pm
Hi all,

As the title says, I need to create a system with multiple Raspberry Pis that the Pis can send simple socket messages among them. Do you have any suggestion how I can start this?
Are you talking messages as in data acq/dist or text messages for humans?

Return to “Beginners”