I'm currently trying to connect two local raspberry pis via Ethernet. My goal is to send my master raspberry pi node-red dashboard to slave raspberry pi. At first, I have succeeded with the task by connecting the raspberry's and set my slave raspberry chromium IP address (169.254.180.35). But the problem is that the ip address later on changes when rebooting, so i need to change the configurations again at the slave raspberry. I would like that the ip address stays the same. This isn't really my area of expertise, so I'm asking help
This isn't a node-red issue at all, but if you look at this blog at the section " Optional - Set a fixed IP address" it shows you the options for setting a fixed IP. I know the blog is about setting up a headless server, but that doesn't matter, the section on setting the IP is ok for headless or GUI installations.
Hello Colin!
And thank you for the fast reply!
I tried the suggested method. Although the node-red pointed ip address to 127.0.0.1. I would like it to be 169.254.180.35:1880, so my additional raspberry can display the dashboard. Did i adjust the configurations wrongly?
Is that address within the DHCP range of the router? If so then it may also give that address to another device. You must choose an address outside the range configured in the router. If you think you have done that did you reboot after changing dhcpcd.conf?
If it still doesn't work what does ip addr
show in a terminal. Also from the the other raspberry what does ping theipaddress
show (with the appropriate address obviously)
I think you should use a different address range. The one you are using is for APIPA. You could use addresses like 192.168.10.XXX/24. Make sure both machines are on the same subnet!
Yes, I did the reboot, and i was able to change the ip address of the node-red. I tried to change the ip address to 169.254.180.35, but then node-red changed the ip address to 127.0.0.1 and couldn't connect to the slave raspberry. Then tried with the 192.168.10.XXX address and still didn't get the dashboard to the slave raspberry, which have display connected..
Should i create two separate programs to the slave and master raspberry's and communicate with mqtt for example?
Yes i read the post which @Simon01011 posted, thank you for that. That is the reason why i changed target ip address to 192.168.10.XXX. Im sorry for not responding directly to your questions.
ip addr
1: lo: <LOOPBACK, UP, LOWER_UP> mtu 65536 qdisc noqueue state UNKNOW group default qlen 1000
link/loopback 00:00:00:00:00 brd 00:00:00:00:00
inet 127.0.0.1/8 scope host low
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferref_lft foverer
eth0: <BROADCAST, MULTICAST, UP, LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:2e:e6:43 brd ff:ff:ff:ff:ff
inet 169.254.180.35/16 brd 169.254.255.255 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
inet6 fe80::71f2:1410:37ee:bd01/64 scope link
valid_lft forever preferred_lft forever
/etc/dhcpcd.conf IP configuration is been commented out. Two raspberrys are connected via ethernet cable.
ping theipaddress gives Temporary failure in name resolution.
I will soon uncomment the dhcpcd.conf ip configurations and send you the data that ip addr gives.
These are two raspberries, right? Do you know raspi-config?
Use this tool to set your IP addresses like 192.168.10.10 for the first pi and 192.168.10.11 for the second one. Try if they can communicate with each other
Yea, I need to change the ip address back to 192.168.10.10. and change my slave raspberry to 192.168.10.11 to see how it works. Yea i know raspi-config, havent use it to be honest not so much. I will keep you updated (if interested) to see if this helps my project
I see an obvious problem that may be overlooked. You realize you cannot connect two pi's directly together via an ethernet cable unless it is a crossover cable? If you don't have a hub or switch to connect to you must use a crossover cable.