Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wiringPiSetup: mmap (PWM) failed: Operation not permitted #95

Closed
drozdi70 opened this issue Nov 25, 2023 · 7 comments
Closed

wiringPiSetup: mmap (PWM) failed: Operation not permitted #95

drozdi70 opened this issue Nov 25, 2023 · 7 comments

Comments

@drozdi70
Copy link

After installation on orage pi5 plus board:

root@orangepi5-plus:~/work/wiringOP# gpio -v
gpio version: 2.46
Copyright (c) 2012-2018 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

  • Device tree is enabled.
    *--> Orange Pi 5 Plus
    root@orangepi5-plus:~/work/wiringOP# gpio readall
    wiringPiSetup: mmap (PWM) failed: Operation not permitted

OS info:
root@orangepi5-plus:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Armbian 23.8.3 bookworm
Release: 12
Codename: bookworm

@drozdi70
Copy link
Author

during installation warrning:
[Install]
chown: warning: '.' should be ':': ‘root.root’

All Done.

@chudo9991
Copy link

during installation warrning: [Install] chown: warning: '.' should be ':': ‘root.root’

All Done.

Can you please explain in more detail how to fix this?

@drozdi70
Copy link
Author

the issue is not fixed :(
I gave only the warning I got during installation - maybe it is related to the issue or not...

@chudo9991
Copy link

the issue is not fixed :( I gave only the warning I got during installation - maybe it is related to the issue or not...

I found this repo with old fork - https://github.com/zhaolei/WiringOP.git

On my OrangePi Lite it works fine

@drozdi70
Copy link
Author

no warnings this time but:
orangepi@orangepi5-plus:~/work/WiringOP$ gpio -v
gpio version: 2.20
Copyright (c) 2012-2014 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

piBoardRev: Unable to determine board revision from /proc/cpuinfo
-> No "Hardware" line
-> You may want to check:
-> http://www.lemaker.org/

orangepi@orangepi5-plus:~/work/WiringOP$ gpio readall
piBoardRev: Unable to determine board revision from /proc/cpuinfo
-> No "Hardware" line
-> You may want to check:
-> http://www.lemaker.org/

old version not supporting Orange pi 5 Plus :(

@jmaks
Copy link

jmaks commented Jan 8, 2024

#96
near-by issue is says about master branch that works.

Try it.
Works for me on opi pc2 board after successfull build.
Also,for board opi5plus you may use python3 modules (http://www.orangepi.org/orangepiwiki/index.php/Orange_Pi_5_Plus#How_to_install_wiringOP-Python)

                                                                                                                      
root@opipc2:/opt/wiringOP-master# cd ..                                                                             
root@opipc2:/opt# gpio -v                                                                                           
gpio version: 2.46                                                                                                    
Copyright (c) 2012-2018 Gordon Henderson                                                                              
This is free software with ABSOLUTELY NO WARRANTY.                                                                    
For details type: gpio -warranty                                                                                      
                                                                                                                      
  * Device tree is enabled.                                                                                           
  *--> Xunlong Orange Pi PC 2                                                                                         
root@opipc2:/opt# gpio readall                                                                                      
 +------+-----+----------+------+---+  OPi PC2 +---+------+----------+-----+------+
 | GPIO | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | GPIO |
 +------+-----+----------+------+---+----++----+---+------+----------+-----+------+
 |      |     |     3.3V |      |   |  1 || 2  |   |      | 5V       |     |      |
 |   12 |   0 |    SDA.0 |  OFF | 0 |  3 || 4  |   |      | 5V       |     |      |
 |   11 |   1 |    SCL.0 |  OFF | 0 |  5 || 6  |   |      | GND      |     |      |
 |    6 |   2 |    PWM.1 |  OFF | 0 |  7 || 8  | 0 | OFF  | PC05     | 3   | 69   |
 |      |     |      GND |      |   |  9 || 10 | 0 | OFF  | PC06     | 4   | 70   |
 |    1 |   5 |    RXD.2 |  OFF | 0 | 11 || 12 | 0 | OFF  | PD14     | 6   | 110  |
 |    0 |   7 |    TXD.2 |  OFF | 0 | 13 || 14 |   |      | GND      |     |      |
 |    3 |   8 |    CTS.2 |  OFF | 0 | 15 || 16 | 0 | OFF  | PC04     | 9   | 68   |
 |      |     |     3.3V |      |   | 17 || 18 | 0 | OFF  | PC07     | 10  | 71   |
 |   15 |  11 |   MOSI.1 |  OUT | 1 | 19 || 20 |   |      | GND      |     |      |
 |   16 |  12 |   MISO.1 |  OFF | 0 | 21 || 22 | 0 | OFF  | RTS.2    | 13  | 2    |
 |   14 |  14 |   SCLK.1 |  OFF | 0 | 23 || 24 | 0 | OFF  | CE.1     | 15  | 13   |
 |      |     |      GND |      |   | 25 || 26 | 0 | OFF  | PA21     | 16  | 21   |
 |   19 |  17 |    SDA.1 |  OFF | 0 | 27 || 28 | 0 | OFF  | SCL.1    | 18  | 18   |
 |    7 |  19 |     PA07 |  OFF | 0 | 29 || 30 |   |      | GND      |     |      |
 |    8 |  20 |     PA08 |  OFF | 0 | 31 || 32 | 0 | OFF  | RTS.1    | 21  | 200  |
 |    9 |  22 |     PA09 |  OFF | 0 | 33 || 34 |   |      | GND      |     |      |
 |   10 |  23 |     PA10 |  OFF | 0 | 35 || 36 | 0 | OFF  | CTS.1    | 24  | 201  |
 |  107 |  25 |     PD11 |  OFF | 0 | 37 || 38 | 0 | OFF  | TXD.1    | 26  | 198  |
 |      |     |      GND |      |   | 39 || 40 | 0 | OFF  | RXD.1    | 27  | 199  |
 +------+-----+----------+------+---+----++----+---+------+----------+-----+------+
 | GPIO | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | GPIO |
 +------+-----+----------+------+---+  OPi PC2 +---+------+----------+-----+------+

@drozdi70
Copy link
Author

drozdi70 commented Apr 11, 2024

Solution found and working for me on orangepi5plus:
echo "BOARD=orangepi5plus" | sudo tee /etc/orangepi-release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants