Skip to main content

Using Densitron 1RU and 2RU Displays for XTOUCH

As already showcased here, with SKAARHOJ's xpanel-touch package for our controllers, users can create software UIs accessible through browsers, which appear on the local network as Raw Panel devices. 

Densitron Product range can offer some interesting options:

Our Product Rance.png

One could build a small “rack” style touch panel with 1RU USB display and a Raspberry Pi, or just go with 2RU unit which already has a “computer” built in. 

This document will help you to quickly build such setup.

1. 1RU+Raspberry Pi4 setup.

image.png

Prerequisites :

  • Raspberr y Pi 4
  • PSU 5V/3A with type C cable
  • DM-066GN-OPUR01 1RU Single Monitor
  • microSD card for operating system
  • USB keyboard/mouse *
  • Monitor *
  • USB FlashDrive (optional)*

*needed only during initial setup

Extra Power for Densitron

Unfortunately powering the screen just using USB seemed to be unstable, so we encourage to make this little "tweak" in order to provide more power to the Densitron screen. You should prepare 2 wires (Almost the same length as the micro USB cable you plan to use between RPI and Densitron), solder them to 5 V pin and GND pin on RPI and  solder them respectively to the Densitron 5V input port which can be found on the backside of the screen.

Pasted Graphic 35.png

image.png

 

1. Operating System

Tested, verified  and proposed OS  will be Raspbian OS (Buster) 2020 08 24. Can be downloaded here.

We suggest Raspberry Pi Imager to perform the flashing. You can download it for various Operating Systems here.

If you end up feeling lost at this stage, you will most likely get hints how to proceed in this article.

2. Pre setup

Assuming you have already flashed your SD card with the OS image, we can start setting up our touch panel.

Install the SD card into the RPI, connect your HDMI compatible screen as well as keyboard and mouse, you can also already plugin the Densitron screen to the RPI with USB-A to microUSB cable, although it will not display anything yet.(Either to USB 2.0 or USB 3.0 Port on RPI, should note play any role). Power it on !

Once the device boots, finish the installation of the Raspbian OS following the onscreen instructions. You will have the possibility to set up user,time-zone,WIFI network... Once that is complete, we also propose to leave a "backdoor" for yourself and enable the SHH and VNC servers on the RPI, so in future you do not need to connect mouse and keyboard to make any tweaks. To do so, find the raspberry icon in the upper left corner of the screen, click it, and in preferences you will find "Raspberry pi Configuration" application. Launch it, navigate to "Interfaces" tab, enable SSH and/or VNC and click ok. Reboot! You should now be able to access the RPI remotely either via SSH or VNC.

image.png

3.Post setup

At this point all we have to do, is to enable the Densitron screen and make our browser autostart on needed  URL address. In order to make this a bit easier we have made a small shell script which will modify the needed things for you.

Easy way. 

  1. Open Terminal app
  2. Execute command below, this will download the script(If no internet access on RPI, download the file below manually on machine with internet access and transfer it to your RPI on a USB Flash drive. Then proceed from step 3)
curl -O https://raw.githubusercontent.com/SKAARHOJ/Support/master/Files/Densitron/DensitronSetup1U.sh

     3. Next we need to give permissions to execute the file we have just downloaded. Execute following command:

sudo chmod 777 ./DensitronSetup1U.sh

      4. Now we are ready to execute the script. Execute following command:

sudo ./DensitronSetup1U.sh

You will be asked to type the ip and port of your XTOUCH web server, do so and hit ENTER. 

image.png

       5. That is it, you can now power down your RPI, disconnect keyboard,mouse and HDMI screen. Next time you power it on the browser should open in full screen mode on the Densitron screen.

 

Advanced way. 

Advanced users might want to build a more custom setup combining 2 Densitron screens, or a Densitron screen and HDMI screen-How exactly to do so, is out of scope of this getting started tutorial. Although some hints will be provided:

  • Edit or create /etc/X11//xorg.conf - in order to "describe" your multi monitor setup.
  • Edit or create /etc/xdg/autostart/display.desktop for browser auto startup "tuning".
  • Edit /etc/xdg/lxsession/LXDE-pi/autostart. It is crucial to add the following parameters:
@xset s off
@xset -dpms

 

Without adding this you will experience USB Dropouts (disconnect and then connect) either when RPI goes to "screensaver/blank screen" or when it wakes up(We experienced both situations). As a result you will be left with "green" unresponsive screen. Light Display Manager does not detect this issue, so one has to restart Light Display Manager manually or create a udev rule to restart the service when this condition occurs.

sudo service lightdm restart

2. 2RU setup.

Luckily, the units ship with Lubuntu distribution installed and should already "work" out of the box. That minimizes the effort needed to get it up and running, the only thing we need to do is to set up autostart flow to open the browser in full screen mode. Our unit came with SSH server not installed, so we will need a keyboard and preferably mouse in order to set it up. The username and password are densitron/densitron.

    1. Plugin your keyboard and mouse to the unit and power it on.
    2. Once device has booted, find terminal icon in taskbar and launch it.
    3. We need to create a new autostart entry, to do so type the following command :
sudo nano /etc/xdg/autostart/display.desktop

Enter the password if asked. We should end-up with an empty file open. Lubuntu has Firefox Browser installed by default, so this is what we are going to use. The content of the file should look like below, except of ip and port of your XTOUCH server :

[Desktop Entry]
Name=Firefox
Exec=firefox  --kiosk http://192.168.11.5:7952

Save and exit! Basically this is it! Next time the panel restarts the Firefox browser will be opened in "full screen" on the address you have entered in the config.

If at some point you need to change the ip, just edit the file again.

sudo nano /etc/xdg/autostart/display.desktop

If you want to stop autostarting the browser:

sudo rm /etc/xdg/autostart/display.desktop