1

There are answers on this theme but too complicated...as I need only that, that one of the Raspi pick up everyday the picture (temperature graphs) made by the other. What is the simplest way to do that? Thank you for the help. The 2 RASPIS are on the same LAN (Ethernet)

  • Do you have experience with SSH? – Willian Paixao Jun 19 '14 at 14:35
1

well you can either transfer them via scp:

# Copy the file "foobar.txt" from a remote host to the local host
scp your_username@remoteip:foobar.txt /some/local/directory

more examples here

OR you can just set up a http server with python: go to your directory where the picture is saved and run this command:

python -m SimpleHTTPServer

This starts a Webserver on port 8000 and you can access the image from the second pi via http://remoteip:8000/image.jpg

if you want to start the server at boot, put this in /etc/rc.local:

pushd /path/you/want/to/serve; python -m SimpleHTTPServer; popd

and then there's the possibility to set up a SMB/NFS/AFP share and grab the file by mounting the share on the other pi. I'm sure you will find some good tutorials when you search for this topic ;)

  • The first solution is the simplest and it works but I am asked for my password. Is there a way to avoid it as this command is part of a script. – user3315730 Jun 19 '14 at 19:11
  • google for 'SSH Key Auth' to get info about how this is done, you essentially copy the public key (e.g. ~/.ssh/id_*.pub) from your connecting pi to the serving pi's list of authorized keys (~/.ssh/authorized_keys). – Gotschi Jun 19 '14 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.