Tested on: Sophos XG 450 hardware, OPNsense 26.7.9 (FreeBSD 15.1), lcdproc 0.5.9 (pulled in by os-lcdproc-sdeclcd 1.1).
The problem
The os-lcdproc-sdeclcd plugin starts LCDd with the sdeclcd driver, which talks to the display through a parallel port. The XG 450 has no parallel port, so the display stays on "Sophos Protection".
On the XG 450 the display is an EZIO module on the second serial port (uart1, /dev/cuau1, 2400 baud). The stock hd44780 driver of lcdproc handles it with ConnectionType=ezio, including the 4 front buttons.
1. Install the plugin (for the lcdproc package)
System > Firmware > Plugins > install os-lcdproc-sdeclcd
2. Create /usr/local/etc/LCDd-ezio.conf
This file is not owned by the plugin, so plugin updates do not overwrite it.
3. Start it at boot: /usr/local/etc/rc.syshook.d/start/60-lcd-ezio
The plugin's own hook (50-lcdproc-sdeclcd) runs first; this one runs after it and restarts LCDd with the EZIO config.
Buttons
If your unit differs (other XG models or revisions)
The problem
The os-lcdproc-sdeclcd plugin starts LCDd with the sdeclcd driver, which talks to the display through a parallel port. The XG 450 has no parallel port, so the display stays on "Sophos Protection".
On the XG 450 the display is an EZIO module on the second serial port (uart1, /dev/cuau1, 2400 baud). The stock hd44780 driver of lcdproc handles it with ConnectionType=ezio, including the 4 front buttons.
1. Install the plugin (for the lcdproc package)
System > Firmware > Plugins > install os-lcdproc-sdeclcd
2. Create /usr/local/etc/LCDd-ezio.conf
This file is not owned by the plugin, so plugin updates do not overwrite it.
Code Select
[server]
DriverPath=/usr/local/lib/lcdproc/
Driver=hd44780
Bind=127.0.0.1
Port=13666
ReportToSyslog=yes
User=nobody
Foreground=no
Hello=" Welcome to"
Hello=" OPNsense!"
GoodBye="Thanks for using"
GoodBye=" OPNsense!"
WaitTime=5
ServerScreen=off
Backlight=on
ToggleRotateKey=Enter
PrevScreenKey=Up
NextScreenKey=Down
[menu]
MenuKey=Escape
EnterKey=Enter
UpKey=Up
DownKey=Down
[hd44780]
ConnectionType=ezio
Device=/dev/cuau1
Speed=2400
Size=16x2
Keypad=yes
# Front buttons as measured on an XG 450
KeyMatrix_4_4=Enter
KeyMatrix_4_2=Escape
KeyMatrix_4_3=Up
KeyMatrix_4_1=Down
3. Start it at boot: /usr/local/etc/rc.syshook.d/start/60-lcd-ezio
The plugin's own hook (50-lcdproc-sdeclcd) runs first; this one runs after it and restarts LCDd with the EZIO config.
Code Select
#!/bin/sh
killall lcdproc >/dev/null 2>&1
killall LCDd >/dev/null 2>&1
sleep 1
/usr/local/sbin/LCDd -c /usr/local/etc/LCDd-ezio.conf </dev/null >/dev/null 2>&1
sleep 2
/usr/local/bin/lcdproc -s 127.0.0.1 -p 13666 C M D L </dev/null >/dev/null 2>&1
Then:Code Select
chmod 755 /usr/local/etc/rc.syshook.d/start/60-lcd-ezio
/usr/local/etc/rc.syshook.d/start/60-lcd-ezio
C M D L = CPU, memory, disk, load screens (see lcdproc -h for others).Buttons
- Up / Down: previous / next screen
- ENTER: stop / resume screen rotation
- ESC: LCDd menu
If your unit differs (other XG models or revisions)
- Check the serial ports: dmesg | grep uart. uart0 is the console; the display is usually on uart1 (/dev/cuau1).
- Test with your own text: copy the config, set Foreground=yes, run LCDd -f -r 5 -s 0 -c <copy>. If the text appears, port and speed are right; garbage characters usually mean a wrong Speed.
- Finding the button codes: in the test copy add KeyMatrix_X_Y=KXY lines for X and Y from 1 to 8, run in the foreground with -r 5, press each button and look for "Key pressed: Kxy (x,y)".
- The root shell on OPNsense is csh: run multi-line snippets with sh.
"