New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sdeclcd patch for Watchguard XTM 5 button mapping #115
Comments
The sdeclcd driver implements the same protocol as HD44780 with lcm162 connection type. With that driver you don't have the backlight timeout and IIRC you can set the key mapping from the configuration file. Seems like using that is your simplest option. I'm not too happy with having two drivers implementing the same protocol anyway. |
Thanks, will test. I agree, if the other driver works, there would be no need for two drivers, as long as there's nothing special being done. It seems that others were here before me: |
I've tried hd44780 with lcm162, the LCD works but the backlight and buttons don't, the backlight is off (enabled in conf file) and the keys are dead (on startup "Up" is displayed so maybe the line that expects the key Up is connected to somewhere else). Tried with KeyMatrix_(1,2)(1,2) and KeyDirect(1-4). |
Ugh, I just noticed that KeyDirect at all was documented in 2002 but never implemented. No wonder we have so many different drivers for very similar hardware. Looks like I have been wrong with my suggestion. Some bigger cleanup would be necessary to fix this mess. |
Author of the SDEC driver here. The key mapping was discovered long ago, when these XTM5 models started rolling off data centers at EOL. I wrote "detection" code a long time back to try and have this re-wiring handled at runtime but never submitted it for inclusion with lcdproc. The detection was OS-specific (code for Linux and other code for BSD). The code is probably still around on my github repo. As the various Watchguard boxes involve different chipsets, the detection of the southbridge was all that was required. I also had code to handle the Armed/Disarmed LEDs, but as there was nothing obvious in the lcdproc client protocol to control them, it did not seem like a natural fit for this driver. For the backlight timeout, the original SDEC spec suggested a short half life, so this code made some sense. Several users reported actual burned out back lights as these older models aged. I did not want this code to contribute to those failures. As the backlight hardware improved, it made less sense, clearly. As time went on, it is probably safe to say that not very many of these original older 32-bit models are still around (x-peak, x-core, etc.) in a meaningful capacity, but I am reluctant to just break backward compatibility. I see the path forward in 2 possible directions:
I have thought about this for a while, and I am leaning toward path 2, but input is welcome. |
Option 2 is better IMO. I'd prefer a configurable backlight that can be turned on/off and a timeout that can be disabled. I haven't looked if any backlight support is already in the driver or if it'd need to be added. |
Obviously I prefer option 2 too. I wouldn't fork lcm162 into a new connection type just for testing. However since @jjakob reported incompatibilities in backlight wiring, it might make sense. If you think you can add everything to hd44780 and lcm162 without breaking other HW support, then I suggest to go for it even if it is untested. If you notice some serious incompatibilities, then of course a new connection type is in order. As for controling extra LEDs, there actually is the "output" command for that in the client language. Though it seems nobody is using it at the moment and it isn't really specified well. I think the building blocks are there, so shouldn't be too difficult to work on that. |
Have you tried the "8bit" connection type? Just browsing through the code, it seems closer to the SDEC. |
@fmertz I can't remember which connection type it was, but the display part worked fine, only the backlight and keys didn't. |
I had to do this to get the buttons mapped correctly on WG XTM 5 series boxes:
It appears that they're still connected to the same pins but labelled differently on the front panel.
If the box model could be detected at runtime the correct mapping could be chosen automatically, but so far this needs to be patched at compile time. If anyone has any idea how to do that I could assist with testing on my HW (I have a few of these).
Also, if you want the backlight to stay on all the time / disable the timeout:
The ~3K hr. half-life applies only to EL, the XTM uses LEDs which have a half-life of 50-70K hr. (source) so IMO it's more convenient to leave it on. It can always be disabled in the menu, of course.
The text was updated successfully, but these errors were encountered: