How to configure VFD

Ok, before we continue, make sure that you have the OpenVFD Addon installed and that it’s enabled.
If it’s enabled and you still don’t see any icons, then please make a video recording of one full cycle of the test pattern (it’s about 60-70 seconds).
Using the video it may help me figure out why the icons are not working in normal mode.

1 Like

Which vfd.conf for Magicsee C500 Pro?
I use sm1_s905x3_4g.dtb

cat /sys/kernel/debug/gpio #CE
gpiochip1: GPIOs 410-495, parent: platform/pinctrl@ff634480, periphs-banks:
gpio-448 ( |amlsd ) out hi
gpio-458 ( |amlsd ) in hi
gpio-474 ( |openvfd ) in hi
gpio-475 ( |openvfd ) in lo
gpio-482 ( |sdio_wifi ) out hi
gpio-483 ( |sdio_wifi ) in hi
gpio-493 ( |bt_rfkill ) out hi
gpio-495 ( |bt_rfkill ) out hi

gpiochip0: GPIOs 496-511, parent: platform/pinctrl@ff800014, aobus-banks:
gpio-498 ( |avout_mute ) out hi
gpio-499 ( |key ) in hi
gpio-507 ( |? ) out hi

cat /sys/kernel/debug/gpio #Android
gpiochip1: GPIOs 410-495, parent: platform/pinctrl@ff634480, periphs-banks:
gpio-448 ( |amlsd ) out hi
gpio-458 ( |amlsd ) in hi
gpio-482 ( |sdio_wifi ) out hi
gpio-483 ( |sdio_wifi ) in hi
gpio-493 ( |bt_rfkill ) out hi
gpio-495 ( |bt_rfkill ) out hi

gpiochip0: GPIOs 496-511, parent: platform/pinctrl@ff800014, aobus-banks:
gpio-498 ( |avout_mute ) out hi
gpio-507 ( |? ) out lo

You need to run this command from Android, not CE.

Sadly the Android output has no vfd pinout.
I can’t really help any further without knowing which pins on the SoC the display is connected to.

Another potential thing we can look at is the Android DTB, pull the DTB out of Android and post it.

You can try the Magicsee N5 or N5 Max and see if it works, if not then there’s not much to do.

Magicsee N5 and N5 Max not works. It’s write about S905X2 in vfd.conf file.
I don’t know how get DTB from Android.

Try this:

Try this vfd conf.
magicsee-c500-pro-vfd.conf (1.5 KB)

It’s work very good for me.
Thank You very much.

Are all the icons correct?

Time is correct shown.
Wifi, Play and Pause shown too.
It’s look like everything works correctly.

1 Like

Great, thanks.
I pushed this config to the rerpository.

Thank you very much.
I am pleased that another piece will be added to the repository.
I still have to figure out why DVB-T, DVB-S tuners do not work.

Hii notFound, do you still have the vfd.conf file for Tanix tx5 plus. Can’t download the link you posted. I have try a few for tanix and none works.

Use the TX5 Max config and remember to install vfd from repo.

Works for me with TX Mini, Max and Plus.

Thank you so much for the reply. I have try all of the Tanix files and only 1 works for me was the tx5 pro.

It’s works well but it’s in 24 hour time. Just wondering is there support for 12 hour clock?

1 Like

12 hour display is not supported right now.

Thank You, You guys are doing a wonderful jobs.

Hi Guys,

I’ve been trying to get OpenVFD working on a Z69 Pro 2GB just like @jimbo3146 did in his topic. Unfortunately just as he was unsuccessful I can’t get it to work either :frowning:.

To make sure this device also contained the fd628 chip I opened the case, and discovered that it did indeed contain the fd628. I’ve checked the dtbdts file and at the very last line it does mention fd628:

	fd628_dev {
		compatible = "amlogic, fd628_dev";
		status = "okay";
		clk_pin = <0x28 0x5f 0x00>;
		dat_pin = <0x28 0x60 0x00>;
		stb_pin = <0x28 0x61 0x00>;
	};

