Comments (25)
Very hard for me to understand what you were trying to do, but in the last dmest output, you can see that it successfully started the driver.
Do you have the OpenVFD Kodi addon installed? Make sure to disable the "Advanced" section, and then try again.
You can see at 434s it tries to replace the controller with a FD628 and that fails.
from linux_openvfd.
I am unaware of the addon, so i’ll try it when I get the chance. In the example though I am only trying to set up the module with modprobe, and then I try running the service. The services manages to run successfully the second time (even though it fails and errors out the first time), and it seems like the biggest issue at hand is failure to read vfd.conf parameters.
Some background on my system since I forgot to mention… im running armbian on a tx mini 3 box with a S905W chip and an FD6551 controller. I’ve noticed other people succeeded in controlling the LCD with the same model so I should be able to do the same.
from linux_openvfd.
Ah sorry, I reread what you did.
At second 323 the driver was started successfully.
At second 434 you started the test patterns, but with the wrong display type.
With that said, the FD6551 controller is not the same as the FD650 or FD655. You need to set the display type to 6, your vfd.conf has it set to FD650 (3), which is wrong.
from linux_openvfd.
Regardless of how I declare the display type, it still has issues with vfd.conf. Here's after changing the conf file, modprobe, and starting the openvfd service :
root@arm-64:~# systemctl start openvfd.service
root@arm-64:~# systemctl status openvfd.service
● openvfd.service - openvfd
Loaded: loaded (/etc/systemd/system/openvfd.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2021-12-26 09:47:06 IST; 3s ago
Process: 1637 ExecStartPre=/bin/sh -c . /root/.config/vfd.conf; /sbin/modprobe openvfd vfd_gpio_clk=$vfd_gpio_clk vfd_gpio_dat=$vfd_gpio_dat vfd_gpio_stb=$vfd_gpio_stb vfd_chars=$vfd_chars vfd_dot_bits=$vfd_dot_bits >
Process: 1639 ExecStart=/root/linux_openvfd/OpenVFDService $OPTS & (code=exited, status=1/FAILURE)
Process: 1640 ExecStopPost=/sbin/rmmod openvfd (code=exited, status=0/SUCCESS)
Main PID: 1639 (code=exited, status=1/FAILURE)
CPU: 34ms
Dec 26 09:47:06 arm-64 sh[1637]: [49B blob data]
Dec 26 09:47:06 arm-64 sh[1637]: [49B blob data]
Dec 26 09:47:06 arm-64 sh[1637]: [49B blob data]
Dec 26 09:47:06 arm-64 sh[1637]: [49B blob data]
Dec 26 09:47:06 arm-64 sh[1637]: [49B blob data]
Dec 26 09:47:06 arm-64 systemd[1]: Started openvfd.
Dec 26 09:47:06 arm-64 OpenVFDService[1639]: Open device failed.
Dec 26 09:47:06 arm-64 OpenVFDService[1639]: : No such file or directory
Dec 26 09:47:06 arm-64 systemd[1]: openvfd.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 09:47:06 arm-64 systemd[1]: openvfd.service: Failed with result 'exit-code'.
[1]+ Stopped systemctl status openvfd.service
root@arm-64:~# systemctl start openvfd.service
root@arm-64:~# systemctl status openvfd.service
● openvfd.service - openvfd
Loaded: loaded (/etc/systemd/system/openvfd.service; disabled; vendor preset: enabled)
Active: active (running) since Sun 2021-12-26 09:48:13 IST; 1s ago
Process: 1656 ExecStartPre=/bin/sh -c . /root/.config/vfd.conf; /sbin/modprobe openvfd vfd_gpio_clk=$vfd_gpio_clk vfd_gpio_dat=$vfd_gpio_dat vfd_gpio_stb=$vfd_gpio_stb vfd_chars=$vfd_chars vfd_dot_bits=$vfd_dot_bits >
Main PID: 1662 (OpenVFDService)
Tasks: 3 (limit: 787)
Memory: 232.0K
CPU: 50ms
CGroup: /system.slice/openvfd.service
└─1662 /root/linux_openvfd/OpenVFDService -12h &
Dec 26 09:48:13 arm-64 systemd[1]: Starting openvfd...
Dec 26 09:48:13 arm-64 sh[1656]: [48B blob data]
Dec 26 09:48:13 arm-64 sh[1656]: [49B blob data]
Dec 26 09:48:13 arm-64 sh[1656]: [49B blob data]
Dec 26 09:48:13 arm-64 sh[1656]: [49B blob data]
Dec 26 09:48:13 arm-64 sh[1656]: [49B blob data]
Dec 26 09:48:13 arm-64 sh[1656]: [49B blob data]
Dec 26 09:48:13 arm-64 sh[1656]: [49B blob data]
Dec 26 09:48:13 arm-64 systemd[1]: Started openvfd.
lines 1-20/20 (END)
Notice if I run systemctl start openvfd.service right after, it magically succeeds and starts the service. This time I set it to the right controller, but it still bugs out and refuses to actually do anything when I run the demo code:
root@arm-64:~/linux_openvfd# ./OpenVFDService -t -dt 1
Display type 0x00000001
Initializing...
Process ID = 1702
dmesg:
[ 138.859789] OpenVFD: Version: V1.4.0
[ 138.859814] OpenVFD: vfd_gpio_clk: #0 = 0x00; #1 = 0x4C; #2 = 0x00;
[ 138.859827] OpenVFD: vfd_gpio_dat: #0 = 0x00; #1 = 0x4B; #2 = 0x00;
[ 138.859838] OpenVFD: vfd_gpio_stb: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 138.859849] OpenVFD: vfd_gpio0: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 138.859861] OpenVFD: vfd_gpio1: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 138.859872] OpenVFD: vfd_gpio2: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 138.859883] OpenVFD: vfd_gpio3: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 138.859893] OpenVFD: vfd_gpio_protocol: #0 = 0x00; #1 = 0x00;
[ 138.859908] OpenVFD: vfd_chars: #0 = 0x02; #1 = 0x01; #2 = 0x02; #3 = 0x03; #4 = 0x04;
[ 138.859927] OpenVFD: vfd_dot_bits: #0 = 0x00; #1 = 0x01; #2 = 0x02; #3 = 0x03; #4 = 0x04; #5 = 0x05; #6 = 0x06;
[ 138.859940] OpenVFD: vfd_display_type: #0 = 0x06; #1 = 0x00; #2 = 0x00; #3 = 0x06;
[ 138.859952] OpenVFD: Detected gpio chips: periphs-banks, aobus-banks.
[ 138.859965] OpenVFD: "periphs-banks" chip found. base = 401, pin count = 100, pin = 76, offset = 477
[ 138.859975] OpenVFD: "periphs-banks" chip found. base = 401, pin count = 100, pin = 75, offset = 476
[ 138.859981] OpenVFD: Skipping vfd_gpio_stb evaluation (0xFF)
[ 138.859986] OpenVFD: Skipping vfd_gpio0 evaluation (0xFF)
[ 138.859991] OpenVFD: Skipping vfd_gpio1 evaluation (0xFF)
[ 138.859996] OpenVFD: Skipping vfd_gpio2 evaluation (0xFF)
[ 138.860001] OpenVFD: Skipping vfd_gpio3 evaluation (0xFF)
[ 138.860836] OpenVFD: Select FD6551 controller
[ 138.860932] OpenVFD: SW I2C interface intialized (address = 0x0000 (N/A), MSB mode, pull-ups off)
[ 215.273857] OpenVFD: Select FD628 controller
[ 215.274178] OpenVFD: SW SPI 3-wire interface failed to intialize. Invalid CLK (477), DAT (476) or STB (-2) pins
[ 215.274182] OpenVFD: Failed to initialize the controller, reverting to Dummy controller
[ 215.274515] OpenVFD: openvfd_dev_write: count = 14, sizeof(data) = 660
[ 223.857358] OpenVFD: openvfd_dev_write: count = 14, sizeof(data) = 660
It seems you're right about the conf file in that it does get passed the second time around. Executing the test demo however always results in this:
[ 39.901090] OpenVFD: Select FD6551 controller
[ 39.901163] OpenVFD: SW I2C interface intialized (address = 0x0000 (N/A), MSB mode, pull-ups off)
[ 87.701927] OpenVFD: Select FD628 controller
[ 87.702363] OpenVFD: SW SPI 3-wire interface failed to intialize. Invalid CLK (477), DAT (476) or STB (-2) pins
[ 87.702369] OpenVFD: Failed to initialize the controller, reverting to Dummy controller
[ 87.702977] OpenVFD: openvfd_dev_write: count = 14, sizeof(data) = 660
[ 96.267371] OpenVFD: openvfd_dev_write: count = 14, sizeof(data) = 660
At 87 I ran the demo script and it instantly changed the controller.
from linux_openvfd.
Update:
I enabled openvfd.service with systemctl so it starts on boot. It got rid of the error modprobe throws me, and it seems that the module + service are working fine. When I run the demo, however, I get the exact same issue as #6.
from linux_openvfd.
- If you don't get anything on the display after startup when the driver first loads, it means that your configuration is incorrect. Most likely the pins used.
-dt 1
is not the correct configuration to use. You only really need to run the test mode if you get something on the screen but the numbers are garbled. You need to construct the -dt numeric value as a hexadecimal uint32 value. ie:-dt 0x06000002
is the equivalent of what you've posted in #6 about what's in your DTB.
from linux_openvfd.
That seems to be the case. I have a TX 3 mini yet the vfd.conf file from this library, as well as the one from this library don't seem to work. Service runs properly and identifies the FD6551 controller- just no output.
from linux_openvfd.
After executing cat /sys/kernel/debug/gpio
on the working Android build:
GPIOs 145-154, platform/c1109880.pinmux, ao-banks:
gpio-147 (gpio_key ) in hi
GPIOs 155-255, platform/c1109880.pinmux, banks:
gpio-178 (fd655_dev ) out hi
gpio-180 (fd655_dev ) out hi
(more unrelated gpio pins)
So it seems that my LCD is connected through GPIO 178 and 180, with 147 being the stb pin?
from linux_openvfd.
FD65xx series use I2C-type of protocol, only pins 178 and 180 are used.
That translates to pins (178-155) = 23 and (180-155) = 25 (10 base) in the configuration
from linux_openvfd.
from linux_openvfd.
Figured it out. I set my clock and data pins as follows (for the FD6551 controller):
vfd_gpio_clk='0,0x17,0'
vfd_gpio_dat='0,0x19,0'
vfd_gpio_stb='0,0,0'
and ran
./OpenVFDService -t -dt 0x06000002
from linux_openvfd.
So does that work now?
from linux_openvfd.
It displays stuff but irregularly. I’m playing around with the display type and vfd chars setting but no luck so far. Running a tx3 mini with a FD6551 controller. Setting the last display type variable to 0x06 successfully selects the controller, but the display still makes little sense and i’m unsure how to assign ‘vfd_chars’
from linux_openvfd.
Try different combinations of 0x0600000x.
From 0x06000000 to 0x06000009, one should work and display readable numbers/ascii chars.
Once you got that down, you'll need to figure out the order of chars. It's either 0 1 2 3 4
or 4 3 2 1 0
in most cases, but not all.
The test patterns should help you figure out the correct order, although it can be confusing a bit sometimes.
from linux_openvfd.
And also, the unused (stb) pin should be 0, 0, 0xFF
from linux_openvfd.
@arthur-liberman I will try it out tomorrow. Also, shouldn’t the last value be 06, as in 0x00000006
since the last value represents the controller? Can you provide a list of displays corresponding to their values?
from linux_openvfd.
No. The MSB represents the controller, the LSB represents the display type.
In the vfd.conf, the first number is the LSB.
from linux_openvfd.
My stb pin was indeed set to 0, 0, 0xFF as you stated. It seems like my display type is most likely 0x0600002 as it succeeded in displaying all the numbers and letters in test mode. I've properly configured display_type
and vfd_chars
, so far the demo seems to be working flawlessly. I've also tested test_led commands and 6-11 all work.
Now I'm curious how I can make it display custom messages instead of just time.
from linux_openvfd.
Take a look at this repo for more info:
https://github.com/arthur-liberman/service.openvfd
I don't remember whether I exposed writing custom text to the driver, but I think I did. It's probably not part of the service.openvfd, but should be accessible in a similar fashion.
from linux_openvfd.
Entirely unsure what to do with that repo- it's a kodi addon and I'm on armbian. I'll go over the source code to see what I can do.
from linux_openvfd.
It's python, and you basically write to a sysfs file.
from linux_openvfd.
root@arm-64:~/service.openvfd# python3 service.py Traceback (most recent call last): File "/root/service.openvfd/service.py", line 18, in <module> import xbmcaddon ModuleNotFoundError: No module named 'xbmcaddon'
Seems like im missing a kodi library
from linux_openvfd.
What I meant is that the code is in python, you can read it to understand what to do.
from linux_openvfd.
Hello arthur, the similar issue with this topic on my tanix tx6 box which is allwinner H6 SOC based, I am running on android, the LED controller is FD650 and no indication on the LED. The dmesg copied below, I used the contents from vfd.conf and phased in sysconfig.fex (device tree for android) for android rom pack. The dmesg always show "OpenVFD: Select Dummy controller" and I cannot switch to controller FD650. Can you please have a look? Thank you.
vfd.conf:
;This file must be renamed to vfd.conf and placed in the /storage/.config/ folder.
;
; Tanix TX6 - Allwinner H6 configuration
;--------------------
;gpio_xxx:
; [0] 0 = &gpiochip0, 1 = &gpiochip1.
; [1] pin number
; [0] Reserved - must be 0.
vfd_gpio_clk='1,229,0'
vfd_gpio_dat='1,230,0'
vfd_gpio_stb='0,0,0xFF'
vfd_gpio_chip_name='300b000.pinctrl'
;chars:
; < DHHMM > Order of display chars (D=dots, represented by a single char)
vfd_chars='2,4,3,2,1'
;dot_bits:
; Order of dot bits. Typical configurations:
; Display Type 0, 1 usually has Alarm, USB, Play, Pause, Col, Ethernet, Wifi dots
; Alarm = 0, USB = 1, Play = 2, Pause = 3, Col = 4, Eth = 5, Wifi = 6
; Display Type 2 usually has APPS, USB, SETUP, CARD, Col, HDMI, CVBS dots
; APPS = 0, USB = 1, SETUP = 2, CARD = 3, Col = 4, HDMI = 5, CVBS = 6
; Display Type 3 Power, LAN, Col, Low Wifi, High Wifi
; N/A = 0, N/A = 1, Power = 2, LAN = 3, Col = 4, Low Wifi = 5, High Wifi = 6
vfd_dot_bits='0,1,2,3,4,5,6'
;display_type:
; [0] - Display type.
; [1] - Reserved - must be 0..
; [2] - Flags. (bit 0 = '1' - Common Anode display)
; [3] - Controller.
vfd_display_type='0x01,0x00,0x00,0x03'
dmesg:
[ 7.830385] OpenVFD: Version: V1.4.1
[ 7.834328] OpenVFD: vfd_gpio_clk: Empty.
[ 7.838838] OpenVFD: vfd_gpio_dat: Empty.
[ 7.843617] OpenVFD: vfd_gpio_stb: Empty.
[ 7.848119] OpenVFD: vfd_gpio0: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 7.857572] OpenVFD: vfd_gpio1: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 7.864588] OpenVFD: vfd_gpio2: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 7.873018] OpenVFD: vfd_gpio3: #0 = 0x00; #1 = 0x00; #2 = 0xFF;
[ 7.880416] OpenVFD: vfd_gpio_protocol: #0 = 0x00; #1 = 0x00;
[ 7.887442] OpenVFD: vfd_chars: Empty.
[ 7.892095] OpenVFD: vfd_dot_bits: Empty.
[ 7.896809] OpenVFD: vfd_display_type: Empty.
[ 7.902171] OpenVFD: Detected gpio chips: pio, r_pio.
[ 7.910410] OpenVFD: Failed to verify VFD configuration file, attempt using device tree as fallback.
[ 7.921209] OpenVFD: openvfd_gpio_clk: pin = 229, flags = 0xE5
[ 7.927650] OpenVFD: openvfd_gpio_dat: pin = 230, flags = 0xE6
[ 7.934653] OpenVFD: openvfd_gpio_stb pin entry not found
[ 7.940929] OpenVFD: openvfd_gpio0 pin entry not found
[ 7.946594] OpenVFD: openvfd_gpio1 pin entry not found
[ 7.983617] OpenVFD: openvfd_gpio2 pin entry not found
[ 7.989587] OpenVFD: openvfd_gpio3 pin entry not found
[ 7.995901] OpenVFD: chars_prop = ffffffc0bbfde618
[ 8.001867] OpenVFD: chars_prop->length = 11
[ 8.006567] OpenVFD: char #0: 50
[ 8.010277] OpenVFD: char #1: 44
[ 8.014072] OpenVFD: char #2: 52
[ 8.017606] OpenVFD: char #3: 44
[ 8.021380] OpenVFD: char #4: 51
[ 8.025367] OpenVFD: char #5: 44
[ 8.028878] OpenVFD: char #6: 50
[ 8.032686] OpenVFD: dot_bits_prop = ffffffc0bbfde648
[ 8.038266] OpenVFD: dot_bits_prop->length = 15
[ 8.043504] OpenVFD: dot_bit #0: 48
[ 8.047344] OpenVFD: dot_bit #1: 44
[ 8.051350] OpenVFD: dot_bit #2: 49
[ 8.055198] OpenVFD: dot_bit #3: 44
[ 8.059047] OpenVFD: dot_bit #4: 50
[ 8.063124] OpenVFD: dot_bit #5: 44
[ 8.066964] OpenVFD: dot_bit #6: 51
[ 8.070958] OpenVFD: dot_bit #7: 44
[ 8.074799] OpenVFD: dot_bit #8: 52
[ 8.078640] OpenVFD: dot_bit #9: 44
[ 8.082776] OpenVFD: dot_bit #10: 53
[ 8.086766] OpenVFD: dot_bit #11: 44
[ 8.090862] OpenVFD: dot_bit #12: 54
[ 8.094806] OpenVFD: dot_bit #13: 39
[ 8.098755] OpenVFD: dot_bit #14: 0
[ 8.102850] OpenVFD: display.type = 51, display.controller = 48, pdata->dev->dtb_active.display.flags = 0x78
[ 8.115436] OpenVFD: Select Dummy controller
[ 8.143211] no ioctl found(cmd:0x13) in disp_unregister_compat_ioctl_func
[ 8.143423] init: Starting service 'openvfd'...
from linux_openvfd.
Closing due to lack of activity. Please let me know if you still have an issue with the latest commits pushed recently.
from linux_openvfd.
Related Issues (20)
- Display something other then the time? HOT 4
- Warning and error while compiling driver HOT 5
- No display with HK1 Box On Armbian HOT 9
- How to enter a port number greater than 255? HOT 9
- No LED indication on tanix tx6 android box HOT 6
- Kernel module name collision HOT 1
- Patch of_get_named_gpio_flags on latest kernels HOT 2
- License HOT 1
- OLED stays off when device comes out of suspend HOT 1
- Upstream into the kernel HOT 3
- What is the required file ? HOT 1
- RK3566 - "periphs-banks" chip not found (multiple banks issue, new $ARCH?) HOT 2
- Cannot paste vfd.conf into storage/config folder
- Missing gpiochip_find() when compiling on newer kernels HOT 9
- OpenVFD: Failed to verify VFD configuration file, attempt using device tree as fallback. HOT 3
- Q: How to compile? HOT 20
- Auto switch to wrong controller HOT 8
- Problems configuring X96 Air Q1000 VFD display HOT 43
- vfd.conf - correct pin numbers and Display Type setting HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linux_openvfd.