crosscontrol CrossLink TG User manual

Product revision: 2
2019-10-23
Getting started guide
Crosslink TG
www.crosscontrol.com

Crosslink TG Product revision: 2.1
Getting started guide 2019-10-31
www.crosscontrol.com 2
Contents
Revision history ...............................................................................................................................2
1.Login ...........................................................................................................................................3
2.Development using LinX Software Suite DevEnv 4..................................................................3
2.1.Qt...............................................................................................................................................3
2.2.Qt Creator ................................................................................................................................4
2.3.Set remote device IP address ...............................................................................................9
2.4.Scanning for a Device..........................................................................................................10
3.Create and Deploy a Console Application ..........................................................................11
4.Auto starting an application during boot..............................................................................14
5.Security.....................................................................................................................................14
5.1.Using the “uncomplicated firewall” ...................................................................................15
6.Further Reading .......................................................................................................................15
Revision history
Rev Date Author Comments
1 2019-07-23 Anders
Svedberg Version 1.0
2 2019-10-23 Anders
Svedberg Added Qt Creator configuration
2.1 2019-10-31 Finn Mc Guirk Minor corrections

Crosslink TG Product revision: 2.1
Getting started guide 2019-10-31
www.crosscontrol.com 3
1. Login
The CrossLink TG can be accessed from the serial port or Ethernet. The easiest way is to connect
the device to a router and it will be automatically assigned an IP address. The unit runs a SSH
server so anyone can connect to it using the correct username and password.
By default the root (super user) account is disabled for SSH login for security reasons, but a
standard user account can be used:
Username: ccs
Password: default
This normal user account does not have super user privileges, but by typing “su” and typing the
root password, user is switched to root. The default root password is root .
ccs@arm:~$ su
For a development machine, it might be necessary to allow root login via SSH for remote
debugging and accessing hardware on the device during development. This can be done from a
root login shell, and editing the file /etc/ssh/sshd_config.
In the “Authentication” section, enable root login as below.
# Authentication:
PermitRootLogin yes
Do not connect a device directly to the Internet without changing default passwords and with root
login enabled via SSH. When connecting via a GPRS modem it can be vulnerable and several
security steps needs to be taken.
2. Development using LinX Software Suite DevEnv 4
CrossControl provides a virtual machine for easier development with the CrossLink TG. The virtual
machine, a Linux distribution, is configured for easy cross compilation and deployment. It comes
pre-configured with development tools and the required software.
2.1. Qt
The LinX-base package contains Qt runtime libraries. Qt is an open-source cross platform C++
library with many modules that can speed up development. Support for database handling, network
communication, serial communication, CAN bus, GPS positioning, Bluetooth and much more.
In the LinX software Suite, CrossControl provides Qt builds for all Linux based computers that can
be built and deployed from the virtual machine.

Crosslink TG Product revision: 2.1
Getting started guide 2019-10-31
www.crosscontrol.com 4
CrossControl currently provides Qt open source runtime version 5.12 for the CrossLink TG and it is
pre-installed on the unit.
The current version of the virtual machine does not have the Crosslink TG toolchain installed but it
is available as a debian installer.
In the current version of LinX Software Suite DevEnv 4, the Crosslink TG SDK is not yet pre-
installed but is available as a separate installer. The installer can be downloaded from the Software
Download area at www.support.crosscontrol.com.
ccs@LinX-VM:~$ sudo dpkg -i crosslink-tg-sdk_1.0.0-1_all.deb
(Reading database ... 141169 files and directories currently installed.)
Preparing to unpack crosslink-tg-sdk_1.0.0-1_all.deb ...
Setting up crosslink-tg-sdk (1.0.0-1) ...
ccs@LinX-VM:~$
This will install the SDK with cross compiler and sysroot to folder /opt/TG.
There is also a separate Qt development package available to install on the virtual machine. It
containa three files:
install-Qt-5.12.0.sh
Qt-5.12.0_ARM_TG-x84_64.tar.gz
Qt-5.12.0_ARM_TG.tar.gz
To enable Qt development on the Virtual machine, download these three files to the virtual
machine and run install-Qt-5.12.0.sh .
ccs@LinX-VM:~$ chmod +x install-Qt-5.12.0.sh
ccs@LinX-VM:~$ ./ install-Qt-5.12.0.sh
2.2. Qt Creator
Qt comes with an advanced IDE called Qt Creator. It makes it easy to create a C++ application and
deploy it and run on the target device.

Crosslink TG Product revision: 2.1
Getting started guide 2019-10-31
www.crosscontrol.com 5
A typical 'Hello World' application written in Qt for CrossLink TG
The Qt Creator must be configured with the newly installed Qt libraries in order to be able to use it
correctly.
Step 1. Open “Tools Options” menu and select “Kits”
Select “Compilers” tab and press [Add] button.
Select “GCC C”

Crosslink TG Product revision: 2.1
Getting started guide 2019-10-31
www.crosscontrol.com 6
Set name “GCC Crosslink TG” and compiler path to:
/opt/TG/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-
gnueabihf-gcc
Press [Apply] and then repeat for C++ compiler:
[Add] GCC C++
Set name “GCC Crosslink TG” and compiler path to:
/opt/TG/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-
gnueabihf-g++

