Mmap: Operation not permitted

Hi ,
I have a raspbery Pi2 with OSMC.
I connected a radio module RFM01 on gpio to receive info of my weather station .

I added in the config.txt the code:

dtparam = spi = on
dtparam i2c_arm = on

But when I run the python script I get this error message :

mmap : Operation not permitted
Failed to map the GPIO or TIMER registers into the virtual memory space .

Can anyone help me please?


Thanks mcobit,

but I tried with the commands:

sudo chown root ./wh1080_rf
sudo chmod 777 ./wh1080_rf
sudo ./wh1080_rf

without success…


This is currently an issue in the OSMC kernel which prohibits some userspace interaction with /dev/mem. It is fixed in this commit:

I plan to roll out that kernel by the weekend


Thanks Sam

I was out of my mind …
I do not understand why developers OSMC have put this filter…
this limit can be a problem for future hardware extensions.

The patch you’re working on will disable the filter completely to the dev / mem so you can work with all drivers or whenever you need to enter any single driver … es. in my case BCM 2835 ?

Thanks again

This is a standard (and widely) accepted kernel configuration option.

No patch, just a change in KCONFIG option


Surely … i approached recently to raspberry and am trying to learn …
if I understand your patch is not yet complete right?

I thank you for your work and are waiting to test it …

soon greetings


Patch is complete. We need to rebuild the kernel. It will be ready as an update for the weekend


Many thanks Sam…

I can’t wait to download this update and try it with my radio module…
Good job


Hello Sam ,
I saw that there was an update a few days ago.
I wanted us know if it is possible to disable the filter of memory protection and if it is possible in that way .

Many thanks



STRICT_DEVMEM is now set to off, so this should work fine


Reinstalled everything and now it seems ok …
now I’m trying to run the radio module rfm01 to connect to my weather station but will wait to receive the data … think the raspberry Pi 2 there is something different in gpio or management of ic2 from Raspberry B …

Thanks again Sam