algoalgoalgo
Posts: 1
Joined: Mon Feb 12, 2018 11:39 pm

How to connect two Raspberry pi zero with Raspberry3?

Tue Feb 13, 2018 12:21 pm

i tried to connect both raspberrypi zero(pi@rspz) and raspberrypi zero Wireless(pi@rspzw) with raspberry pi 3(pi@rsp3) via usb.Take a pictures from raspbery pi zero's cameras and send them raspberry pi 3 via ssh.
(Firstly i made a proper configuration(create empty ssh file /boot and edit cmdline.txt and config.txt) both raspberry pi zero )

Code: Select all

pi@rsp3:~ $ ifconfig

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.101  netmask 255.255.255.0  broadcast 192.168.1.255

        inet6 fe80::c1e9:f16f:fe75:57e3  prefixlen 64  scopeid 0x20<link>

        ether b8:27:eb:92:65:7f  txqueuelen 1000  (Ethernet)

        RX packets 106  bytes 8042 (7.8 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 36  bytes 4912 (4.7 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 1  (Local Loopback)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 169.254.211.188  netmask 255.255.0.0  broadcast 169.254.255.255

        inet6 fe80::6bf3:7c50:8b01:f374  prefixlen 64  scopeid 0x20<link>

        ether a6:d6:5b:ed:4f:df  txqueuelen 1000  (Ethernet)

        RX packets 91  bytes 6919 (6.7 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 35  bytes 5791 (5.6 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

usb1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 169.254.3.120  netmask 255.255.0.0  broadcast 169.254.255.255

        inet6 fe80::6583:f6eb:6584:3fd4  prefixlen 64  scopeid 0x20<link>

        ether 26:78:bf:dd:ea:cc  txqueuelen 1000  (Ethernet)

        RX packets 74  bytes 6366 (6.2 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 38  bytes 6037 (5.8 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        ether b8:27:eb:c7:30:2a  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

(raspberry pi 3 connected internet with ethernet cable)
pi@rsp3:~ $sudo ssh pi@rspzw.local
(succesfully connected.)

pi@rsp3:~ $sudo ssh pi@rspz.local
ssh : connect to host rspz.local port 22: No route to host

pi@rsp3:~ ping rspzw.local
(succesfully ping)

pi@rsp3:~ ping rspz.local
Destination host unreachable

modified 3 of them /etc/ssh/sshd_config
Port 22
port 26

pi@rsp3:~ $sudo ssh pi@rspzw.local -p 22
(succesfully connected)

pi@rsp3:~ $sudo ssh pi@rspz.local -p 26
ssh : connect to host rspz.local port 26: No route to host

how can i connect both with raspberry pi 3 (via ssh )

SurferTim
Posts: 1504
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: How to connect two Raspberry pi zero with Raspberry3?

Tue Feb 13, 2018 1:38 pm

Both usb devices have the same subnet. Run this from a console:

Code: Select all

route
The device with the lowest metric will be used for that subnet.

My advice is use different subnets on each usb device.

Edit: Or bridge the two usb interfaces. I haven't tried this.

Return to “Networking and servers”

Who is online

Users browsing this forum: No registered users and 3 guests