Welcome! Log In Create A New Profile

Advanced

Build-in 2 by 16 character front display on Netgear ReadyNAS RN104

Posted by tme 
tme
Build-in 2 by 16 character front display on Netgear ReadyNAS RN104
January 16, 2023 01:23AM
The Netgear ReadyNAS RN104 has a 2 by 16 character display. It's a Winstar WH1602G LCD. Pictures here. U-boot (v2011.12) writes "NETGEAR Storage Welcome" on the display when it starts, and "Booting.." before booting Linux. This latter text sticks since Linux makes no effort to change it.

The display is defined like this in the dts file:
	auxdisplay {
		compatible = "hit,hd44780";
		data-gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>,
				<&gpio1 26 GPIO_ACTIVE_HIGH>,
				<&gpio1 27 GPIO_ACTIVE_HIGH>,
				<&gpio1 29 GPIO_ACTIVE_HIGH>;
		enable-gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
		rs-gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
		rw-gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
		backlight-gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
		display-height-chars = <2>;
		display-width-chars = <16>;
	};

There is no '/dev/fs*' framebuffer in the root file system, but '/dev/char/2:16' exist:
root@rn104:~# ls -alF /dev/char/2:16
lrwxrwxrwx 1 root root 8 Jan 14 19:04 /dev/char/2:16 -> ../ptyq0

root@rn104:~# ls -alF /dev/ptyq0
crw------- 1 root root 2, 16 Jan 14 21:00 /dev/ptyq0
root@drodle:~#

I hoped being able to send characters to this device. Tried
root@rn104:~# echo Hello world > /dev/char/2:16
but it does nothing:

Can anyone please give a hint on how to proceed?

Regards,
Trond Melen
Re: Build-in 2 by 16 character front display on Netgear ReadyNAS RN104
January 16, 2023 09:47PM
First suggestion would be to ensure that the driver has actually loaded. Initialization of the charlcd driver has the following:
 charlcd_puts(lcd, "\x1b[Lc\x1b[Lb\x1b[L*Linux-" UTS_RELEASE "\n");
This should print the linux version on the display if the module loaded correctly.

The (un)official LCD4Linux Wiki could be another source for answers to your question.
tme
Re: Build-in 2 by 16 character front display on Netgear ReadyNAS RN104
January 17, 2023 02:44AM
Thanks raynight, for your hints!

'lcd4linux' may become useful:
tme@rn102:~$ sudo apt install -y lcd4linux

tme@rn102:~$ sudo lcd4linux -l | egrep -i 'Winstar|WH1602G|hd44780|hit'
   BWCT                : BWCT USB to HD44780 interface
   HD44780             : generic Noritake Soekris HD66712 LCM-162 
   LCD2USB             : LCD2USB homebrew USB interface for HD44780 text displays
   LCDTerm             : LCDTerm serial-to-HD44780 adapter board
   PHAnderson          : PHAnderson serial-to-HD44780 adapter
   RouterBoard         : HD44780 HD66712

Linux prints nothing on the display, and LCD is not mentioned in the boot log:
tme@rn102:~$ sudo dmesg | grep -i lcd
tme@rn102:~$

Here some possibly relevant kernel configurations:
tme@rn102:~$ egrep -i 'lcd|backlight' /boot/config-5.19.2-mvebu-370xp-tld-1 

# CONFIG_MFD_ATMEL_HLCDC is not set
# CONFIG_DRM_HDLCD is not set
# CONFIG_DRM_TILCDC is not set
# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set
CONFIG_FB_BACKLIGHT=m
# Backlight & LCD device support
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_KTD253 is not set
# CONFIG_BACKLIGHT_PWM is not set
# CONFIG_BACKLIGHT_QCOM_WLED is not set
# CONFIG_BACKLIGHT_ADP8860 is not set
# CONFIG_BACKLIGHT_ADP8870 is not set
# CONFIG_BACKLIGHT_PCF50633 is not set
# CONFIG_BACKLIGHT_LM3630A is not set
# CONFIG_BACKLIGHT_LM3639 is not set
# CONFIG_BACKLIGHT_LP855X is not set
# CONFIG_BACKLIGHT_GPIO is not set
# CONFIG_BACKLIGHT_LV5207LP is not set
# CONFIG_BACKLIGHT_BD6107 is not set
# CONFIG_BACKLIGHT_ARCXCNN is not set
# CONFIG_BACKLIGHT_LED is not set
# end of Backlight & LCD device support
CONFIG_HID_PICOLCD=m
CONFIG_HID_PICOLCD_FB=y
CONFIG_HID_PICOLCD_BACKLIGHT=y
CONFIG_HID_PICOLCD_LEDS=y
# CONFIG_HID_PICOLCD_CIR is not set
CONFIG_USB_LCD=m
CONFIG_LEDS_TRIGGER_BACKLIGHT=m
CONFIG_FB_TFT_TINYLCD=m

Maybe I should I try to load the modules corresponding to HID_PICOLCD or CONFIG_FB_TFT_TINYLCD?

Reagards,
Trond Melen
Re: Build-in 2 by 16 character front display on Netgear ReadyNAS RN104
January 17, 2023 09:08PM
Based on the DTS file I believe you need to include the following config options:

CONFIG_AUXDISPLAY=y
CONFIG_HD44780=y

Ray



Edited 1 time(s). Last edit at 01/18/2023 12:16AM by rayknight.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: