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:

#!/bin/sh
export DISPLAY=:0
echo "ViewOnlyPassword!1!" | xtightvncviewer -viewonly -fullscreen -autopass 192.168.1.10:0 &

"ViewOnlyPassword!1!" is the password configured on the VNC server, 192.168.1.10 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
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

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

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

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

# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=1920
framebuffer_height=1080

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

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=1
hdmi_mode=16

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

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

# uncomment for composite PAL
#sdtv_mode=3

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

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

# Enable audio (loads snd_bcm2835)
#dtparam=audio=on

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:

#!/bin/sh
# Turn on TV via CEC
echo "on 0" | cec-client -s -d 1
#!/bin/sh
# 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.