Problem with A125 LCD board with LCDProc
-
How exactly are you using that driver? What have you done to enable it?
Steve
-
Hi Stephenw10,
I installed and enabled LCDProc, chose serial COM port 1 (/dev/cua0), chose 2 rows 16 columns as display size, I then select icp_a106 as the driver and 1200bps as the port speed. After which, I went to status->services and started the LCDProc service. -
Ah, ok, a pfSense package ....
-
Hmm, yeah I'm seeing that too with that driver. I have no way of testing that driver but I expect it to load without throwing that error. I was testing in 2.5 too so nothing has been fixed upstream for FreeBSD 12
I would try to compile it in FreeBSD 11.2 and see if it loads there.Steve
-
Hi Stephen,
Thanks for the reply. I compiled the driver in a FreeBSD 11.2 and it has the same error. Out of curiosity, I also tried LCDProc in Linux and the driver loads ok and the LCD worked. Thanks! -
Hmm, not pfSense specific then. Well I would try to add whatever lib/include is missing in FreeBSD 11.2 to get it to compile.
If you find that it should be relatively easy to include it in the pfSense package. Assuming it's not something huge with other implications.Steve
-
Per: BSD Library Functions Manual FTIME(3)
It looks like this function is implemented in libcompat. For now, you may have to look if this library is there on the pfSense host, or if you have to install it based on a package or even move it from a generic FreeBSD system at the same version. You may also have to play with LD_LIBRARY_PATH so the loader knows where to find it.
obsoleted by gettimeofday(2).
Separately, this function is to be replaced by gettimeofday in the source. Feel free to open an issue with upstream lcdproc on Github.
Thanks.
-
I made a code change to this driver to replace the call to ftime(). A compiled version is attached. Let me know if it works and I will do a pull request with lcdproc.
<The attachment was not confirmed to work, so it was removed>
-
@fmertz
Thank you so much for your reply. I tried the driver, however, I am having the following error:Jun 25 20:47:42 LCDd Critical error while initializing, abort.
Jun 25 20:47:42 LCDd There is no output driver
Jun 25 20:47:42 LCDd Could not load driver icp_a106
Jun 25 20:47:42 LCDd Driver [icp_a106] init failed, return code -1
Jun 25 20:47:42 LCDd Listening for queries on 127.0.0.1:13666
Jun 25 20:47:42 LCDd Using Configuration File: /usr/local/etc/LCDd.conf
Jun 25 20:47:42 LCDd LCDd version 0.5.9 startingIs there anything that you want me to try?
TIA
-
The attachment is a normal zip file that contains the actual (64-bit!) driver file icp_a106.so
$ unzip -l icp_a106.zip Archive: icp_a106.zip Length Date Time Name --------- ---------- ----- ---- 14534 2019-06-25 07:27 icp_a106.so --------- ------- 14534 1 file $ file icp_a106.so icp_a106.so: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, not stripped
Double check the file is transferred correctly (binary mode), and has the same permissions as other driver files in the same directory.
Alternative is to get the updated source file and recompile the driver from source, as you did earlier. New file is here:
-
That compiled for 11.2?
-
Yes, the attachment is the lcdproc icp_a106 driver code compiled in a FreeBSD 11.2 virtual machine. The driver file itself (icp_a106.so) was added to the zip archive (icp_a106.zip).
-
@fmertz, Good morning. Apology for the late reply. I would like to report that the driver is working when I compiled it. Thank you very much! LCDProc is now working with A125 LCD using the updated drivers that you've provided. I really appreciate all the help from you guys.
-
Thanks for the feedback. Were you able to confirm that the "long presses" are actually working? It seems the device has only 2 buttons, and that the second button is used for both Up and Down. Down seems to be the short press (< 300 ms), and Up the press and hold. The code change consists of re-calculating how long the button is pressed.
switch (i) { case 0: // Button 1 if (mschange < 300) button = "Enter"; else button = "Escape"; break; case 1: // Button 2 if (mschange < 300) button = "Down"; else button = "Up"; break;
-
Hi @fmertz ,
Good morning. In the equipment that I am using, the up button acts as the "enter" button, the down button in short press navigates the menu downwards while the down button in long press navigates the menu upwards. If you need more clarification or if you need me to do some more testing with the buttons, please let me know.
Thank you.
-
Thanks for the confirmation. The Github pull request for this code fix has been accepted and is now part of the upstream lcdproc code base.
@riken said in Problem with A125 LCD board with LCDProc:
In the equipment that I am using, the up button acts as the "enter" button, the down button in short press navigates the menu downwards while the down button in long press navigates the menu upwards.
As per your description, the code does not seem to mirror the Up and Down buttons you describe. Would it be more intuitive to keep the behavior of the Up and Down buttons as simply Up and Down for short presses, and then do Escape and Enter for long presses? Maybe a picture of the hardware would help. I can do a quick code change you can compile to see if this would work. Let me know. Thanks.
-
@fmertz ,
Yes, I honestly feel that it will be better if the Up and Down buttons are just Up and Down for short presses and the Escape / Enter is done by long presses. I will definitely test your code change and provide feedback as necessary.
Thank you very much.
-
@riken said in Problem with A125 LCD board with LCDProc:
@fmertz ,
Yes, I honestly feel that it will be better if the Up and Down buttons are just Up and Down for short presses and the Escape / Enter is done by long presses. I will definitely test your code change and provide feedback as necessary.
The updated source is here:
server/drivers/icp_a106.cThanks for any feedback.
-
@fmertz
Hi, Sorry for the very late feedback on the updated driver. I have tested the new driver you've provided and IMHO it's better than the previous driver. For example, I can enter the menu using a long press and increase or decrease the title-speed using short presses.Kind regards
-
According to the Github history of this driver code, the button support was added to the original A106 driver to support the A125/QNAP devices.
A random Qnap Network Attached Storage from Amazon shows Enter/Select, same as in the existing code:
Can you attach the actual documentation file from the vendor (the link above is a pain)? Maybe you have an original A106 with different button labels? A picture would help. Thanks.