But these pins do not seem to work. I did however notice that the dts file lists a different id than CoreELEC advises:

	model = "Amlogic";
	compatible = "amlogic, Gxbb";
	amlogic-dt-id = "gxl_p281_2g";

I tried that one as well but to no avail. Unfortunately there are no debug kernel options enabled in Android So I cannot see which GPIO’s are assigned in /sys/kernel/debug/gpio so that’s no good either. Then I looked at a debug app which instructed me to place a empty file with the name .AMLCOPYLOGS on a external storage media after which it copied some logfiles to that medium. It did include a dmesg which I hoped would show some references of SPI or fd628 but it didn’t. Only some mention of FD628_Demo:

[    7.590398@3] type=1400 audit(1420070413.430:16): avc: denied { read write } for pid=4058 comm="FD628_Demo" name="fd628_dev" dev="tmpfs" ino=176 scontext=u:r:fd628:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
[    7.592757@3] type=1400 audit(1420070413.430:17): avc: denied { open } for pid=4058 comm="FD628_Demo" path="/dev/fd628_dev" dev="tmpfs" ino=176 scontext=u:r:fd628:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
[    7.593019@3] type=1400 audit(1420070413.440:18): avc: denied { read } for pid=4072 comm="FD628_Demo" name="operstate" dev="sysfs" ino=12666 scontext=u:r:fd628:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[    7.593689@3] type=1400 audit(1420070413.440:19): avc: denied { open } for pid=4072 comm="FD628_Demo" path="/sys/devices/c9410000.ethernet/net/eth0/operstate" dev="sysfs" ino=12666 scontext=u:r:fd628:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[    7.593895@3] type=1400 audit(1420070413.440:20): avc: denied { getattr } for pid=4072 comm="FD628_Demo" path="/sys/devices/c9410000.ethernet/net/eth0/operstate" dev="sysfs" ino=12666
[    8.402648@0] type=1400 audit(1420070414.240:36): avc: denied { getattr } for pid=4072 comm="FD628_Demo" path="/sys/devices/c9410000.ethernet/net/eth0/operstate" dev="sysfs" ino=12666 scontext=u:r:fd628:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[    8.451112@0] type=1400 audit(1420070414.340:37): avc: denied { getattr } for pid=4105 comm="bootanimation" path="/vendor" dev="rootfs" ino=1031 scontext=u:r:bootanim:s0 tcontext=u:object_r:rootfs:s0 tclass=lnk_file permissive=1
[    8.923073@3] type=1400 audit(1420070414.810:38): avc: denied { read } for pid=4072 comm="FD628_Demo" name="operstate" dev="sysfs" ino=12666 scontext=u:r:fd628:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[    8.940545@2] type=1400 audit(1420070414.810:39): avc: denied { open } for pid=4072 comm="FD628_Demo" path="/sys/devices/c9410000.ethernet/net/eth0/operstate" dev="sysfs" ino=12666 scontext=u:r:fd628:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[    8.963356@3] type=1400 audit(1420070414.810:40): avc: denied { getattr } for pid=4072 comm="FD628_Demo" path="/sys/devices/c9410000.ethernet/net/eth0/operstate" dev="sysfs" ino=12666 scontext=u:r:fd628:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1

Which seems to be a process that makes use of /dev/fd628_dev:

CPU usage from 1224467ms to 322723ms ago (2015-01-01 00:30:25.759 to 2015-01-01 00:45:27.502):
  6.5% 4058/FD628_Demo: 0.7% user + 5.8% kernel / faults: 6 minor

Decompiling that APK won’t help me much I suppose, since it interfaces with /dev/fd628_dev directly and does not use the GPIO’s.

So long story short, I would really like to get the display working since that’s the only physical sign that the device is turned on (without turning on the TV ofcourse :wink: ) but I’m out of options :cry:

Which version of CE are you using? And which DTB file?
Which SoC does your box use? You can see that in system information screen in CE itself.
Have you tried the vfd.conf file in the thread you’ve linked? Are you getting the same error as jimbo?
Also, what happens when you run cat /sys/kernel/debug/gpio in Terminal Emulator in Android?

