How to configure VFD

Hello all!
I have a question.
Does OpenVFD service also control the On/Standby LEDs of the TV Box?

I have a Vontar X3 TV Box. As already suggested in the thread, I used the config from HK1 X3 and VFD itself works fine, except for the On/Standby LEDs. They are swapped (It is “Red” when CE is running and “Blue” when it is switched off).

The native Android firmware however lights it correctly: Red in standby and Blue when it is on.

Any ideas on how can I correct this behavior?

This is most likely a DTB thing, OpenVFD doesn’t control the box’s LEDs.

2 Likes

Is there any link where I can read more about dtb ?

What is a device tree

How to extract a device tree

1 Like

I understand it’s not the best place to ask it, if you point where should I will ask there, but:
is

	gpioleds {
		compatible = "gpio-leds";
		status = "okay";

		sys_led {
			label = "sys_led";
			gpios = <0x45 0x0b 0x01>;
			linux,default-trigger = "default-on";
		};

what I am looking for?

EDIT: Solved. For anyone looking for a solution here is it

Hi,

I’m a newbie in this forum and would like to ask for help configuring the vfd.
I bought an X96 android box with S905X4 and I want to use it with CoreELEC, but I can’t get the vfd to work.
The cat /sys/kernel/debug/gpio output from Android 11: https://pastebin.com/U96SsFxm
I also found this file in the android kernel:
https://android.googlesource.com/kernel/arm64/+/f5269100977385d1fd4a5ef68e49631892cf4fe4/include/dt-bindings/gpio/meson-sc2-gpio.h

I opened the box and there is AiP1628 chip and type “3” display in it.

Based on this information I created a new vfd.conf file with the following lines:
vfd_gpio_clk=‘0,0,0x00’
vfd_gpio_dat=‘0,1,0x00’
vfd_gpio_stb=‘0,39,0x00’
vfd_chars=‘4,3,2,1,0’
vfd_dot_bits=‘0,1,2,3,4,5,6’
vfd_display_type=‘0x03,0x00,0x00,0x00’

But no luck, the display remained dark.

The box is with 4/64GB memory and 1000Mbps Ethernet port: https://imgaz.staticbg.com/thumb/large/oaupload/banggood/images/29/B9/199920bc-cd4c-464c-bf0c-18dcb97b34d0.jpg.webp
(Sorry for the two posts, but as a new user I can only put two links in one post.)

You need to install the latest nightly build.
Then try this vfd.conf. I think that the icons are not correct, but you should get the time.
x96-max-ultra-vfd.conf (1.2 KB)
If icons are wrong, you’ll have to play with vfd_dot_bits or you can do that with the openvfd service in kodi.
Please let me know what the correct config for the dot bits is.

2 Likes

First of all, thank you for your quick help. It was an inattention that I mixed up the data and the clock in the configuration.

I’m a bit stuck again with the configuration. I found the values:
USB=0, Card=1, High Wifi=2, Low Wifi=3, Col=4, Apps=5, LAN=6, N/A=7

Neither display type 2 nor 3 is not show all the possible values. Only display type 3 can handle both Low Wifi and High Wifi icons at the same time.
I have checked the source code and there is no behavior required for this display.
https://github.com/arthur-liberman/linux_openvfd/blob/master/driver/controllers/fd628.c

Best results so far (depending on which icons you prefer to see):
vfd_dot_bits=‘7,7,7,6,4,2,3’
vfd_display_type=‘0x03,0x00,0x01,0x00’

or

vfd_dot_bits=‘5,7,0,1,4,7,7’
vfd_display_type=‘0x02,0x00,0x01,0x00’

Any idea?

2 Likes

you have activated the time on the display at X96x4

A post was merged into an existing topic: Report about Amlogic S905X4 HK1 RBOX X4

Does OpenVFD run in Coreelec-ne ? I installed it but I don’t see /usr/lib/systemd/system/openvfd.service and there is no dmesg output.

Edit: it is working with the current version.

VFD for X96 x4?

Hello my device is S905x3 4gb ram /32 rom I put x96air rom on the device, the front led does not work, can you help me?

dmesg

Bluetooth: Out-of-order packet arrived (1 != 0)
[ 17.556795@3]- Registered IR keymap rc-empty
[ 17.557080@3]- input: meson-ir as /devices/platform/ff808040.meson-ir/rc/rc0/input7
[ 17.557305@3]- rc rc0: meson-ir as /devices/platform/ff808040.meson-ir/rc/rc0[ 17.558615@0]- meson-ir ff808040.meson-ir: AO_RTI_PIN_MUX : 0x110011
[ 17.558629@0]- meson-ir ff808040.meson-ir: receiver initialized
[ 17.568303@3]- lirc_dev: IR Remote Control driver registered, major 496
[ 17.574894@3]- rc rc0: lirc_dev: driver ir-lirc-codec (meson-ir) registered at minor = 0
[ 17.574903@3]- IR LIRC bridge handler initialized
[ 17.687427@0]- IR NEC protocol handler initialized
[ 17.691852@3]- OpenVFD: Version: V1.4.1
[ 17.692958@3]- OpenVFD: vfd_gpio_clk: #0 = 0x00; #1 = 0x41; #2 = 0x00;
[ 17.692961@3]- OpenVFD: vfd_gpio_dat: #0 = 0x00; #1 = 0x40; #2 = 0x00;
[ 17.692964@3]- OpenVFD: vfd_gpio_stb: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 17.692967@3]- OpenVFD: vfd_gpio0: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 17.692970@3]- OpenVFD: vfd_gpio1: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 17.692973@3]- OpenVFD: vfd_gpio2: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 17.692975@3]- OpenVFD: vfd_gpio3: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 17.692977@3]- OpenVFD: vfd_gpio_protocol: #0 = 0x00; #1 = 0x00;
[ 17.692981@3]- OpenVFD: vfd_chars: #0 = 0x00; #1 = 0x04; #2 = 0x03; #3 = 0x02; #4 = 0x01;
[ 17.692986@3]- OpenVFD: vfd_dot_bits: #0 = 0x00; #1 = 0x01; #2 = 0x03; #3 = 0x02; #4 = 0x04; #5 = 0x05; #6 = 0x06;
[ 17.692989@3]- OpenVFD: vfd_display_type: #0 = 0x00; #1 = 0x00; #2 = 0x00; #3 = 0x06;
[ 17.692993@3]- OpenVFD: Detected gpio chips: periphs-banks, aobus-banks.
[ 17.692999@3]- OpenVFD: “periphs-banks” chip found. base = 410, pin count =
86, pin = 65, offset = 475
[ 17.693001@3]- OpenVFD: “periphs-banks” chip found. base = 410, pin count =
86, pin = 64, offset = 474
[ 17.693002@3]- OpenVFD: Skipping vfd_gpio_stb evaluation (0xFF)
[ 17.693004@3]- OpenVFD: Skipping vfd_gpio0 evaluation (0xFF)
[ 17.693005@3]- OpenVFD: Skipping vfd_gpio1 evaluation (0xFF)
[ 17.693006@3]- OpenVFD: Skipping vfd_gpio2 evaluation (0xFF)
[ 17.693007@3]- OpenVFD: Skipping vfd_gpio3 evaluation (0xFF)
[ 17.694179@3]- OpenVFD: Select FD6551 controller
[ 17.694249@3]- OpenVFD: SW I2C interface intialized (address = 0x0000 (
canvas.idx =0x42
[ 21.678392@3]- fb: osd[3] canvas.addr=0xed600000
[ 21.678394@3]- fb: osd[3] canvas.width=128
[ 21.678395@3]- fb: osd[3] canvas.height=32
[ 21.678396@3]- fb: osd[3] frame.width=32
[ 21.678397@3]- fb: osd[3] frame.height=32
[ 21.678398@3]- fb: osd[3] out_addr_id =0x4
[ 36.428548@3]- cectx ff80023c.aocec: CEC framework ctrl enabled
[ 37.254355@3]- OpenVFD: Select FD628 controller
[ 37.254643@3]- OpenVFD: SW SPI 3-wire interface failed to intialize. Invalid
CLK (475), DAT (474) or STB (-2) pins
[ 37.254646@3]- OpenVFD: Failed to initialize the controller, reverting to

FD6551

openvfd.service - OpenVFD Service
Loaded: loaded (/usr/lib/systemd/system/openvfd.service; disabled; vendor p Active: active (running) since Tue 2022-10-04 06:43:24 UTC; 2h 4min ago
Main PID: 4080 (openvfd-start)
Tasks: 4 (limit: 3722)
Memory: 1.4M
CGroup: /system.slice/openvfd.service
├─4080 /bin/sh /usr/lib/coreelec/openvfd-start
└─4127 /usr/sbin/OpenVFDService
Oct 04 06:43:24 CoreELEC systemd[1]: Started OpenVFD Service.

CoreELEC:~ # cat /sys/kernel/debug/gpio
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 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-499 ( |key ) in hi
gpio-507 ( |? ) out lo
CoreELEC:~ #

I will need cat /sys/kernel/debug/gpio from Android, not from CoreELEC.
Also, what’s the full name of the device?

Try this config
https://raw.githubusercontent.com/arthur-liberman/vfd-configurations/master/x99-max-plus-x88pro-x3-vfd.conf