Make RaspberryPi + Samsung TV a remote display

Our fire brigade wants to use a software that gives them details about their fire run. Unfortunately the softare is Windows only and runs on a vserver in the server room. The display should be mounted in the hall where the fire trucks are so that they can see all the details while preparing.

My idea was to use a VNC server on the Windows machine in the server room an a RaspberryPi as VNC client mounted to the backside of the TV.

Because I had some touble getting the system up and running, I decided to document the project here (I maybe extend this article from time to time as the szstem evolves).

Windows server

We run a Proxmox setup that enables us to run several vservers on the physical server, this was straight forward, so I don't go into the details here. One vserver is a normal Windows 10 Pro installation that runs Feuersoftware Einsatz Monitor and a UltraVNC server.

The Einsatz Monitor runs in fullscreen, that screen is set to a resolution of 1920x1080 and should be transmitted to the TV later on.

The only thing I've set in the VNC server is the two passwords for remote control and view only.

Raspberry Pi

I've installed the latest Raspbian Stretch with Desktop from here. Then I changed the password with passwd and enabled the SSH server with sudo raspi-config.

VNC client

I installed xtightvncclient (sudo apt-get install xtightvncclient) and mad a shell script to start the connection:

export DISPLAY=:0
echo "ViewOnlyPassword!1!" | xtightvncviewer -viewonly -fullscreen -autopass &

"ViewOnlyPassword!1!" is the password configured on the VNC server, is the IP of the Windows Server.

It took me quiet a while to figure out how to pass the password to the VNC client, so that was pitfall number 1. Then I noticed that th screen hat black borders of about 30mm and the VNC image was cut off at the bottom and on the right side.

First I thought that it was configuration fuckup of th VNC server but that wasn't the case.

Screen resolution

fbset showd me that the resolution of the framebuffer was 1824x984 which seemed odd to me because I had set the screen resolution to 1920x1080 via raspi-config.

The solution was to edit /boot/config.txt:

# For more options and information see
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border

# uncomment to force a console size. By default it will be display's size minus
# overscan.

# uncomment if hdmi display is not detected and composite is being output

# uncomment to force a specific HDMI mode (this will force VGA)

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display

# uncomment for composite PAL

#uncomment to overclock the arm. 700 MHz is the default.

# Uncomment some or all of these to enable the optional hardware interfaces

# Uncomment this to enable the lirc-rpi module

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)

disable_overscan=1mad the black border disappear, framebuffer_width=1920 and framebuffer_height=1080 mad the framebuffer resolution 1920x1080 so that nothing of the screen got cut off. hdmi_group=1 and hdmi_mode=16 are responsible for the HDMI resolution of 1920x1080 60Hz, these were set by raspi-config.

CEC controling the TV

And finally I wanted to control the TV power state by CEC commands via HDMI. I made two more shell scripts for turn on and standby:

# Turn on TV via CEC
echo "on 0" | cec-client -s -d 1
# Turn off TV via CEC
echo "standby 0" | cec-client -s -d 1

First these scripts didn't work for me, the solution was to enable CEC in the TV settings (Samsung calls it Anynet+)

In Menu -> System -> Anynet+ (HDMI-CEC), I enabled both options, If I only enable the first on I can turn the TV on but not off.