After a good bit of researching and experimenting, I found a variation on LL's approach that worked for me. The difference in our is that LL tested on a Windows machine and I used an Ubuntu machine. I expect this is the reason LL's solution did not work for me and I could only get one Unihiker working at a time.
For my setup I have 5 Unihikers plugged into a USB hub which powers them and networks them to my master computer running Ubuntu. Now I have a setup where the master can ping the 5 nodes at IP addresses 11.1.2.3, 12.1.2.3, 13.1.2.3, 14.1.2.3, and 15.1.2.3. Round trip pings between the master and slaves are VERY fast averaging around 0.300ms which is over 10x faster than using wireless and without the annoying jitter due to interference issues. The wireless on the Unihiker can take a while to connect and warm up to speed. The new hardwired USB network connection does not experience these issues.
The hard wired network connection is also faster than using the digital IO connections of the Unihiker through pinpong for which I measured a latency of about 1ms.
Here are the five /etc/dhcp/dhcpd.conf configurations, one for each Unihiker node.
for node #1 use this
subnet 11.1.2.0 netmask 255.255.255.0 { range 11.1.2.101 11.1.2.200; host br0 { fixed-address 11.1.2.3; }}
for node #2 use thissubnet 12.1.2.0 netmask 255.255.255.0 { range 12.1.2.101 12.1.2.200; host br0 { fixed-address 12.1.2.3; }}
for node #3 use thissubnet 13.1.2.0 netmask 255.255.255.0 { range 13.1.2.101 13.1.2.200; host br0 { fixed-address 13.1.2.3; }}
for node #4 use thissubnet 14.1.2.0 netmask 255.255.255.0 { range 14.1.2.101 14.1.2.200; host br0 { fixed-address 14.1.2.3; }}
for node #5 use thissubnet 15.1.2.0 netmask 255.255.255.0 { range 15.1.2.101 15.1.2.200; host br0 { fixed-address 15.1.2.3; }}
… and the five /root/.xsessionrc files, one for each Unihiker node.
#1
echo 20 > /sys/class/gpio/exportecho out > /sys/class/gpio/gpio20/directionecho 1 > /sys/class/gpio/gpio20/valuesystemctl --user start PyboardUIifconfig br0 11.1.2.3 netmask 255.255.255.0 upsystemctl restart isc-dhcp-server
#2
echo 20 > /sys/class/gpio/exportecho out > /sys/class/gpio/gpio20/directionecho 1 > /sys/class/gpio/gpio20/valuesystemctl --user start PyboardUIifconfig br0 12.1.2.3 netmask 255.255.255.0 upsystemctl restart isc-dhcp-server
#3echo 20 > /sys/class/gpio/exportecho out > /sys/class/gpio/gpio20/directionecho 1 > /sys/class/gpio/gpio20/valuesystemctl --user start PyboardUIifconfig br0 13.1.2.3 netmask 255.255.255.0 upsystemctl restart isc-dhcp-server
#4echo 20 > /sys/class/gpio/exportecho out > /sys/class/gpio/gpio20/directionecho 1 > /sys/class/gpio/gpio20/valuesystemctl --user start PyboardUIifconfig br0 14.1.2.3 netmask 255.255.255.0 upsystemctl restart isc-dhcp-server
#5echo 20 > /sys/class/gpio/exportecho out > /sys/class/gpio/gpio20/directionecho 1 > /sys/class/gpio/gpio20/valuesystemctl --user start PyboardUIifconfig br0 15.1.2.3 netmask 255.255.255.0 upsystemctl restart isc-dhcp-server
Boot order is important. First power up the USB bus which powers up the Unihikers and gets their IPs registered on the network. Then plug the hub into the master computer. If you get the order wrong and things don't work, just unplug and plug back the USB cable to the master.
Enjoy building your own micro cluster applications!
My 1st attempt came close, but not quite. I think I followed your steps precisely. I was able to get the IPs changed on A and B, and independently they worked fine. But when both were used, the 2nd Unihiker could not be connected to. Maybe it has something to do with the values in the range statement. I'm not sure what that's supposed to do. I may have to try things on a fresh install, I've done a lot of updating.
Warning. I have experienced that the i2c scan takes MULTIPLE attempts before it finds my device. The first scans return no devices. You need to run it in a loop. After more experimentation, I found that even if i2c scan can not see the device immediately, the device IS functionsl and will respond immediately to commands.
Thank you so much for posting a solution to my problem. I will give it a try soon…