Power & Source of Big Ideas

Problem with fbtft_device on Armbian on NanoPi Neo Air

Moderators: chensy, FATechsupport

My problem is that each time I try to do anything related to LCD over frame buffer I got next error:
```
ioctl FBIOGET_VSCREENINFO: Inappropriate ioctl for device
```

Both tested LCDs (ili9341, st7735s) behave exactly the same way -- every time lighted up white screen, but nothing more.

I have NanoPi Neo Air with Armbian (5.59 Nanopiair Debian stretch 4.14.65) on it. All packages in system already updated to latest available versions. Problem remains as on stable kernel, same on nightly build.

Currently I have:

Code: Select all

$ uname -a && cat /etc/issue
Linux nanopiair 4.14.74-sunxi #330 SMP Mon Oct 8 00:57:54 CEST 2018 armv7l GNU/Linux
Debian GNU/Linux 9 \n \l


I'm successfully loading SPI:

Code: Select all

$ grep spi /boot/armbianEnv.txt
overlays=spi-spidev usbhost1 usbhost2
param_spidev_spi_bus=0
param_spidev_spi_cs=0


Here is the way I'm trying to load

Code: Select all

fbtft_device
(e.g. Waveshare 1.44 which is st7735s):

Code: Select all

modprobe fbtft_device name=fb_st7735r speed=16000000 busnum=0 cs=0 gpios=reset:1,dc:201,led:200,cs:67 custom=1 fps=60 bgr=1 custom=1 verbose=3 width=128 height=128


As a result I can see in dmesg:

Code: Select all

[  171.665158] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[  171.670433] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[  171.671639] spidev spi0.0: spidev spi0.0 1000kHz 8 bits mode=0x00
[  171.671746] spidev spi0.0: Deleting spi0.0
[  171.672721] fbtft_device: GPIOS used by 'fb_st7735r':
[  171.672735] fbtft_device: 'reset' = GPIO1
[  171.672739] fbtft_device: 'dc' = GPIO201
[  171.672743] fbtft_device: 'led' = GPIO200
[  171.672749] fbtft_device: 'cs' = GPIO67
[  171.672765] spi spi0.0: fb_st7735r spi0.0 16000kHz 8 bits mode=0x00
[  171.684388] fb_st7735r: module is from the staging directory, the quality is unknown, you have been warned.
[  172.603112] Console: switching to colour frame buffer device 16x16
[  172.603392] graphics fb0: fb_st7735r frame buffer, 128x128, 32 KiB video memory, 4 KiB buffer memory, fps=100, spi0.0 at 16 MHz


And there is /dev/fb0.

But unfortunately next actions can't draw anything on screen:

Code: Select all

sudo head --bytes 153600 /dev/urandom > /dev/fb0
yes | head --bytes 76800 > /dev/fb0


The only way to get at least some error is to run (from user of from sudo):

Code: Select all

$ fbset -i -v
ioctl FBIOGET_VSCREENINFO: Inappropriate ioctl for device


I'll appreciate any help. Thanks.
hi
did you manage to make an SPI screen work?

Tnx

Who is online

In total there are 38 users online :: 0 registered, 0 hidden and 38 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 38 guests