Starting with Clusterhat

170 views
Skip to first unread message

Gregg Dille

unread,
Jun 24, 2020, 5:40:53 PM6/24/20
to ClusterHAT
I just connected my Clusterhat last night and I'm having a bit of trouble.  I'm looking for some guidance.

What I have:
I have a Raspberry Pi 3b+ as the controller, with 3 Raspberry Pi Zero W's and 1 Raspberry Pi Zero.  One of the Raspberry Pi Zero W's has an e-ink shield on it, facing outward.  Two of the Raspberry Pi Zero W's do not have a microSD card in them, but that is okay...the remaining devices have already been configured and running Raspbian with static IPs and I had been able to SSH into them prior.

I previously had 6 nodes total, configured and working in a Docker Swarm, and ideally, I would like them all to continue to connect wirelessly as members of the swarm...so, the only thing I really would like out of the Clusterhat at the moment is to supply power...though, possibly in the future I may want to boot them without microSD cards and use them like that.

My difficulty at the moment is that I cannot get power to any of the devices connected to the Clusterhat.  The 3b+ has power and I am able to SSH into it.

Here's what I have done:
I connected the Clusterhat to the 3b+ (including the USB cable).
I connected the Zeros to the Clusterhat
I connected the power.
While SSH'ed into the 3b+, I cloned the repository, but I did not build any of the images as some of the devices were already working. 
I enabled i2c on the 3b+ and rebooted.
At this point, I was expecting to see a green light on each of the Zeros, but did not.

In the repository, I found files/sbin/clusterhat (which was a link to /files/sbin/clustercntl) and found directions online to apply power, but no variation of using that command produces any results.  Status, on, init, alert on...all commands just run without any error or results...even while run as sudo.  I suppose this may be because they are not running the base images provided.

I found the troubleshooting guide and I see that the blue light on the Clusterhat glows, but never turns off.  My understanding is that the blue light should go out.  The troubleshooting guide suggests that the Clusterhat may not be plugged all the way in, so I removed it and reseated it, but get the same results.  I did not utilize any standoffs, but I can, if it will make a difference.

Some suggested the Zeros need to be plugged in very tightly, so I reseated each of them and ensure they "clicked".

I can attempt to build the images if needed, but I was hoping to them as-is.  I would like to know if there is something physical I can do to get these working, of it I have a bad board.

I can provide pictures for clarification if required.  Any help would be greatly appreciated.

Chris Burton

unread,
Jun 24, 2020, 6:01:54 PM6/24/20
to ClusterHAT
Hi, 
I found the troubleshooting guide and I see that the blue light on the Clusterhat glows, but never turns off.  My understanding is that the blue light should go out.  The troubleshooting guide suggests that the Clusterhat may not be plugged all the way in, so I removed it and reseated it, but get the same results.  

The blue LED going off requires the systemd service to initialise the I/O Expander which you'll be missing atm so I wouldn't worry about that too much yet but you can check it sees the HAT by running "cat /proc/device-tree/hat/product"  which should return "ZC4:ClusterHAT".
 
I can attempt to build the images if needed, but I was hoping to them as-is.  I would like to know if there is something physical I can do to get these working, of it I have a bad board.

If you can let me know which version of Raspbian (buster, is lite/full/"standard"?) you're using on the "controller" Pi with the Cluster HAT plugged in I can sort out and test instructions to install the clusterctrl tool so you can control the power for the Pi Zeros.

Chris.

Gregg Dille

unread,
Jun 24, 2020, 7:23:42 PM6/24/20
to ClusterHAT
I got the following results:

pi@swarm0:/proc/device-tree/hat $ cat product
ZC4:ClusterHATpi@swarm0:/proc/device-tree/hat $ cat product
ZC4:ClusterHATpi@swarm0:/proc/device-tree/hat $ cat vendor
8086 Consultancypi@swarm0:/proc/device-tree/hat $ cat uuid
de91a4ce-ac7f-11e9-a2a3-2a2ae2dbcce4pi@swarm0:/proc/device-tree/hat $ cat product_id
0x0004pi@swarm0:/proc/device-tree/hat $ cat product_ver
0x0024pi@swarm0:/proc/device-tree/hat $ cat name
hatpi@swarm0:/proc/device-tree/hat $

It's slightly odd that the results show on the same line without a CR, but that is trivial.
As for what version, I started with the "lite" version and updated it.  Here is the results from os-release:

pi@swarm0:/proc/device-tree/hat $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian


Thank you for your super-fast response.

Chris Burton

unread,
Jun 25, 2020, 7:13:59 AM6/25/20
to ClusterHAT
Hi, 
It's slightly odd that the results show on the same line without a CR, but that is trivial.
As for what version, I started with the "lite" version and updated it.  Here is the results from os-release:

The lack of CR is expected as that's what's stored in the EEPROM :).

If you run these commands as root it should set things up for the clusterctrl command so you can control power with the ClusterHAT (or the ClusterCTRL Single/Triple/etc).

TMPINSTALL=/tmp/clusterhat
apt install git libusb
-1.0-0-dev python-usb python-libusb1
git clone https
://github.com/burtyb/clusterhat-image.git $TMPINSTALL
mkdir
/usr/share/clusterctrl/
cp $TMPINSTALL
/files/sbin/cluster* /sbin/
cp $TMPINSTALL
/files/usr/share/clusterctrl/default-clusterctrl /etc/default/clusterctrl
cp $TMPINSTALL
/files/etc/udev/rules.d/90-clusterctrl.rules /etc/udev/rules.d/
cp $TMPINSTALL
/files/lib/systemd/system/clusterctrl-init.service /lib/systemd/system/
cp
-r $TMPINSTALL/files/usr/share/clusterctrl/python/ /usr/share/clusterctrl/
echo
'TYPE=c' >> /etc/default/clusterctrl
udevadm control
--reload-rules
systemctl enable clusterctrl
-init
raspi
-config nonint do_i2c 0
rm
-rf $TMPINSTALL

Then run an init so setup the I/O expander (the service should do this automatically when you reboot).

clusterctrl init

And now you should be able to get the status

clusterctrl status

And power things on/off, etc.

clusterctrl on p2 p4

Any problems let me know.

Chris.

Gregg Dille

unread,
Jun 25, 2020, 8:20:49 AM6/25/20
to ClusterHAT
That did the trick! 

Thanks for your amazing support.  Much appreciated.

Reply all
Reply to author
Forward
0 new messages