Some more info on this project.

photo lcd_zpsvoa8efxq.jpg

The display I used here is one from Parallax Inc. (Parallax 2 x 16 Serial LCD with Piezo Speaker (Backlit) - Parallax) but any serial lcd should work just as well. Sparkfun and Matrix Orbital make very nice ones too.

Serial LCDs have an extra controller stacked on top of the otherwise parallel interface to most displays which makes them more expensive. The upside is that you can use the UART with only the single TX pin to control them. Otherwise you would have to sacrifice at least 6 GPIO pins or alternatively start bit-banging SPI or other protocols to be able to interface with the display.

The image shows how it is hooked up. GND, 5V and TX of the UART connected to RX on the backside of the LCD.

Once this is done it becomes incredibly simple to send any text to the display by just echoing to the appropriate port. (in this case /dev/ttyATH0)

Set appropriate baudrate first (in this case 19200)

stty -F /dev/ttyATH0 19200 raw -echo

Then just echo away…

echo -en "GL-iNet is awesome…" >/dev/ttyATH0

LCDProc is a nice little addon (http://lcdproc.omnipotent.net) that actually turns your box + display into a stats server for multiple other networked devices (including itself) to report their status to.

The output of it can be seen here: (HD version on G-Drive)

photo lcd4_zpsikxxqutn.gif

The package is available in the standard openwrt repository under packages/utils/lcdproc

opkg install lcdproc

Bear in mind though that it comes with a ton of drivers for various flavours of displays. In my case my particalar Parallax display wasn’t supported out of the box.

I have been able to patch the lcdproc codebase with a driver for the Parallax written by Markus Dolze but that was quite a fiddly process.

Please let me know if anybody is interested in this and I will publish the patched codebase to a Github repo (which I will do anyway as soon as I have a moment) I have put a repo of lcdproc with Parallax drivers patched into the codebase on https://github.com/jay2u/lcdproc

Also, I have attached an IPK (which you can download to your device and install with “opkg install”) straight from the package without the need for compiling anything. Get it here: https://github.com/jay2u/lcdproc/releases/download/v1.0/lcdproc_0.5.7-1_ar71xx.ipk

There is a downside to hooking up a serial display to the UART. The U-Boot boot process sends quite a constant stream of data over the serial port during boot. This is done at a rate 115200 baud by default which makes the display garble up during boot time as it is set at 19200 baud max.

After the boot process completes everything’s fine but it isn’t very elegant. The only way around that I guess would be patching u-boot to disable its serial console (not a good idea!) or going for a board with multiple UARTs.

Addendum: I have now found it is possible to compile U-Boot to be silent on normal boots and to only write to the serial console when booting with the reset button pressed. More on that later…

JW