pfSense Gold Subscription

Author Topic: Advantech FWA-3305 LCD and Keypad  (Read 168 times)

0 Members and 1 Guest are viewing this topic.

Offline EricNZ

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Advantech FWA-3305 LCD and Keypad
« on: November 05, 2017, 04:38:55 pm »
Has anyone managed to get the LCD and keypad on the Advantech FWA03305 Atom-based firewall appliance working with pfSense ? 

The FWA-3305 has a "NAMB-6200B LCMP" module comprising a front panel Keyboard/Interface board with an embedded microcontroller which drives the separate LCD module. 
  • The Keyboard/Interface board  is driven from the standard LPT port on the motherboard of the FWA-3305.
  • The LCD module looks like a standard two row sixteen character 1602 type parallel interface LCD module.
  • The front panel keyboard has left/right/up/down/Enter keys plus power and HDD LEDs.
   
My problem is that I'm not at all familiar with implementing drivers under Linux and have limited competence in 'C' coding.

Advantech do have some driver code and primitive code samples available at the following link but, I don't know how to implement that for pfSense on FreeBSD :

http://support.advantech.com/support/DownloadSRDetail_New.aspx?SR_ID=1-368RD2&Doc_Source=Download

There is also a PDF file on the NAMB-6200B LCM module available at:

http://advdownload.advantech.com/productfile/Downloadfile4/GF-22QFM/NAMB-6200B%20LCMP%20user%20notes%20ed1.pdf

I have looked at and downloaded the latest version of lcdproc for FreeBSD 11 but am unsure how to proceed.

Any suggestions or help would be greatly appreciated.  The BIOS already momentarily displays a memory type message on boot up, but that disappears when pfSense starts executing and it simply displays a flashing block cursor.  This is a freate low-power firewall appliance and it would be really good to have this keypad and display usable to from the front panel to show pfSense status information, etc.

Eric




Offline fmertz

  • Full Member
  • ***
  • Posts: 157
  • Karma: +16/-0
    • View Profile
    • Github
Re: Advantech FWA-3305 LCD and Keypad
« Reply #1 on: November 06, 2017, 12:26:48 pm »
Try first with the purpose-built sdeclcd driver. It is purpose-made for the Watchguard appliances and goes back a long time. It is also a parallel port implementation, and could just work. This driver has support for only 4 of the 5 keypad buttons though...

The other option is to read-up on the various options for the more general purpose HD44780 driver. That driver offers support for a number of wiring options. With luck, the specific wiring of this unit will match something that is already there and just work.

Worst case, the lcdproc code will have to be compared with the vendor samples and possibly modified in a manner that does not break support for other models (this is a development activity). A prerequisite would probably be to build these vendor samples and check that they actually work for your unit.

Best of luck, keep us posted.

Offline EricNZ

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Advantech FWA-3305 LCD and Keypad
« Reply #2 on: November 06, 2017, 01:11:27 pm »
Thank you for the response and the suggestion - appreciated.

I will try the sdeclcd driver first.

Offline EricNZ

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Advantech FWA-3305 LCD and Keypad
« Reply #3 on: November 06, 2017, 07:09:47 pm »
I deleted what I'd done directly in FreeBSD with the package manager (including the .conf sample files and my edited versions) and then installed the package pfSense=pkg-LCDproc using pfSense's Package Manager.

That created a new LCDproc menu item for configuration under the Services heading and installed the Server and Client daemons:
    pfSense-pkg-LCDproc: 0.10.5 [pfSense]
    lcdproc: 0.5.7_2 [pfSense]
    the sample configuration files (LCDd.conf.sample, lcdproc.conf.sample and lcdexec.conf.sample)

I then proceeded to set the configuration parameters in both the Server and Screens pages:

Set the following under Server:
  Enable = ticked
  Display size = 2 rows 16 columns
  Driver - Watchguard Firebox with SDEC
  Refresh Frequency   5 seconds
  Brightness = Default
  Contrast = Default
  Backlight = Default
  Off Brightness = Default

Set the following under Screens:
Version = ticked

I expected that setting these parameters would create appropriate .conf files in the /usr/local/etc/ directory, but this didn't happen.  Furthermore the lcdproc service didn't autostart, and attempting to manually start it didn't work either - the System Log shows these entries:
  Nov 7 13:24:13    php-fpm    83520    lcdproc: Sync: End package sync
  Nov 7 13:24:13    php-fpm    83520    lcdproc: Sync: Begin package sync

Questions:
  • What files did the pfSense configuration screens write to or create?
  • What other files do I need to manually create or edit?
  • What log file on FreeBSD can I examine to diagnose why the service(s) didn't start?
  • What else am I missing here?

Thanks,
Eric

Offline fmertz

  • Full Member
  • ***
  • Posts: 157
  • Karma: +16/-0
    • View Profile
    • Github
Re: Advantech FWA-3305 LCD and Keypad
« Reply #4 on: November 06, 2017, 07:58:51 pm »
I would say start with the base FreeBSD lcdproc package. Run "LCDd" as root, with the parameters you want. You will need to point to a (small) config file, say, in /tmp. The config file needs to list the driver file. I believe LCDd alone display a server screen that should show if this driver works. I like to keep the server in the foreground, and turn the debug level up. In a separate session, you can start a client, like "lcdproc" with a few screens.

Let us know how it works out.

Offline fmertz

  • Full Member
  • ***
  • Posts: 157
  • Karma: +16/-0
    • View Profile
    • Github
Re: Advantech FWA-3305 LCD and Keypad
« Reply #5 on: November 14, 2017, 08:07:36 pm »
Here is a bit more detail for a quick test:

Create /tmp/LCDd.conf

Code: [Select]
[server]
DriverPath=/usr/local/lib/lcdproc/
Driver=sdeclcd

[menu]
MenuKey=Escape
EnterKey=Enter
UpKey=Up
DownKey=Down

As root, start the server:

Code: [Select]
/usr/local/sbin/LCDd -r 3 -c /tmp/LCDd.conf -f
Hopefully, you will see some activity on the LCD

In a separate session, you can start a real client, for example:

Code: [Select]
/usr/local/sbin/lcdproc -h 127.0.0.1 G K
If this works, the driver is functional and you can look into something a bit more permanent.

Keep us posted.