0

This involves a wireless Pi 1 and a wired Pi 4 both on Buster.

The Pi 1 grabs an image from a web cam every 4 minutes. Once a day the Pi4 copies those images and uses ffmpeg to encode a time lapse video which it uploads to a web host. This has been working fine for several years. Originally both machine were wireless with the Pi 4 on 5Ghz and the Pi 1 on 2.4 Ghz.

I was away from home for a while and getting notices (via Prowl) that the shell script on the Pi 4 was failing.

When I got home and checked the log I saw that the file copy failed with "No route to host". I switched the Pi 4 to 2.4 Ghz which fixed the problem until it didn't. So, I bought an Ethernet switch and wired up the Pi 4. That seemed to fix things until it didn't.

Now I'm stumped.

Here's the line of code that is failing:

pi@raspsky:~/webcam $ /usr/bin/scp -p pi@rasp2:$rjpeg/*.jpg $ipath

That copies an entire directory of JPEGs from a Pi 1 (rasp2 - wireless) to a Pi 4 (raspsky - wired). It has been working just fine, as is, for several years.

Here are the variables:

pi@raspsky:~/webcam $ rhome=/home/pi/webcam
pi@raspsky:~/webcam $ rjpeg=$rhome/arch
pi@raspsky:~/webcam $ ipath="$home/koratkam/arch"

Here's the error message from the log:

Mon Jun 16 05:02:00 +07 2025 Copy KoratKam JPEGs
ssh: connect to host rasp2 port 22: No route to host

Here's what happens when I run that exact line of code from the command line:

pi@raspsky:~/webcam $ /usr/bin/scp -p pi@rasp2:$rjpeg/*.jpg $ipath
image_000.jpg                                 100%  163KB   1.8MB/s   00:00
image_001.jpg                                 100%  165KB   1.9MB/s   00:00
image_002.jpg                                 100%  123KB   2.3MB/s   00:00
image_003.jpg                                 100%  118KB   2.3MB/s   00:00
<snip>

And then there's this:

pi@raspsky:~/webcam $ ping -c 3 rasp2
PING rasp2 (192.168.0.62) 56(84) bytes of data.
64 bytes from rasp2 (192.168.0.62): icmp_seq=1 ttl=64 time=1.63 ms
64 bytes from rasp2 (192.168.0.62): icmp_seq=2 ttl=64 time=1.64 ms
64 bytes from rasp2 (192.168.0.62): icmp_seq=3 ttl=64 time=5.87 ms

--- rasp2 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 6ms rtt min/avg/max/mdev = 1.627/3.045/5.871/1.998 ms

It all works perfectly, until it doesn't. What am I missing here and how can I find out what's going wrong?

==========

Edit based on a comment by Milliways:

Obviously I do not know much about networking so it would have been helpful to have been asked some specific questions. If I knew more about networking then I might not have to be here.

Here's what I know about the network. The router is a Deco X20. The PI 1 is headless and connected via WiFi on 2.4Ghz. It is about 2 meters from the router and has never experienced connection difficulties until a couple of weeks ago. Also connected to the Pi 1 is a Raspberry Pi Camera. The Pi 4, also headless, used to be connected via WiFi but when these problems started I bought a switch and connected the Pi 4 via an Ethernet cable (Cat 6, I think.) It also never had networking problems until recently. The Pi 4 is connected via USB to a camera, a scanner and an APC UPS. It uses BlueTooth to get data from a remote temperature and humidity sensor.

If additional networking information is needed, please ask a specific question in a comment.

Buadhai
  • 125
  • 1
  • 9

1 Answers1

1

Well, I'm away from home again and suddenly the scp started working again, all by itself. I did nothing.

Thanks to Milliways for being so kind, understanding and helpful.

Buadhai
  • 125
  • 1
  • 9