Crosslink TG Product revision: 2.1
Getting started guide 2019-10-31
www.crosscontrol.com 7
Step 2. Set the debugger.
Switch to the “debugger” tab and select the debugger:
/opt/TG/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-
gnueabihf-gdb
Step 3. Configure Qt
Switch to the Qt Versions tab and select the path to the qmake binary:
/opt/TG/sysroots/x86_64-linux/Qt-5.12.0/bin/qmake

Crosslink TG Product revision: 2.1
Getting started guide 2019-10-31
www.crosscontrol.com 8
Step 4. Create the complete “Kit”.
Switch to the “Kits” tab and press [Add] button to create the build kit for Crosslink TG. It should be
configured as below:

Crosslink TG Product revision: 2.1
Getting started guide 2019-10-31
www.crosscontrol.com 9
Press [Ok] and the setup is complete.
2.3. Set remote device IP address
To deploy and test an application on the CrossLink TG, some settings need to be set in Qt Creator.
First, open [Tools] [Options…] menu

Crosslink TG Product revision: 2.1
Getting started guide 2019-10-31
www.crosscontrol.com 10
2.4. Scanning for a Device
The Crosslink TG will broadcast its IP address. It can be read from the virtual machine with the
application /opt/bin/snb_reader.
The virtual machine may need to use a bridged adapter instead of the default NAT settings in the
Virtualbox network settings page in order to get the scanning to work successfully.

Crosslink TG Product revision: 2.1
Getting started guide 2019-10-31
www.crosscontrol.com 11
3. Create and Deploy a Console Application
To create a hello world application from Qt Creator, it must be a console application since there is
no graphical interface available for the Crosslink TG.
Select [New File or Project] from the menu and select [Qt Console Application].

Crosslink TG Product revision: 2.1
Getting started guide 2019-10-31
www.crosscontrol.com 12
Press [Choose…]
Press [Next >] and select the qmake build system. Then select the newly created Crosslink TG Kit.

Crosslink TG Product revision: 2.1
Getting started guide 2019-10-31
www.crosscontrol.com 13
Press [Next >]
Select the option to enable version control if needed and then [Finish].
Create a C++ “Hello world” application and press the green [Run] button to deploy it to the
Crosslink TG. It will download and run the application to the IP address defined above.

Crosslink TG Product revision: 2.1
Getting started guide 2019-10-31
www.crosscontrol.com 14
4. Auto starting an application during boot
Crosslink TG uses systemd as a service manager. Systemd provides an easy way of setting up
services on the device.
To create an application that will launch during the boot up, a .service file should be created.
A typical configuration file can look like this:
[Unit]
Description = Example that runs an application during boot
After = syslog.target
[Service]
ExecStart = /opt/bin/myApplication
[Install]
# multi-user.target corresponds to run level 3
WantedBy = multi-user.target
You must also create (as root user) a file named myapplication.service in folder
/etc/systemd/system to complete the process.
5. Security
The CrossLink TG is by default an open device and not suitable for connection to the Internet
directly. There are a few simple steps to take to improve security.
Change the user password from default. Both for root and debian users.
Verify that root login via SSH is disabled.
Activate the built in firewall (see below)
Use a SIM card with a customized APN / VPN solution to only allow access to a specific
server.

Crosslink TG Product revision: 2.1
Getting started guide 2019-10-31
www.crosscontrol.com 15
5.1. Using the “uncomplicated firewall”
Configuring the Linux firewall iptables can be complicated. A more user friendly approach is to
install the “uncomplicated firewall” package. This is a frontend to iptables.
# apt-get install ufw
By default ufw will configure the firewall to deny all incoming connections and allow all outgoing
connections.
SSH login could be useful, at least during development, and access to the device will be disabled
when the firewall is enabled. To allow SSH login:
# ufw allow ssh
This enables ssh traffic on port 22. It is also possible to specify port number, but ufw uses many
common keywords.
To activate the firewall, type:
# ufw enable
If an error regarding IPv6 is encountered when the firewall is enabled, IPv6 support has to be
turned off using the config file:
nano /etc/default/ufw
Change IPV6=yes to IPV6=no.
A kernel module for IPv6 will be added in the next OS release of CrossLink TG.
6. Further Reading
For more information please consult the CrossLink TG Technical Manual and the CrossLink TG
Programmer and Software Manual, both are available at the CrossControl Support Site.
Other manuals for CrossLink TG
1
Table of contents
Other crosscontrol Industrial Electrical manuals
Popular Industrial Electrical manuals by other brands

Murata
Murata GRM1555C1H5R2DA01 Series Reference sheet

Woodward
Woodward 3161 Governor Operation manual

Witeg
Witeg Rocker 440 Introduction manual

TERASAKI
TERASAKI TemBreak PRO TPFP12S instruction manual

Murata
Murata GRM0335C1H150GA01 Series Reference sheet

Murata
Murata GQM1885C1H270GB01 Series Reference sheet

Wieland
Wieland Rhodinette 2 operating instructions

Eaton
Eaton XTCS250L Series Instruction leaflet

Murata
Murata GRM3195C2A272JA01 Series Reference sheet

SOMFY
SOMFY Connect UAI Plus Integration guide

Murata
Murata GRM0225C1E6R1WA03 Series Reference sheet

Murata
Murata GJM0335C1H4R5BB01 Series Reference sheet