Solution for "gpio readall" command unable to view Pi 4B pin status - Yahboom

If you are a Raspberry Pi 4B enthusiast, you will encounter this problem during use Pi4. (This problem has troubled me for many days. The official Raspberry Pi method has not been able to modify the gpio version in my image. )
When using the Raspberry Pi to enter the gpio readall command to view the pin status, the system prompts:
The reason for this problem is that the current wiringpi version of the system didn’t support Raspberry Pi 4B, but this problem will not affect the function of all the pins we use to program Raspberry Pi.

The official Raspberry Pi responded to this problem with the official image and provided a solution.
Use the following command to update the version of wiringpi.
cd /tmp
wget https://project- downloads . drogon . net/wiringpi - latest . deb
sudo dpkg -i wiringpi -latest . deb

If you are using the Raspberry Pi official image, this method may solve the problem. But if you use some other images configured, this method may not solve your problem, such Raspberry Pi smart car image. After installing the latest wiringpi, the gpio version is still 2.50 (older version), and the problem with gpio readall is still not resolved. 

We will share another method here, I have tried many different images that can solve this problem.
1) Enter the Raspberry Pi system, we need to make sure that the Raspberry Pi can access the Internet normally. We can enter the command to determine if the Raspberry Pi can access the Internet normally. (Of course~, you can also ping other web addresses or some IP addresses)
ping www.baidu.com

As shown in the figure above, a normally ping indicates that the Raspberry Pi can access the Internet normally, and we can perform the following steps.
2) Input the following command to install Git.
sudo apt-get install git-core
 
Wait patiently for its installation to complete.
3) Input the following command to download the WiringPi file to the current directory on the Raspberry Pi system.
sudo git clone https://github.com/WiringPi/WiringPi

4) Wait patiently for its installation to complete. After the download is complete, we can see a WiringPi folder in the current directory. As shown below.

5) Input the following command to enter the WiringPi folder directory.
cd WiringPi/

6) Input the following command to install WiringPi.
sudo ./build

Wait patiently for its installation to complete. When we see following interface without any error, it means that the installation is complete.

7) Input the following command to view the version of gpio. 
gpio -v

8) Finally, input gpio readall, we can display the status of each pin of Raspberry Pi, as shown in the figure below.

Solutions

11 comments

Didier

Didier

Thanks!

Robert

Robert

Thank you. Form the Netherlands.

Pademo

Pademo

It’s now 2023 and this still works beautifully. Thank you so much!

Timothy

Timothy

Thank you Jesus Christ the GOD

Timothy

Timothy

iv’e been at it for weeks and now i found this site and followed the instructions
and it Works nice… I’m Happy!!!!!!
ret:RoboticsProjectControlsFSE&SystemIntegrationEngineer
approaching 30 years of experience.

francois

francois

Thank you Jeff
It’s working for me !!

garry

garry

Thank you so much. This worked for me.
cd /tmp
wget https://project- downloads . drogon . net/wiringpi – latest . deb
sudo dpkg -i wiringpi -latest . deb

Jeff

Jeff

Go read here:
https://learn.sparkfun.com/tutorials/raspberry-gpio/all

This is because you have a conflict with the previous WiringPi package.

You need to do the following commands:

sudo apt-get purge wiringpi
hash -r

Amit Kumar

Amit Kumar

error>>>> gpio: Symbol `piModelNames’ has different size in shared object, consider re-linking
Oops – unable to determine board type… model: 19

Paul van dessel

Paul van dessel

i tested it on pi 400

i get this
gpio readall
gpio: Symbol `piModelNames’ has different size in shared object, consider re-linking
Oops – unable to determine board type… model: 19
please help

hugo

hugo

thank you!

Leave a comment