0

I have a RPi 4 running Raspbian with the Ubuntu Mate desktop environment, whenever I try to use the Wiring Pi library through a C script, to doesn't work at all. On using the gpio readall command I was shown the error

pi@raspberrypi:~$ gpio readall
Oops - unable to determine board type... model: 17

How do I resolve this issue, I have tried reinstalling WiringPi but the outcome was the same, do I need to reinstall my OS ?

6
  • GPIO works WiringPi doesn't - it is deprecated. – Milliways Dec 26 '20 at 5:21
  • @Milliways: born again? – Seamus Dec 26 '20 at 6:11
  • @Seamus No DEAD - just not buried. It is slowly decaying and has limited support for Pi4, none for Pi400, CM4 – Milliways Dec 26 '20 at 6:37
  • @Milliways: You must have information not available to me. All I know for sure is that 2.52 still works on RPi4, and there is a GitHub site that claims to be furthering the project. – Seamus Dec 26 '20 at 6:40
  • @Seamus I am aware of that site. It is an incomplete patch with much of the same limitations. I started on my own (using more modern API) but decided it was too convoluted. People would be better using other tools. Many only use gpio readall and I have written an enhanced gpioread. – Milliways Dec 26 '20 at 6:47
1

You didn't say which version of Wiring Pi you were using. If you're not using ver 2.52, that could be the cause of your problem. Follow the upgrade instructions, check to make sure you have ver 2.52, and try again.

My experience was similar to yours. After performing the upgrade on my RPi 4, everything seems to work fine - on RPi OS.

As you'll learn after reading the upgrade instructions, the author of Wiring Pi has discontinued support for the library. However, it seems a new team has moved the code to GitHub, and will hopefully keep the project moving forward.

2
  • thanks,I upgraded the OS and got the correct version of wiring Pi but it still didnt work so I just went with the good old method of uninstalling and reinstalling and It worked – pyramiskyma Jan 29 at 3:38
  • @pyramiskyma: Yeah - I don't know what happened there, but something to do with diffs between updating w/ dpkj & debs vs apt maybe. In any case, if this solved your problem, please read this & make a decision. If you don't like mine, then please make your own answer & select that. Otherwise, your question becomes a "zombie" & is recirculated for answers ad nauseum. – Seamus Jan 29 at 4:22
0

I recently went through this problem with ubuntu 20.10 on a RPI4 and CM4 and even running GPIO -v simply SEGV's..

As long as you have the dependancies.. its simple enough to upgrade to WiringPI 2.6 which works..

#git clone git@github.com:WiringPi/WiringPi.git
#cd WiringPi
#./build

At which point

root@ys:~/git/WiringPi# gpio -v
gpio version: 2.60
Copyright (c) 2012-2018 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: CM4, Revision: 00, Memory: 1024MB, Maker: Sony
  * Device tree is enabled.
  *--> Raspberry Pi Compute Module 4 Rev 1.0
  * This Raspberry Pi supports user-level GPIO access.
1
  • thanks man :) thank you very much – pyramiskyma Mar 6 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.