This sign player deployment guide details how to get Lightwing up and running quickly using ARM hardware from any of the board vendors that Lightwing supports, including the Wandboard Quad, SolidRun Hummingboard and Advantech i.MX6 boards.
The process of connecting and securing a Lightwing player for content development and deployment is summarized below. This process is mostly the same for all Lightwing players. However, if your player was not supplied with a MicroSD card pre-installed, you must install it first, as shown below.
Lightwing Player Deployment Overview
1. Insert Lightwing MicroSD card (if not already installed). 2. Connect power supply and HDMI display cables. 3. Connect USB touch-screen cable to display, if display is touch-capable. 4. Connect RS-232/USB serial debug cable to Windows PC (optional). 5. Connect TCP/IP Ethernet cable to local network. 6. Use a command shell (with secure or unsecured login) to run tests and demos. 7. Paste your license registration key into lightwing/Config.txt file, if not already installed. 8. Test and calibrate touch-screen, if display is touch capable. 9. Change the root password with the 'passwd' command. If deploying on a public network, increase security... 10. Use PuTTYgen on Windows to create an RSA key pair and register it with Pageant. 11. Copy your public RSA key to Lightwing player to enable SSH access. 12. Test secure SSH access using WinSCP from Windows PC. 13. Increase security by disabling password access (optional). 14. Deploy Lightwing player on public network.
Install Lightwing MicroSD Card for Wandboard Quad
To assemble a Wandboard Quad for Lightwing player deployment, first insert the Lightwing MicroSD card into your Wandboard, before assembling the enclosure. Wandboards have two identical slots for MicroSD cards which are spaced only 1/2 inch apart. Lightwing must be installed in the boot slot, which can only be accessed when the enclosure is open. The second slot is located directly below the boot slot and is accessible with the enclosure assembled. However, the second slot does not have boot capability, so it can not be used to boot Lightwing. The boot slot is hidden by the large aluminum heat-sink on the Wandboard Quad. Your Wandboard must have this heat-sink. If it is missing, it indicates it is either a Wandboard Solo or Dual, which can not be used with Lightwing.
Note that Wandboard Quad revision D1 boards began shipping in 2017. These new boards look identical to the previous revisions (B1 and C1) except that the MicroSD boot slot has been moved to the other side of the board (between the HDMI and Ethernet connectors) and the MicroSD card must be inserted upside down. So, this photo is only correct for the older (revision B1 and C1) boards.
Wandboard Quad with a Lightwing MicroSD Card in the Boot Slot (Rev B1 and C1)
Mounting a Wandboard Player
The Wandboard Quad makes an excellent Lightwing player. It is so lightweight (7 ounces), it can be attached to the back of most displays with Velcro hook and loop tape. This photo shows a complete touch-kiosk with a Wandboard Lightwing player attached to a Dell P2314T display. This is a 23 inch touch-screen display that is recommended for use with Lightwing. The short black cable makes the HDMI connection and the short blue cable makes the USB 3.0 connection for the touch-screen. The yellow cable is the Ethernet connection and the remaining black cables power the Wandboard and the display.
A Wandboard Lightwing Player Mounted on the Back of a Touch-Screen using Velcro
Mounting an Advantech Lightwing Player
Another excellent Lightwing player is the Advantech UBC-DS31 with the Lightwing software pre-installed. This player features a VESA mounting plate which can be attached to the back of displays which have the standard VESA hole pattern using two M4 machine screws. This photo shows a complete Lightwing player attached to a ViewSonic display. The short black cable makes the HDMI connection. The yellow cable is the Ethernet connection and the remaining black cables power the Advantech UBC-DS31 and the display. This player can also be used with touch displays as well.
An Advantech Lightwing Player Mounted on the Back of a Typical Display using VESA Plate
To begin testing and configuring your Lightwing player, first open a PuTTY command shell on an attached Windows system. Connect to your player either with a serial debug cable (115200 baud rate, N81) or through a secure SSH connection using an Ethernet cable to your local network. The latter requires that you configure PuTTY with the IP address assigned to your player. That address is shown on the HDMI display when Lightwing boots. Note that Lightwing does not support Telnet connections.
Press ENTER in the PuTTY command shell until you get a command or login prompt. Lightwing’s security features are disabled by default, so login as user root with no password.
If Lightwing is already running because it started automatically after boot, use the stop command to stop it:
You can now run many tests, demos and tutorials, by launching Lightwing manually. Most of these run continuously once started, so press the Q or ESC keys to exit Lightwing after each command. Some examples are:
lw scripts/LightwingDemo.lws lw scripts/TestControls.lws lw scripts/TestFonts.lws lw scripts/TestObjects.lws lw scripts/TestRSS.lws lw scripts/TestText.lws lw scripts/TestTickers.lws lw scripts/TestTouch.lws lw scripts/TestTransitions.lws lw scripts/Tutorial_01_Introduction.lws lw demos/globe/scripts/Default.lws lw demos/garths/scripts/Default.lws lw demos/bigbank/scripts/Default.lws -p lw demos/playhouse/scripts/Default.lws -p
Lightwing’s operation is usually controlled by its configuration file (Config.txt) but this can be overridden temporarily by using command line options to enable features such as portrait display mode, which some demos require.
Command Line Options
-a Abort play when time duration expires (-a=days:hours:minutes:seconds). -c Set the configuration file path and/or name (-c=Config.txt). -d Set debug log output level (0: None, 1: Status, 2: Errors, 3: Warnings, 4: Info, 5: Debug). -f Set the script file path and/or name (-f=scripts/Default.lws). -h Display this help information. -m Enable the performance monitor and date and time display. -p Set display orientation mode (0: Landscape, 1: Portrait). -s Set section index of multi-panel display (0: Master). -i Set initiate wait time for multi-panel communications (-i=days:hours:minutes:seconds). -t Set touch screen capability (0: Off, 1: On). -l Disable the debug log window. -w Set main window dimensions (-w=1920,1080). Default is quarter of display (-w). -x Set play speed factor.
Lightwing Player Configuration
The Lightwing configuration file defines the default values for many important parameters that control Lightwing’s operation and the capabilities of the display. The same file is used by both the Windows and Linux versions of Lightwing although many of the parameters are ignored on Windows. Use the provided default values for any parameters you are unsure about. The parameters which must usually be configured at least once are license, touch and portrait. Use a command shell to run the nano editor to modify this file:
Lightwing Configuration File
license: 0123456789abcdef License key required on Linux players. Provided when license is purchased and must be pasted here. touch: yes Does Linux player have a touch capable display? portrait: yes Orientation of the panel. (No: landscape, Yes: portrait). window: yes Size of window on Windows or "Yes" for default (960 x 540). "No" selects full-screen. update: 1:00 Time interval to check for web and local content file updates (days:hours:minutes:seconds). url: Web address of content update file. Disabled if blank.
The license parameter is required on linux players. This is a 16 digit hexadecimal license registration key that enables Lightwing to function normally. This value only needs to be set once since it never expires for the life of the player hardware.
The touch parameter enables the touch-screen features of Lightwing on Linux players. The touch features are always emulated on Windows with the mouse.
The portrait parameter defines the orientation of the panel for single panel displays. Yes means the panel has a portrait (vertical) orientation and no means the panel has a landscape (horizontal) orientation.
The window parameter enables Lightwing to run in a window on Windows. This is ignored on Linux players, which always run full-screen only.
The update parameter defines the time interval for Lightwing to check for web and local content file updates on the Linux player. The format must be days:hours:minutes:seconds. When Lightwing finds a content update, it is immediately installed and Lightwing restarts.
The url parameter defines an optional URL where Lightwing will attempt to pull content updates from at each update interval. Automatic content updates are not done on Windows.
There are additional parameters in the Lightwing configuration file that are only important when building a multi-panel display. Those parameters are detailed in the Multi-Panel Deployment guide.
License Key Registration
When Lightwing is run on new hardware, a registered license key must be pasted into the Lightwing configuration file on the player. First, run Lightwing using a PuTTY command shell to obtain your Lightwing Player ID, which is displayed when Lightwing is run. Copy and paste that number into an email to Montgomery One technical support. A reply email will be returned with the registered license key for your player. Copy and paste this number into your Lightwing configuration file after the license: keyword. It should look like this, but with your new license number:
To paste a license key into the configuration file on your player, edit and save the file using the nano editor as shown in the section above. If you purchased Lightwing pre-installed on a player, your license key will already be installed, so this should not be necessary.
The Lightwing platform is highly customizable since it is built on open-source Yocto Open Embedded Linux. The following guide summarizes other important configuration files in the Linux system that can be customized.
Other Player Configuration Files
Function File Edit Commands Home folder Options nano /etc/init.d/home Time Zone Options nano /etc/init.d/timezone Lightwing Automatic Start Options nano /etc/init.d/lightwing OpenSSH Security Options nano /etc/ssh/sshd_config User Profile Options nano /etc/profile Network Time Protocol Options nano /etc/ntp.conf Touch Screen Options nano /etc/ts.conf File System Options nano /etc/fstab Network Configuration Options nano /etc/network/interfaces
Configure Automatic Start Content
Lightwing automatically runs the default script Default.lws, whenever the player boots. This is really a symbolic link to the Lightwing demo script and it is located here:
Simply replacing this with your script file will cause Lightwing to automatically run your content after booting, if your script is named Default.lws.
Or, you can replace the symbolic link to point to your script. The linux commands for this are:
cd ~/lightwing/scripts rm Default.lws ln -s YourScript.lws Default.lws ls -la
You can disable the automatic start of Lightwing completely, by inserting a comment character (#) before this line in the Lightwing init script:
nano /etc/init.d/lightwing # /usr/local/bin/lw &
When building a multiple panel display using multiple Lightwing players, it is essential that all of the players start and play the same content. Therefore, the same content files must be copied to all of the players and they must be configured to start with copies of the same Lightwing script. Use the UpdatePlayers batch to automate copying new content to multiple players. This is detailed in the Multi-Panel Deployment guide.
Lightwing is extremely flexible in the level of security that can be used. Lightwing is provided with OpenSSH installed, but it’s not required for content development. Once your project is ready to deploy, choose the level of security that’s appropriate for your installation. Simply changing the login password may be sufficient if deployed on a private network with firewall protection. But Lightwing can also be deployed on public networks easily because OpenSSH server software is already installed. Simply registering your RSA key and disabling password login in the OpenSSH configuration creates a level of security equivalent to what is used by the largest financial institutions in the world. The combination of OpenSSH with the absence of software vulnerable to hacking attacks and malware (such as Android, Windows, Java, web browsers and Adobe Flash) makes Lightwing the most secure solution available anywhere.
This guide provides all the information required to enable RSA security using OpenSSH. The WinSCP and PuTTY communication tools are provided in the Lightwing SDK to create RSA keys, login to Lightwing players and transfer files. To learn more about how OpenSSH works, the book OpenSSH Mastery, by Michael W. Lucas, is recommended.
If something goes wrong and you lose access to your Lightwing player through OpenSSH, you can connect a serial cable and regain access through the serial port, assuming you have the root password. The default login name is “root” and there is no root password, by default, so simply press Enter.
Four Levels of Lightwing Security
No Security Login as "root" with no password. Low Security Change the default root password: passwd root Medium Security Restrict access to clients within a specific IP address range. Edit the ListenAddress parameter in the OpenSSH configuration file: nano /etc/ssh/sshd_config ListenAddress 192.168.0.* High Security Use PuTTYgen to create your RSA key pair. Edit your new public key to be a single line (like the LightwingSupportKey example). Append your edited key to LightwingSupportKey to enable SSH access with the key: cat YourPublicKey >> /etc/ssh/LightwingSupportKey Reboot player and test SSH authentication using PuTTY to verify your key works. Then, disable password login in the OpenSSH configuration file: nano /etc/ssh/sshd_config PasswordAuthentication no ChallengeResponseAuthentication no AuthorizedKeysFile /etc/ssh/LightwingSupportKey PubkeyAuthentication yes
Lightwing is provided with a public RSA key named LightwingSupportKey already installed as the AuthorizedKeysFile to enable remote secure access to your player for content updates, software updates and/or technical assistance. But, password login is also enabled with no password, by default. Changing the password provides some security, but if your player will be deployed on a public network it is recommended to append your public RSA key to the LightwingSupportKey file and then disable password login for the highest level of security. Be sure to test logging in using your RSA key before disabling password login. Otherwise, you could be locked-out of your player, which would require logging in with a serial command shell to correct the OpenSSH configuration problem.
Change Default Password
To change the default password for the root user on your player, login to the player with either a serial or SSH command shell and then use this command:
WARNING! Exercise caution when changing the password for the root user on your Lightwing player. If your password is lost, it may be impossible to recover it. The only remedy to this situation is to replace the SD card in your Lightwing player with a new card.
Configure Players for Static IP Addresses
Every Lightwing player must have a unique IP address on your local network. Usually, they are assigned dynamically by a DHCP server, which is typically built into internet routers. The addresses that are assigned by DHCP may change when your router reboots, which is usually not a problem, but if you are deploying multiple players it is preferable to assign them static IP addresses. This is done by editing the following file to replace the dhcp specification for the eth0 interface with a static address specification:
Example Static IP Address Syntax
# Wired or wireless interfaces auto eth0 #iface eth0 inet dhcp iface eth0 inet static address 192.168.0.100 netmask 255.255.255.0 gateway 192.168.0.1
Inserting comment characters (#) disables the lines without deleting them. Note that you may also need to configure your DHCP server to reserve the block of addresses you will assign for static use.
WinSCP can now be configured with the assigned static addresses to make content updates quick and easy for one or more players.
Touch-Screen Calibration and Testing
The first time a touch-screen is used with a Lightwing player it must be calibrated and tested for accurate finger tracking. Lightwing includes tools to do this which can be run in either a serial or secure command shell. Run the ts_calibrate command first and follow the instructions it displays, then run ts_test to confirm that your touch-screen is working properly. The calibration results are stored on the MicroSD card so this does not need to be repeated unless the display is changed.
Touch-Screen Calibration and Test Commands
These commands will fail to run if the Linux system can not find your touch-screen on the USB interface of the player. Do not attempt to enable Lightwing’s touch features if these commands fail. In this case, check that the USB 3.0 cable is properly installed between the Lightwing player and the touch-screen. The following commands are useful for debugging problems with the touch-screen interface.
Touch-Screen Interface Debugging Commands
lsusb cat /proc/bus/input/devices evtest /dev/input/event0
Once the touch-screen calibrate and test tools are working properly, enable touch-screen input in the Lightwing configuration file (Config.txt). Set the touch option in this file to yes.
Schedule Content Play with Cron
The Linux cron utility can be used to schedule Lightwing content to play according to a specific time schedule. Before this can be used, first disable Lightwing’s default script as described above.
An example cron configuration file is provided on the Lightwing player which can be used to create custom schedules for Lightwing content. Any number of lines can be added to this file where each line defines a scheduled content play event. Note that this file must not be marked as executable, but the RunDemo script must be marked as executable. Edit this file as follows.
The cron syntax for scheduling events in this file is as follows.
Cron Scheduling Syntax
Minute Hour DayOfMonth Month DayOfWeek User Command DemoName Duration
Cron Parameters Definition
Parameters Values Minute 0-59 Hour 0-23 DayOfMonth 1-31 Month 1-12 (or Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec) DayOfWeek 0-7 (or Sun, Mon, Tue, Wed, Thu, Fri, Sat) User root Command RunDemo DemoName globe Duration days:hours:minutes:seconds
The first five parameters define when Lightwing will play the content. These parameters are used in combination to define start times and frequency of the event. They can be specific values or an asterisk (*) can be used to indicate the full range of possible values for that parameter. Hyphens (-) can be used to define specific ranges of values also.
The User and Command parameters should always be root and RunDemo, respectively, or replace RunDemo with your own shell script. The shell script is required to set the needed environment variables.
The DemoName parameter defines the name of the demonstration content to be played. This must point to a Lightwing script, but can be changed to point to your content instead of a demo.
The Duration parameter defines the length of time the content will be played for this event. Note that only one instance of Lightwing can run at a time. Therefore, this parameter is required to close Lightwing before each successive scheduled event begins. This does not include the time required for Lightwing to restart and parse the content script. Therefore, deduct 30 to 60 seconds to ensure that Lightwing is ready for the next event, or it could be skipped. Zero (0) indicates that the duration is infinite.
The following examples are provided in the crontab file and are ready to use by simply removing the appropriate comment symbols.
Example 1 – Run Default Demo on Reboot with no Schedule
@reboot root RunTest LightwingDemo 0
Example 2 – Restart Globe Demo Every Minute
* * * * * root RunDemo globe 45
Example 3 – Restart Globe Demo Every Hour
0 * * * * root RunDemo globe 59:00
Example 4 – Cycle Through 4 Demos Every Hour with 15 Minutes for Each
0 * * * * root RunDemo globe 14:00 15 * * * * root RunDemo skyview 14:00 30 * * * * root RunDemo playhouse 14:00 45 * * * * root RunDemo bigbank 14:00
Example 5 – Cycle Through 4 Demos Every Day with 6 Hours for Each
0 0 * * * root RunDemo globe 5:59:00 0 6 * * * root RunDemo skyview 5:59:00 0 12 * * * root RunDemo playhouse 5:59:00 0 18 * * * root RunDemo bigbank 5:59:00
Example 6 – Cycle Through 7 Demos with a Different One Each Day of the Week
0 0 * * 0 root RunDemo globe 23:59:00 0 0 * * 1 root RunDemo skyview 23:59:00 0 0 * * 2 root RunDemo playhouse 23:59:00 0 0 * * 3 root RunDemo bigbank 23:59:00 0 0 * * 4 root RunDemo garths 23:59:00 0 0 * * 5 root RunDemo smiths 23:59:00 0 0 * * 6 root RunDemo fratellos 23:59:00