Problem with A125 LCD board with LCDProc
-
Hi. I have a piece of equipment which uses an LCD display module from ICP electronics. The vendor provided the following document for the LCD display: https://www.filehosting.org/file/details/805293/A125_User_Manuel_revise_04.pdf
it seems the compatible driver to use with LCDProc is the icp_a106:
https://github.com/lcdproc/lcdproc/blob/master/server/drivers/icp_a106.c
"This is the LCDproc driver for the ICP Peripheral Communication Protocol used by the ICP A106 and A125 LCD boards. The A125 is used in QNAP devices"However, I'm having problems using this driver in Pfsense 2.4.4-RELEASE-p3. When I choose the driver icp_a106 and serial com port 1 (/dev/cua0) in the LCDProc settings, I am having the following errors in the syslog:
Jun 10 13:00:41 php lcdproc: Start client procedure. Error counter: (1)
Jun 10 13:00:41 php lcdproc: Failed to connect to LCDd process Operation timed out (60)
Jun 10 13:00:30 php lcdproc: Start client procedure. Error counter: (0)
Jun 10 13:00:30 LCDd Critical error while initializing, abort.
Jun 10 13:00:30 LCDd There is no output driver
Jun 10 13:00:30 LCDd Could not load driver icp_a106
Jun 10 13:00:30 LCDd Driver [icp_a106] binding failed
Jun 10 13:00:30 LCDd Could not open driver module /usr/local/lib/lcdproc/icp_a106.so: /usr/local/lib/lcdproc/icp_a106.so: Undefined symbol "ftime"
Jun 10 13:00:30 LCDd Listening for queries on 127.0.0.1:13666
Jun 10 13:00:30 LCDd Using Configuration File: /usr/local/etc/LCDd.conf
Jun 10 13:00:30 LCDd LCDd version 0.5.9 startingDoes anyone have experience with LCDProc using the same LCD display and driver?
Or could anyone point me in the right direction in how to fix the error in opening the driver module?Kind regards
-
@riken said in Problem with A125 LCD board with LCDProc:
Or could anyone point me in the right direction in how to fix the error in opening the driver module?
Yep, making it happy : it can't find a symbol ( probably the function 'ftime' from ftime ) so I guess it depends on another library.
-
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.