Posts: 3
Joined: Thu Jun 02, 2016 8:12 pm

Connecting Pi's

Sat Oct 29, 2016 1:17 pm

Ok after several failed attempts and googling i have the following issue i could use some help on please...

I have a raspberry pi 3 connected to internet via the wireless I also have a raspberry pi2 (not on the wireless network) For a robot project i am working on i want to achieve the following. I want to link Pi3 to Pi2 with ethernet so i can run programs via ssh connection from the pi3. I have tried to set up static IP's etc on them both but i cannot seem to get a link, has anyone done this easily or will it involve setting up an ethernet network (although it won't be on a router). Some help please would be appreciated so i can get onto the fun part of programming my robot.

ultimately the pi3 is the brain to the project and will automate scripts on the pi2 (engine room) the pi2 is running a piconzero hat and motors the pi3 has a sense hat on it, i simply want to execute motor programs from the pi3 on the pi2. Any help would be greatly appreciated.

User avatar
Posts: 1264
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: Connecting Pi's

Sun Oct 30, 2016 8:40 am

I have a previous question. Why do you wish to link Pi3 and Pi2 with Ethernet?. If both RPis are connected to your LAN, they will be able to communicate with each other. So, why a specif link?.

Anyway, if you want to establish a spectific ethernet subnet, you will have to edit the file /etc/dhcpcd.conf on both RPis.

Code: Select all

sudo nano /etc/dhcpcd.conf
In the case of Pi2, append these lines to the file:

Code: Select all

interface eth0
static ip_address=
In the case of Pi3, append these lines:

Code: Select all

interface eth0
static ip_address=
Then reboot your systems.

The static IP addresses assigned to your devices will be (this subnet will work only for your two RPi devices):

Code: Select all


Posts: 271
Joined: Sun Feb 08, 2015 1:13 pm

Re: Connecting Pi's

Sat Nov 12, 2016 6:12 pm

Static ip's can be a pain in the.....
Another way to go might be to use avahi ....
from one pi to another, or from any system supporting bonjour/avahi to another (i.e. I use Ubuntu Linux)
ssh -l pi -Y d.local
where d is the name of the connected host, Note the .local

once you have connected using the -Y option you can pcmanfm& to get the file manager and run applications on the second pi, information showing on the first system X-display.
you don't need the -l pi if the systems all use the same username.

Return to “Networking and servers”