Which version of CE are you using?

I’m running the lastest -ng release:
CoreELEC (official): 19.3-Matrix (Amlogic-ng.arm)

And which DTB file?

I’m currently using gxl_p212_2g like is advised on the Device Trees page:
Z69 S905X 2G gxl_p212_2g
Edit: Now I do however notice that the Z69 mentions the S905X, while my board seems to use the S905W.

But i’ve also tried gxl_p281_2g since it was mentioned in the decompiled android dtb file.
Still this made no difference.

Which SoC does your box use?

coreelec:~ # cat /proc/cpuinfo
model name      : Amlogic S905W rev d
Hardware        : Amlogic
Revision        : 0400

Have you tried the vfd.conf file in the thread you’ve linked?

Yes, I did and same result no life on the display. :frowning:

Are you getting the same error as jimbo?

Not quite but very similar:

[   12.736942@2] OpenVFD: Version: V1.3.0
[   12.736957@2] OpenVFD: vfd_gpio_clk:         #0 = 0x00; #1 = 0x5F; #2 = 0x00;
[   12.736962@2] OpenVFD: vfd_gpio_dat:         #0 = 0x00; #1 = 0x60; #2 = 0x00;
[   12.736967@2] OpenVFD: vfd_gpio_stb:         #0 = 0x00; #1 = 0x61; #2 = 0x00;
[   12.736972@2] OpenVFD: vfd_gpio0:            #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[   12.736976@2] OpenVFD: vfd_gpio1:            #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[   12.736981@2] OpenVFD: vfd_gpio2:            #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[   12.736985@2] OpenVFD: vfd_gpio3:            #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[   12.736989@2] OpenVFD: vfd_gpio_protocol:    #0 = 0x00; #1 = 0x00;
[   12.736995@2] OpenVFD: vfd_chars:            #0 = 0x00; #1 = 0x01; #2 = 0x02; #3 = 0x03; #4 = 0x04;
[   12.737003@2] OpenVFD: vfd_dot_bits:         #0 = 0x00; #1 = 0x01; #2 = 0x02; #3 = 0x03; #4 = 0x04; #5 = 0x05; #6 = 0x06;
[   12.737008@2] OpenVFD: vfd_display_type:     #0 = 0x01; #1 = 0x00; #2 = 0x00; #3 = 0x00;
[   12.737015@2] OpenVFD: Detected gpio chips:  periphs-banks, aobus-banks.
[   12.737022@2] OpenVFD: "periphs-banks" chip found.   base = 401, pin count = 100, pin = 95, offset = 496
[   12.737026@2] OpenVFD: "periphs-banks" chip found.   base = 401, pin count = 100, pin = 96, offset = 497
[   12.737029@2] OpenVFD: "periphs-banks" chip found.   base = 401, pin count = 100, pin = 97, offset = 498
[   12.737032@2] OpenVFD: Skipping vfd_gpio0 evaluation (0xFF)
[   12.737034@2] OpenVFD: Skipping vfd_gpio1 evaluation (0xFF)
[   12.737036@2] OpenVFD: Skipping vfd_gpio2 evaluation (0xFF)
[   12.737038@2] OpenVFD: Skipping vfd_gpio3 evaluation (0xFF)
[   12.737057@2] wifi is using the pin GPIOX_16 as pinmux
[   12.737071@2] meson-gxl-pinctrl pinctrl@4b0: request() failed for pin 95
[   12.737076@2] meson-gxl-pinctrl pinctrl@4b0: pin-95 (periphs-banks:496) status -22
[   12.737080@2] OpenVFD: can't request gpio of gpio_clk
[   12.737107@2] openvfd: probe of openvfd failed with error -22

what happens when you run cat /sys/kernel/debug/gpio in Terminal Emulator in Android?

I tried but my Android kernel does not seem to have debug compiled in, I’m not very familiar with android maybe this have to be turned-on somehow? Right now the entire path /sys/kernel/debug is non existent.