Can't run vcgencmd?

I’m a beginner of resin.io. Just want to start with dumping RPi system temp and CPU info.
I tried with Python and from terminal I couldn’t find vcgencmd which I though bundled with raspbian (I’m using resin/rpi-raspbian:wheezy). Do I make a wrong expectation or anything missing?

Thanks!

Hey philip,
You haven’t missed anything, but the reason that vcgencmd isn’t there is because libraspberrypi-bin firmware isnt installed by default in the rpi-raspbian image, this is done to save on space.

However it is very easy to install, all you need to do is add this line to your dockerfile.

RUN apt-get update && apt-get install -y libraspberrypi-bin

then you should be able to just run vcgencmd as usual.
hope that makes sense.
cheers

2 Likes

Cool! It fixed my problem.
Thanks!

1 Like

Hi shaun,

I am also new to resin.io and trying to add support for RPi vcgencmd to the current version of resin-node-red that is based on Alpine. Do you know the command that would add this to the Alpine docker container? If not, do you know where I can find the Dockerfile used to generate the old node-red container that supports this functionality?

Any help would be much appreciated.

rich

Anyone looking to run vcgencmd or tvservice for debugging on a deployed device (in this case a Pi Zero W) can run:

balena run --rm -it --privileged balenalib/rpi-raspbian:buster

For other Pis, just replace rpi-raspbian with the applicable device type, e.g. raspberrypi3, raspberrypi4. These base images now come with libraspberrypi-bin pre-installed.

--privileged is required, otherwise the apps will fail to run with the error Failed to initialize VCHI

@MotivDev for Alpine, the raspberrypi package is also now pre-installed. Note that the Pi userland executable tools don’t appear to be on the PATH, so adding /opt/vc/bin/ before the executable is probably necessary. Most people are probably using the balena-node-red balenablock now which uses Debian base images. But if you wanted to use Alpine, it seems possible.

1 Like