× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: Shell script for displaying RN 214 LCD messages

h8ohmh
Follower

Shell script for displaying RN 214 LCD messages

 

Hi everyone,

I made a small ssh shell script for displaying texts on Readynas 214 (or 204) OS6.0.xx LCD Display (e.g. for messages of an end of a ssh shell programm). Have fun with it!

Name it as you want (e.g. lcd_text.sh).

#!/bin/bash
#by h8ohmh
MSG="${1}"
DURATION="${2}"
UNK="$3"
if [[ -z "$UNK" ]]; then
UNK=478
fi
/usr/bin/rnutil rn_lcd -s "$MSG" -p 1 -e $DURATION -k $UNK
exit 0

usage example:

lcd_text.sh "blabla" 10 "unknown"

(10 for 10 seconds)

Model: RN204|ReadyNAS204 4-Bay
Message 1 of 12
StephenB
Guru

Re: Shell script for displaying RN 214 LCD messages

thx for sharing.

Message 2 of 12
Sandshark
Sensei

Re: Shell script for displaying RN 214 LCD messages

Any reason you say this is for the 214/204 and not generic for all OS6 units with an LCD?  It works on a 516 as well.

 

Where did you find documentation on the commands for rn_lcd?  It doesn't seem to have any help available.

 

Messing around with it a bit, P seems to be a page designator.  I though K could be related to how it cycles between pages, and I did have it cycling between two messages, but I've not fully figured it out.  If it's a number, it definately has an effect on the duration.

Message 3 of 12
8ohmh
Guide

Re: Shell script for displaying RN 214 LCD messages

I got that command analyzing /etc on ReadyNas OS ssh shell. So far have you tried all -h or --help commands with that rn_lcd? In any case try to use "od" command for examining /sbin/ /bin/ and so on. As far as the ReadyNas team have no explicit command for accessing the LCD my script is the best solution instead of installing a huge GB development environtment on the NAS and a PC... As I wrote: No one has to use it, it's free and it does no harm: it relies only on the ReadyNas OS content! You can use even a blinking messages with a shell for ... do; done loop (one lcd cmd displays text for 3s the other one no)
Message 4 of 12
Sandshark
Sensei

Re: Shell script for displaying RN 214 LCD messages

Yeah, I tried all possible help options and got nothing.  rnutil itself has a main help screen, but nothing for that subcommand I can find.  I may move a NAS with a display into the same room as my computer desk so I can experiment more.  Examining rnutil with a hex editor shows options and error messages for some sub-commands, but none for rn_lcd.  It doesn't even complain if K is a number or string.

Message 5 of 12
StephenB
Guru

Re: Shell script for displaying RN 214 LCD messages

FWIW, there are quite a few soft links to rnutil scattered around - including /usr/bin/rn_lcd.  These include

antivirus_scan_rootfs
apt_wait
backup_md
bit_rot_event
blink
bluetooth_event
check_ups_drv
clamav_event
create_bond
create_vlans
diagnostics
disk_chan
disk_event_handler
dump_sysflags
event_push
firmware_update
get_disk_info
hotplug_event
md_event
mkhomedir_helper
remote_access
reset_i2c
rn_lcd
rn_shutdown
search_for_key
set_mtu
shutdown_eda
spindown_schedule
start_raids
update_support_fw_db
volume_schedule
volume_util

It looks like rnutil will interpret the name of the soft link as a command - and there are a lot more of these commands than show up in the help text.

 

 

Message 6 of 12
8ohmh
Guide

Re: Shell script for displaying RN 214 LCD messages

hello StephenB,
I know you are here master, and we/me appreciate you all but listing all possible commands WHICH ARE DANGEROUSLY FOR THE NAS IS NOT VERY CONSTRUCTIVE. eg like firmware_update, start_raids are not that what surely anyone of Netgear wants, isn't it?

In my case I just wanted to give a little shell tool for infos on the LCD screen (the other ones I already knew, and beside of that I can "!hexray" and ghidra anything on RN...)
But anyway thanks to you for giving some bad peoples an idea to write trojans with firmwar_update


@StephenB wrote:

FWIW, there are quite a few soft links to rnutil scattered around - including /usr/bin/rn_lcd.  These include

k as a command - and there are a lot more of these commands than show up in the help text.

 

 


Model: RN204|ReadyNAS204 4-Bay, RN214|4 BAY Desktop ReadyNAS Storage
Message 7 of 12
StephenB
Guru

Re: Shell script for displaying RN 214 LCD messages


@8ohmh wrote:
hello StephenB,
I know you are here master, and we/me appreciate you all but listing all possible commands WHICH ARE DANGEROUSLY FOR THE NAS IS NOT VERY CONSTRUCTIVE. eg like firmware_update, start_raids are not that what surely anyone of Netgear wants, isn't it?

start_raids is already referenced here, all that is new is that it is a soft link to rnutil.  Folks from Netgear have previously posted the commands used to manually update the NAS flash from ssh.

 

I agree that playing with the commands w/o documentation is risky - though @Sandshark and I both have NAS that we only use for exploration.  Netgear could deny support if you damage your system with ssh.

 

But nothing I posted would give much help to a hacker.  If they have a ReadyNAS (or download the free VM), then they can easily see all this stuff for themselves.

 

Message 8 of 12
8ohmh
Guide

Re: Shell script for displaying RN 214 LCD messages

Hi StephenB, just a question: Haven't you asked ayourself about "bluetooth_event"???. Does ReadyNas'es have Bluetooth module inside it or is it just a relict of other Nas'es??? So far lspci, lsusb, /sys/proc didn't show any bluetooth hardware/module in it - or haven't I researched enough Thanks for answer
Model: RN204|ReadyNAS204 4-Bay, RN214|4 BAY Desktop ReadyNAS Storage
Message 9 of 12
Sandshark
Sensei

Re: Shell script for displaying RN 214 LCD messages

There were some ReadyNAS that shipped with a BlueTooth USB module, but Netgear said they never implemented its intended purpose, which was linked to Insight..  Looks like rnutil has some vestiges of that effort, too.

 

BTW, I was lookling at the display on my latest RD516 acquisition (which i converted to an RN516) and noticed some messages have the characters spaced out.  Got me thnking that the K parameter may be Kerning.  Since just any number doesn't seem to work, there must be an allowable range or specific values if that is it.  Unlike the legacy panel, the newer one doesn't seem to have multiple font sizes.

Message 10 of 12
StephenB
Guru

Re: Shell script for displaying RN 214 LCD messages


@Sandshark wrote:

There were some ReadyNAS that shipped with a BlueTooth USB module, but Netgear said they never implemented its intended purpose, which was linked to Insight..  Looks like rnutil has some vestiges of that effort, too.

 


I agree that's likely what's going on here.

Message 11 of 12
8ohmh
Guide

Re: Shell script for displaying RN 214 LCD messages

Thanks to you both (Sandshark & StepjenB). Was wondering too about Bluetooth ind rnutil. As you wrote maybe a relict and/or for other devices (Softw Engineers maybe forgot to set a C/C++ macro at compiling OS & Toold for ReadyNAS). But anyway it is interesting. RN_LCD: K value, is a kerning value, but Kerning on a LCD Display. As far Reverse Enigineering the LCD tool, controller (Port/Address etc) would have be difficult and for what? As long we can show the texts, it is enough for me. I dont wanna have gfx on LCD Display, isn't it?
Message 12 of 12
Top Contributors
Discussion stats
  • 11 replies
  • 2265 views
  • 3 kudos
  • 4 in conversation
Announcements