Orange Pi Plus 2E - SPI problem

Recommended Posts


Hi everyone,

I am using Armbian. SPI overlay and "spidev" are already loaded

"[    2.614185] spi spi0.1: spi_setup / gpio_is_valid(21) ... doing gpio_request ...
[    2.614213] spi spi0.1: spi_setup / gpio_direction_output(21) done !
[    7.256451] spidev spi0.1: probing from DT

Did someone succesfully used SPI on this board using WiringPi, WiringPISPI?

I have an application that returns me "Unable to open SPI device: No such file or directory".

I do have ls /dev/spidev0.1

I tried different libraries for WiringPi but no success.

It seems that the library tries to load another module instead "spidev" that is already loaded in linux.

Do you need another information? I am ready to provide whatever you might need.

Thank you

Share this post

Link to post
Share on other sites

In case anyone has the same problem, I found this solution:


git clone https://github.com/zhaolei/WiringOP.git -b h3


then go to WiringOP/wiringPI/

and edit file wiringPiSPI.c


These are the lines that I modified 

static const char       *spiDev0  = "/dev/spidev0.0" ;

static const char       *spiDev1  = "/dev/spidev0.1" ;


into this:

static const char       *spiDev0  = "/dev/spidev0.1" ;

static const char       *spiDev1  = "/dev/spidev1.0" ;


after this, build wiringpi. Error is gone now


Share this post

Link to post
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.