How to configure VFD

Thanks, that did the trick!
Great work! :partying_face:

Some questions still remain:

  1. Is there any use for the clock symbol? I noticed that it is now turned off. Not that I do mind but just wondering.
  2. It seems that the gxl_p212_2g.dtb file is not entirely compatible with the z69 2GB, should an alternative be made?
  3. Should we add the vfd config to here?
  1. The issue was the order of the characters.
    The clock icon is not used in CE, but you can use it for other things. I used it as the storage access indicator.
  2. Right, the DTB will need to be adjusted. It’s possible to do that using an autostart.sh script.
  3. I will once it’s finalized.

Edit: Can you verify that wifi still works? That we didn’t break anything in the functionality with the dtb changes.

but you can use it for other things. I used it as the storage access indicator.

Ah I see, was hoping to use it as a network activity indicator as I do not use local attached storage, but seems the plugin does not (yet) support this.

It’s possible to do that using an autostart.sh script.

But without documentation users probably won’t find that?

Can you verify that wifi still works?

Sure, personally I do not WiFI.
But the adapter is found and is able to see some SSID’s in CoreELEC:

wlan0     Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

At first I thought WiFI was removed since the dtb file specifically had nowifi it its name :stuck_out_tongue:

Ok, here’s the file.
Can you please try it with the default CE DTB and let me know if it works and if the instructions are clear?

Sure, but I have some questions.

  1. It seems that autostart.sh only triggers when /wifi/ pinctrl-names is set to default? yet /dev-bt is removed in the process? Is that correct? What if the dtb file contains no /wifi/ pinctrl-names?
  2. Why is the /flash filesystem remounted? The manpage of ftdput is very brief, but to my understanding this changes the DeviceTree at runtime and not the dtb.img file itself :thinking:?
    Ah ftdput does indeed change the dtb file when I look at these examples.
  3. One off-topic question, according to the Device Trees page all devices running the S905W soc use some version of the gxl_p281_xx file. Since my Z69 Pro uses the S905W instead of the S905X as the Z69 (without pro) does. Shouldn’t I be really using the gxl_p281_2g instead?

Edit: I’ve tried your file, but I think dev-bt should be bt-dev?

coreelec:/flash # fdtput -r -t s /flash/dtb.img /dev-bt
Error at '/dev-bt': FDT_ERR_NOTFOUND
coreelec:/flash # fdtput -r -t s /flash/dtb.img /bt-dev
coreelec:/flash #

Edit2: I’ve changed the autostart.sh to:

#!/bin/bash
if [ "$(fdtget -t s /flash/dtb.img /wifi/ pinctrl-names 2> /dev/null)" == "default" ]; then
    echo "DTB file incorrect, patching now..."
    mount -o remount,rw /flash
    fdtput -r -t s /flash/dtb.img /bt-dev
    fdtput -d -t s /flash/dtb.img /wifi/ pinctrl-names
    fdtput -d -t s /flash/dtb.img /wifi/ pinctrl-0
    sync
    mount -o remount,ro /flash
    echo "Done"
else
    echo "DTB file correct, no patching required"
fi

This will redirect stderr so the 2nd time the script runs it won’t output:

coreelec:~/.config # ./autostart.sh
Error at 'pinctrl-names': FDT_ERR_NOTFOUND

And I added some echo statements for user feedback.

Edit3: I’ve now installed gxl_p281_2g.dtb instead of gxl_p212_2g.dtb and applied your script and the LCD screen is working. Am I correct to assume that 281 is a better fit for my mediabox than 212?

Edit4: Correct me if I’m wrong but the sync command is not actually required here? since re-mounting the fs should already trigger a sync operation?

    sync
    mount -o remount,ro /flash

Edit5: Hopefully my last edit :stuck_out_tongue:, but don’t forget to add instructions to make the script executable with chmod +x /storage/.config/autorun.sh otherwise people not so familiar with Linux will probably forget such a step.

  1. Yes, if this entry exists, it’ll run the script and delete the entries we don’t need.
  2. Right.
  3. As long as everything works ok, I don’t think it matters which one you use.

Edits:

  1. Yes, that was a wrong copy-paste. Fixed now.
  2. This script runs without any kind of user output, we don’t need prints.
    I added your correction to dump the error to /dev/null, but it shouldn’t be a big deal as the user will not see this during normal boot.
  3. These entries are the same in p212 and p281, so the script should work regardless of which device is used.
  4. I’m not sure, better safe than sorry, as it can’t hurt. And it’s only executed once or after an update.
  5. Unnecessary according to Startup & Shutdown - LibreELEC.wiki
1 Like

Autorun.sh doesn’t need to have executable permissions because it is call by sh: CoreELEC/kodi-autostart.service at coreelec-19 · CoreELEC/CoreELEC · GitHub
This way user can add this file over samba and doesn’t need to care for permissions

2 Likes

@TheCoolest
Hey. Hey. I’d like to ask. I’d like to have my X96max+ box turned on its back. Is it possible to edit the vfd file so that the display is rotated 180°? Thank you.
I am using this vfd.:

# X96 Max (S905X2) configuration
#--------------------

vfd_gpio_clk='0,65,0’
vfd_gpio_dat='0,64,0’
vfd_gpio_stb='1,10,0’

vfd_chars='4,0,1,2,3’

vfd_dot_bits='0,1,2,3,4,5,6’

vfd_display_type='0x02,0x00,0x01,0x00’

I think it is possible after such information that at the beginning the vfd display shows upside down

Please read through this.

Does anyone know why my clock display black out after resume from standby.

I installed a coreelec update yesterday, and the commend you added:
reboot after an update if the VFD screen is blank.
Is indeed correct, the reboot was required after the update.
The screen is still working to this day, so once again thanks for the help :heart:

PS. I just noticed, why are some of my post marked as spam?

IS there a VFD for the Beelink GTKing Pro?

Have you looked here?

No, the Beelink GTKing Pro doesn’t have a display.