If you have several raspberry pi's on your network and you want to know if they are online or not. And you dont want to try to login to each one individually to test them everytime.
I have all of my pis configured with vncserver enabled. I will not discuss how to do this there are several resources online to learn how to this. I used this one https://www.raspberrypi.org/documentation/remote-access/vnc/
You should name each pi with a different name an password.
sudo hostname <yourhostname>
Or use the gui under main menu preferences raspi-config. There are also several resources to do this as well.
After you do this navigate to avahi folder.
cd /etc/avahi
Now to edit the.conf file.
sudo nano avahi-daemon.conf
Arrow down until you see [server] uncomment/remove the # in front of host-name. And change the name from foo to the hostname you have changed for this pi. Uncomment the next line also domain=local.
Arrow down until you see [publish] and look for the line publish-address=yes uncomment it as well and also uncomment publish-domain=yes. Hit ctl+x type y press enter to save changes.
Now repeat these steps for all of your local pis. Reboot each pi after the changes are made.
Now on a laptop or a raspberry pi that you mainly use as a master, open a terminal on linux PC or raspberry pi. And type in
sudo apt install avahi-utils mdns-scan
Edit the code and run it.
Comments
Please log in or sign up to comment.