Timur Timaev Posted December 12, 2023 Share Posted December 12, 2023 Hello everyone! I was struggling to make wiring work on OrangePi 5 Plus armbian. Tried everything and came up with a solution that worked for me. I was constantly getting these errors: wiringPiSetup: mmap (PWM) failed: Operation not permitted wiringPiSetup: mmap (GPIO) failed: Operation not permitted I'm on 23.8.2. 1. Install armbian and update apt sudo apt update 2. As stated in OrangePi5Plus wiki page I got .deb installer for wiringPi on OrangePi Quote Note that wiringOP has been pre-installed in the linux image released by Orange Pi. Unless the code of wiringOP is updated, there is no need to re-download, compile and install, just use it directly. The storage path of the compiled wiringOP deb package in orangepi-build is: orangepi-build/external/cache/debs/arm64/wiringpi_x.xx.deb Now here's the link to this file: https://github.com/orangepi-xunlong/orangepi-build/blob/next/external/cache/debs/arm64/wiringpi_2.51.deb 3. The most important step was described here: https://github.com/Joshua-Riek/ubuntu-rockchip/issues/273 echo "BOARD=orangepi5plus" | sudo tee /etc/orangepi-release Somehow this solves the issue. No idea how these things work tbh... 4. Check if pins are detected via gpio readall or add sudo sudo gpio readall You should get a table with all the pins and numbers like this: 5. Install wiringop-python just as stated in the manual: http://www.orangepi.org/orangepiwiki/index.php/Orange_Pi_5_Plus#How_to_install_wiringOP-Python # get the dependencies sudo apt-get update sudo apt-get -y install git swig python3-dev python3-setuptools # clone wiringOP-python repo, the branch should be "next" and NOT "main" or "master" git clone --recursive https://github.com/orangepi-xunlong/wiringOP-Python -b next cd wiringOP-Python git submodule update --init --remote python3 generate-bindings.py > bindings.i sudo python3 setup.py install The wiringOP-Python should be working now. 2 Quote Link to comment Share on other sites More sharing options...
armbianer123 Posted March 7 Share Posted March 7 (edited) I had some issues with "wiring" and getting the I2C and SPI interfaces on orange pi 5 plus working with armbian and wanted to link the source that had everything I needed. I just copy pasted the commands and got my BME280 sensor working nicely: guide on howto setup i2c and SPI on orange pi 5 plus with armbian Edited March 7 by armbianer123 0 Quote Link to comment Share on other sites More sharing options...
OlegEnot Posted August 6 Share Posted August 6 I confirm on Armbian bookworm v24.5.5 stable, wiringOP expects a line in /etc/orangepi-release indicating the board name BOARD=orangepi5plus Maybe the build maintainer will include the change by default in the image for Orange Pi 5 Plus boards? 😊 0 Quote Link to comment Share on other sites More sharing options...
Werner Posted August 6 Share Posted August 6 Would make more sense if the wiringop maintainers change to /etc/armbian-release since orangepi images are based on Armbian. They forked the framework years ago, did "sed s/armbian/orangepi/g" across the whole code and added hacks to make their boards somehow work. 0 Quote Link to comment Share on other sites More sharing options...
OlegEnot Posted August 6 Share Posted August 6 Please tell me. I find it difficult to answer the question myself: Has Armbian always had BOARD=orangepi5-plus for the Orange Pi 5 Plus board and similarly in orangepi images? For the current Armbian cat /etc/armbian-release -> BOARD=orangepi5-plus, in turn wiringOP expects orangepi5plus. Don't judge strictly, 🙂 it would be interesting to come to some adequate solution, maybe create a request for inclusion in wiringop with the addition of the line else if (strncmp(revision, "orangepi5-plus.", 14) == 0) { *model = PI_MODEL_5_PLUS; } as an option. Thanks! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.