SIMATIC IOT2050 IndustrialOS Getting Started V3.2.2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 52

Industrial OS V3.2.

2
on SIMATIC IOT2050 -
Getting Started

SIMATIC IOT2050 Advanced - 6ES7647-0BA00-1YA2


Legal information

Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several
components in the form of text, graphics and/or software modules. The application examples are
a free service by Siemens AG and/or a subsidiary of Siemens AG (“Siemens”). They are non-
binding and make no claim to completeness or functionality regarding configuration and
equipment. The application examples merely offer help with typical tasks; they do not constitute
customer-specific solutions. You yourself are responsible for the proper and safe operation of the
products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the
application examples used by technically trained personnel. Any change to the application
examples is your responsibility. Sharing the application examples with third parties or copying the
application examples or excerpts thereof is permitted only in combination with your own products.
The application examples are not required to undergo the customary tests and quality inspections
of a chargeable product; they may have functional and performance defects as well as errors. It is
your responsibility to use them in such a manner that any malfunctions that may occur do not
result in property damage or injury to persons.

Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without
limitation, liability for the usability, availability, completeness and freedom from defects of the
application examples as well as for related information, configuration and performance data and
any damage caused thereby. This shall not apply in cases of mandatory liability, for example
under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of
life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent
non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for
damages arising from a breach of material contractual obligations shall however be limited to the
© Siemens AG 2020 All rights reserved

foreseeable damage typical of the type of agreement, unless liability arises from intent or gross
negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions
do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens
against existing or future claims of third parties in this connection except where Siemens is
mandatorily liable.
By using the application examples you acknowledge that Siemens cannot be held liable for any
damage beyond the liability provisions described.

Other information
Siemens reserves the right to make changes to the application examples at any time without
notice. In case of discrepancies between the suggestions in the application examples and other
Siemens publications such as catalogs, the content of the other documentation shall have
precedence.
The Siemens terms of use (https://support.industry.siemens.com) shall also apply.

Security information
Siemens provides products and solutions with industrial security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary
to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens’ products and solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines
and networks. Such systems, machines and components should only be connected to an
enterprise network or the Internet if and to the extent such a connection is necessary and only
when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they are available
and that the latest product versions are used. Use of product versions that are no longer
supported, and failure to apply the latest updates may increase customer’s exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed
at: https://www.siemens.com/industrialsecurity.

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
2
Table of contents

Table of contents
Legal information ......................................................................................................... 2
1 Task ..................................................................................................................... 4
1.1 Overview............................................................................................... 4
2 Requirements ..................................................................................................... 5
2.1 Required Hardware .............................................................................. 5
2.2 Required Software ................................................................................ 6
3 Operating ............................................................................................................ 7
3.1 Create Industrial OS Service Stick ....................................................... 7
3.2 (Re-)install Industrial OS ...................................................................... 8
3.2.1 With empty eMMc ................................................................................. 8
3.2.2 With image on eMMC ......................................................................... 11
3.3 First Setup of the Industrial OS .......................................................... 14
3.3.1 Language ........................................................................................... 15
3.3.2 Keyboard settings ............................................................................... 15
3.3.3 Network settings ................................................................................. 17
3.3.4 Firewall ............................................................................................... 20
3.3.5 Timezone ............................................................................................ 23
3.3.6 Hostname ........................................................................................... 24
3.3.7 Date / Time ......................................................................................... 25
3.3.8 Apt mirror ............................................................................................ 27
© Siemens AG 2020 All rights reserved

3.3.9 Root user ............................................................................................ 28


3.3.10 User .................................................................................................... 29
3.3.11 Apt update .......................................................................................... 31
3.3.12 Install software ................................................................................... 31
3.3.13 Autostart of Service Stick ................................................................... 33
3.3.14 Result ................................................................................................. 33
3.4 Change settings of the Industrial OS (mel-setup) .............................. 35
3.4.1 Settings from first setup ...................................................................... 35
3.4.2 Serial port and Arduino pins ............................................................... 37
3.5 Change boot order ............................................................................. 41
3.6 Clear eMMc ........................................................................................ 43
3.7 Backup / Restore with Service Stick .................................................. 44
3.7.1 Backup................................................................................................ 44
3.7.2 Restore ............................................................................................... 46
3.8 Use of an UART cable ........................................................................ 48
3.8.1 Install and Setup Industrial OS ........................................................... 50
3.8.2 Change boot order permanently ........................................................ 50
3.8.3 Select boot device for next boot ......................................................... 51
3.8.4 Use serial connection instead of ssh or monitor ................................ 51
4 Related links ..................................................................................................... 52
5 History............................................................................................................... 52

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
3
1 Task

1 Task
1.1 Overview
Introduction
Currently the IOT2050 Advanced (6ES7647-0BA00-1YA2) comes with an empty
internal eMMc at the moment (latest FS:05). In order to use the Industrial OS V3.2.2,
it needs to be written to the eMMc with the help of the Industrial OS Service Stick.

This documentation is only valid for IOT2050 Advanced 6ES7647-0BA00-1YA2


NOTE FS:04 / FS:05 and FS:01 – FS:03 with updated firmware (as of V1.2.1)

Goals
After working through this document, you should know how to
• Create Service Stick
• Install the Industrial OS to the eMMC
• Complete the first set up of the Industrial OS
© Siemens AG 2020 All rights reserved

• Create an autostart script for node-red


• Change IP settings
• Change the boot order
• Clean the eMMc and install the Industrial OS from scratch
• Use the Backup / Restore functionality of the Service Stick
• Use a UART cable and its advantages

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
4
2 Requirements

2 Requirements
2.1 Required Hardware
This chapter contains the hardware required for this Getting Started.

SIMATIC IOT2050 Advanced


The SIMATIC IOT2050 Advanced (6ES7647-0BA00-1YA2) has an internal 16GB
eMMc where the Industrial OS can be installed.
So far there is no Industrial OS pre-installed in the delivered devices (latest: FS:05)

This documentation is valid for IOT2050 Advanced 6ES7647-0BA00-1YA2


NOTE FS:04 / FS:05 and FS:01 – FS:03 with updated firmware (as of V1.2.1)

DisplayPort Cable (Male-Male) or active HDMI-DP adapter and Monitor


It is important that a direct DP-DP connection or an active DP-HDMI between the
IOT2050 and the monitor is used.
There won’t be any display output with a non-active HDMI-DP adapter
© Siemens AG 2020 All rights reserved

Keyboard
For operating the IOT2050 with a monitor, a USB-Keyboard is required.

Power supply
In order to run the SIMATIC IOT2050 a power supply is required.
This power supply has to provide between 12 and 24V DC.

USB flash drive


This USB flash drive is used for creating the Service Stick for installing software and
use the backup / restore functionality

Engineering Station
To write the Service Stick image to a USB flash drive, an Engineering Station is
required. In this example a PC with Windows 10 is used for this

UART cable (optional, but recommended)


To establish a serial connection to the IOT2050 in order to get into the u-boot shell
a 3.3V USB-UART cable is needed. This is very helpful in many cases, check
chapter 3.8
There are many hardware possibilities, good experiences were made with this
cable.

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
5
2 Requirements

2.2 Required Software


This chapter contains the software required for this Getting Started.

Industrial OS Service Stick V3.2.2


The Industrial OS Service Stick is required for the installation of the Industrial OS
and backup / restore functionality. Details see chapter 3.1
It can be downloaded here.

balenaEtcher
To write the Service Stick Image to the USB flash drive, the software balenaEtcher
is used.
balenaEtcher can be downloaded here.
© Siemens AG 2020 All rights reserved

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
6
3 Operating

3 Operating
This chapter describes the steps necessary install, configure and start up the
SIMATIC IOT2050 with Industrial OS using the hard- and software listed above.

Precondition
A monitor (DP or with active HDMI-DP adapter) is connected to the IOT2050, and it
is supplied with a suitable power supply.
As an alternative a UART cable can be used (see chapter 3.8.1)

3.1 Create Industrial OS Service Stick


A main part of the Industrial OS is the so-called Service Stick.
The Service Stick is required for
• (Re-)Installation of the Industrial OS (chapter 3.2)
• Backup / Restore functionality (chapter 3.7)

In order to create the Service Stick, follow these steps:


© Siemens AG 2020 All rights reserved

- Download Service Stick Image from here:


IOT2050_IndustrialOS_Service_Stick_V3.x.x.zip

- Unzip the downloaded file

- Write the extracted Service Stick image (.img) to a USB flash drive with the
software balenaEtcher.

After the flashing process balenaEtcher may report that the flash failed.
NOTE
This is not true; the Service Stick is valid!

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
7
3 Operating

3.2 (Re-)install Industrial OS


To get started the Industrial OS needs to be installed on the IOT2050 Advanced.
Re-installation of the Industrial OS can be required in some cases.
There are three different ways of doing this, which depend on how the boot-order is
set
• With empty eMMc
• With an operating system on the eMMc
• Using UART cable (changing boot device for each boot manually) – details
see chapter 3.8

Details on changing the boot order with Example Image can be found in chapter
3.5

3.2.1 With empty eMMc

- Perform steps in chapter 3.6, if eMMC is not empty

- Only if default boot order has been changed:


Either boot Example Image from SD card and change boot-order to set eMMc
as first boot device and usbx as second
© Siemens AG 2020 All rights reserved

fw_setenv boot_targets “mmc1 usb0 usb1 usb2 mmc0”


or use UART cable (chapter 3.8.2) to change boot order

- Plug in the Service Stick to a USB 2.0 interface of the IOT2050 and reboot the
IOT2050

- Due to an empty eMMc the IOT2050 will boot from the Service Stick

- Choose Install System

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
8
3 Operating

- Select mmcblk1 as Install destination and go to Install selected image

- The system checks the PGP signature


© Siemens AG 2020 All rights reserved

- Confirm the installation

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
9
3 Operating

- Now the Industrial OS is being installed on the eMMc

- Once the installation is complete, the system requires a reboot


© Siemens AG 2020 All rights reserved

- The next boot will happen from eMMc, since the Industrial OS is now installed
The first setup appears. Continue with chapter 3.3

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
10
3 Operating

3.2.2 With image on eMMC

- Either boot Example Image from SD card and change boot-order to set usbx
as first boot device and mmc1 as second
fw_setenv boot_targets “usb0 usb1 usb2 mmc1 mmc0”
or use UART cable (chapter 3.8.2) to change boot order

- Plug in the Service Stick to a USB 2.0 interface of the IOT2050 and reboot the
IOT2050

- Due to the boot order the IOT2050 will boot from the Service Stick

- Choose Install System


© Siemens AG 2020 All rights reserved

- Select mmcblk1 as Install destination and go to Install selected image

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
11
3 Operating

- The system checks the PGP signature

- Confirm the installation


© Siemens AG 2020 All rights reserved

- Now the Industrial OS is being installed on the eMMc

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
12
3 Operating

- Once the installation is complete, the system requires a reboot

- After triggering the reboot, remove the Service Stick, so that the next
boot will be done from the eMMc and not the USB Stick!
© Siemens AG 2020 All rights reserved

- During the boot process – best case when the STAT LED goes off – plug
the Service Stick in

- The first setup appears. Continue with chapter 3.3

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
13
3 Operating

3.3 First Setup of the Industrial OS


- When the IOT2050 boots for the very first time, the so-called mel-setup
appears automatically after some seconds.

If you see localhost login for a longer time, try a reboot via the Reset button

The mel-setup will guide through the necessary configuration steps of the
© Siemens AG 2020 All rights reserved

Industrial OS.

NOTE The setup can only be operated with a keyboard, not with a mouse.
Use the arrow keys to navigate
Use TAB to select <OK> or <Cancel>
Use ENTER to activate the selected option

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
14
3 Operating

3.3.1 Language

- The very first step is to configure the language

3.3.2 Keyboard settings

- After that a keyboard model can be configured.


© Siemens AG 2020 All rights reserved

Please use the default pc105, if not sure which one to choose. Otherwise it can
lead to some non-working keys

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
15
3 Operating

- Now select the keyboard layout

It is also possible to jump directly to a specific layout instead of using the arrow
keys. For example, just press “d” to jump to the first layout with the letter d (de).

- As keyboard variant choose the default None


© Siemens AG 2020 All rights reserved

- To kill the xserver with the combination ctrl-alt-backspace choose Yes,


otherwise No.
By choosing Yes, the graphical interface (if installed manually afterwards) can
be killed to only use the terminal. This may be helpful in situations when the
graphical interface crashed

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
16
3 Operating

- After these keyboard settings the next steps are initialized

3.3.3 Network settings

The IOT2050 Advanced has two Ethernet interfaces, which can be configured in
this step:
• eno1= X1P1
• eno2 = X1P2
© Siemens AG 2020 All rights reserved

- Select the interface to configure. There are three different modes available
• dhcp – get IP address automatically from a dhcp server
• static – set IP address manually
• disable – disable the interface

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
17
3 Operating

- When selecting static, the following network settings need to be done

- Set an IP address
© Siemens AG 2020 All rights reserved

- Set the subnet mask

- Set the gateway. This can be left blank if there is no gateway needed

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
18
3 Operating

- Set DNS server(s). This can be left blank if there is no DNS server needed

- After having both interfaces configured, select Done


© Siemens AG 2020 All rights reserved

- If you require a proxy for internet connection, e.g. within a company network, it
may be needed to set a proxy. This can be done in this step.
If Yes is selected, proxy can be set for:
• http
• https
• ftp
• no-proxy – exceptions where no proxy should be used

If No is selected there is nothing to do, and no proxy is set.


Recommended is to have a working connection towards debian.org to allow
adding an apt mirror in a later step.

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
19
3 Operating

3.3.4 Firewall

- To activate and configure the firewall select Yes.


To disable the firewall select No

- If Yes was chosen in the step before, OpenSSH is configured to be allowed by


the firewall by default.
To add an additional rule select Add Rule
© Siemens AG 2020 All rights reserved

- Choose between a pre-defined Application or Port

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
20
3 Operating

Application
- You can choose from a list of pre-defined applications. In this example the
software Node-RED is chosen

- After that the direction needs to be configured – for most of the applications it
is in as you want to connect from outside to the application
© Siemens AG 2020 All rights reserved

- After selecting the direction it can be chosen to be allowed or denied

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
21
3 Operating

Port
- Instead of selecting an application you can enter a port number

- After that the direction needs to be configured – for most of the applications it
is in as you want to connect from outside to the application
© Siemens AG 2020 All rights reserved

- Select the protocol which is allowed via this port

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
22
3 Operating

- After selecting the direction it can be chosen to be allowed or denied

- Now every chosen application / port is listed in the overview. Select Done to
proceed with the setup
© Siemens AG 2020 All rights reserved

3.3.5 Timezone

- Firstly choose the region the IOT2050 is located in

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
23
3 Operating

- Choose the city within this region

3.3.6 Hostname

- Enter/Change the hostname (computer name) of the IOT2050.


© Siemens AG 2020 All rights reserved

localhost is set by default when no Ethernet cable is plugged


localhost.localdomain is set by default when an Ethernet cable is plugged

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
24
3 Operating

3.3.7 Date / Time

The date and time can be set manually or being provided by a NTP server. The
following shows the steps of both options, only one of them is required to be done.

NTP

- Enter one or more NTP servers to synchronize the date and time; either
publicly available servers from the internet or local ones (e.g. a router, switch
or any other device providing NTP server functionality)
© Siemens AG 2020 All rights reserved

- Each added server is listed in an overview. Select Done to continue

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
25
3 Operating

Manual

- Set the Date in format YYYY-MM-DD (Year-Month-Day)


© Siemens AG 2020 All rights reserved

- Set the Time in format HH:MM:SS (Hour:Minute:Second)

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
26
3 Operating

3.3.8 Apt mirror

In order to install software via the package manager apt it is required to use a so-
called mirror (or repository) as resource for software packages.
- Choose Add Mirror to add a mirror from a pre-defined list

- In this example the official Debian mirror in Germany is selected


© Siemens AG 2020 All rights reserved

Choose which categories of software are allowed to be installed:


- Main - packages that are compliant with the “Debian Free Software
Guidelines” (DFSG) and do not require external software to run
- Contrib - DFSG-compliant packages whose operation depends on non-free
software
- Non-free - Non-free packages that do not comply with the DFSG

The following screenshots show the default settings

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
27
3 Operating

- After having selected the mirror(s) select Done


© Siemens AG 2020 All rights reserved

3.3.9 Root user

The user root (also known as superuser) is a special account in Linux that is used
for system administration. The root account is the privileged account on a Linux
system that has access to all commands and files.

- The first setting regarding root is to enable or disable the root login.
Select No if root login should be enabled → recommended
Select Yes if root login should be disabled

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
28
3 Operating

- As next step a root password is set.


It needs to consist of at least 8 characters

- Enter the password again


© Siemens AG 2020 All rights reserved

NOTE Do not forget the root password!

3.3.10 User

After setting the root password a standard user is created.


- Enter the user’s full name (in this example only siemens is used as full name)

- Enter the user’s id


This is used as login name for the user

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
29
3 Operating

- Enter the user password


It needs to consist of at least 8 characters

- Enter the user password again


© Siemens AG 2020 All rights reserved

- Select if the user is supplied with superuser privileges. This allows the user to
execute commands with a pre-fixed sudo, which means to perform the
command with root privileges

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
30
3 Operating

3.3.11 Apt update

- Select in which cycle the selected repository from chapter 3.3.8 is updated
automatically.
The update can also be performed manually with the command apt update on
the running system

3.3.12 Install software


© Siemens AG 2020 All rights reserved

- The Industrial OS provides the option to install some pre-defined software


packages automatically during the first setup

Software marked with an i (e.g. Node-RED) is already pre-installed on the


Industrial OS.
Software marked as [ONLINE] requires a connection to the repository set in
chapter 3.3.8 at this stage of the installation.

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
31
3 Operating

- It is recommended to install the Essential development tools. Therefore


navigate to this package and press Enter

- Select install and press Enter


© Siemens AG 2020 All rights reserved

- Repeat this for other software to be installed

- Navigate to the bottom of the list and select Done

Of course it is possible to install software via apt install afterwards in the running
system.

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
32
3 Operating

3.3.13 Autostart of Service Stick

The last step of the setup is about the autostart of the Service Stick.
• Enable means that a setup opens automatically by plugging the Service
Stick into the IOT2050 when Industrial OS is running, even when no user
is logged in (This can be helpful in many cases (e.g. forgotten
passwords), but also brings a security disadvantage of possible local
attacks.)
This only works with monitor or UART connection, not with ssh!
• Disable means that the setup does not open automatically. It can still be
called manually with the command mel-setup as root or sudo mel-setup
as user with superuser privileges (precondition for this is having enabled
superuser privileges in chapter 3.3.10).
© Siemens AG 2020 All rights reserved

3.3.14 Result

- After the configuration is complete, the system will perform the installation
steps

- After that the optionally chosen software will be installed

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
33
3 Operating

- When this is done, the system is ready, and it is possible to login to the
system; either as root or the configured user
© Siemens AG 2020 All rights reserved

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
34
3 Operating

3.4 Change settings of the Industrial OS (mel-setup)


In order to change the settings made during the first setup, mel-setup can be
called as root or sudo mel-setup as user (precondition for this is having enabled
superuser privileges in chapter 3.3.10) in the running system.
As an alternative plug in the Service Stick – if Autostart (chapter 3.3.13) has been
enabled, the mel-setup will open

3.4.1 Settings from first setup

- At first the setup is being initialized

- After that you can choose the category, you want to make changes
© Siemens AG 2020 All rights reserved

IP addresses of the interfaces can be changed faster with the command nmtui as
root or sudo nmtui as user.
Remember that a reboot or re-initialization of the interfaces is required after making
changes

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
35
3 Operating

- After making changes select Apply changes


© Siemens AG 2020 All rights reserved

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
36
3 Operating

3.4.2 Serial port and Arduino pins

Using the mel-setup it is also possible to change the mode of the serial port as well
as the mode of the Arduino pins of the IOT2050.

Default settings
The default setting of the serial port (IOT2050 External Serial) is RS232.
By default all Arduino pins are set to GPIO_Input.
- The current mode of the Arduino pins can be checked under IOT2050 Arduino
IO Info
© Siemens AG 2020 All rights reserved

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
37
3 Operating

- The first screen shows the available modes of the several GPIOs
© Siemens AG 2020 All rights reserved

- Press Tab and Enter to see the current configuration

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
38
3 Operating

Change settings
As an example it is shown how to activate the UART pins of the Arduino interface
- Select IOT2050 Arduino UART
© Siemens AG 2020 All rights reserved

- Choose whether to use TX & RX (Pin 0 and Pin 1)

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
39
3 Operating

- Choose whether to use CTS & RTS (Pin 2 and Pin3)

- After that Apply changes


© Siemens AG 2020 All rights reserved

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
40
3 Operating

- Call mel-setup again and check the mode under IOT2050 Arduino IO Info
© Siemens AG 2020 All rights reserved

- To disable UART again, set RX & TX and CTS & RTS to false

3.5 Change boot order


The eMMc is set as first boot device by default. If this should be changed, because
the SD card with Example Image should be booted or to boot from the Industrial
OS Service Stick the boot order needs to be changed.
Displaying or changing these kinds of variables the commands fw_printenv and
fw_setenv are used.

- To check the current boot order, use fw_printenv boot_targets

The default output before changing anything is


boot_targets=mmc1 mmc0 usb0 usb1 usb2.
The order is set from left to right.
1. mmc1 = eMMc
2. mmc0 = SD card
3. usbx = usb slots and mPCIe

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
41
3 Operating

- To change the boot order use the command fw_setenv boot_targets


followed by the required order of devices in quotation marks, e.g.
fw_setenv boot_targets “usb0 usb1 usb2 mmc0 mmc1”

This example at first checks the USB slots for bootable devices, then the SD
card and as last option the eMMc.

NOTE Having the eMMc as last boot device always gives the option to boot from SD
card / USB flash drive by simply plugging a device with the Example Image /
Service Stick and restarting the device!
This can be helpful in many cases, but also brings a security disadvantage of
possible local attacks.
© Siemens AG 2020 All rights reserved

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
42
3 Operating

3.6 Clear eMMc


Some possible scenarios may require clearing the eMMc (deleting the installed
OS):
• Instead of Industrial OS, it is wished to use the Example Image on the eMMc
• The eMMc should be used as extended mass storage for an OS running on SD
card
• …

- To clear the eMMc, it is needed to boot the Example Image from a SD card or
USB flash drive. One pre-condition for this is having the boot order changed
(see chapter 3.5)

- After logging in to the Example Image execute the command


mkfs.ext4 /dev/mmcblk1 and press Y when asked to proceed. This will erase
all contents of the eMMc
© Siemens AG 2020 All rights reserved

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
43
3 Operating

3.7 Backup / Restore with Service Stick


The Service Stick provides a backup and restore functionality, to easily create an
image from the internal eMMc or to restore a created image
A backup of an Industrial OS without any additionally installed software is about
1GB of size.

3.7.1 Backup

- Change boot order that the IOT2050 boots from USB


fw_setenv boot_targets “usb0 usb1 usb2 mmc1 mmc0”
- Plug in the Service Stick and reboot the IOT2050
- Choose Backup System
© Siemens AG 2020 All rights reserved

- Choose the system drive to back up and the destination partition

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
44
3 Operating

NOTICE Possible destination partitions


USB drives may be used as destination partition, but both USB slots are
probably occupied by Service Stick and keyboard.
Either a USB-Hub is used to plug a third USB device, or the Backup/Restore
functionality needs to be used with UART cable to free the keyboard USB slot!
For details about the UART cable see chapter 3.8
In this example the backup is saved to an SD card.

- Navigate to the end of the page and select Continue


© Siemens AG 2020 All rights reserved

- Now the backup is being created

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
45
3 Operating

- Once it is finished go back to the main menu

3.7.2 Restore

- Change boot order that the IOT2050 boots from USB


© Siemens AG 2020 All rights reserved

fw_setenv boot_targets “usb0 usb1 usb2 mmc1 mmc0”


- Plug in the Service Stick and the USB drive containing the backup and reboot
the IOT2050
- Choose Restore System

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
46
3 Operating

- Choose the restore destination (mmcblk1) and the backup on respective


medium

- Now the restore image is being written to the eMMc


© Siemens AG 2020 All rights reserved

- Once this is done, the system requires a reboot

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
47
3 Operating

NOTE After triggering the reboot, remove the Service Stick, that the next boot will be
done from eMMc!

3.8 Use of an UART cable


A UART cable is a very helpful device because you can establish a serial connection
via putty or interrupt the boot.
This can be helpful in many cases:
• Perform the installation and first setup of the Industrial OS (chapter 3.2 /
chapter 3.3) without a monitor
• To change boot order permanently without the need to configure the
Industrial OS at first
• To select to boot from SD card / USB only for the upcoming boot
• To connect to a system serially instead of using ssh (e.g. IP address is not
known and there is no monitor)
• Detect the problem, when IOT2050 does not boot for some reasons
© Siemens AG 2020 All rights reserved

The next steps show how to use this cable and how to establish a serial
connection.

- Power off the IOT2050


- The UART cable needs to be connected to the IOT2050 to X14. Therefore it is
required to open the lid for the Arduino interface to access X14.
The M wire (black in this example) needs to be connected to the pin 1

- Connect the USB part of the cable to your PC. Drivers may need to be
installed, please check the website of the vendor of the used cable.

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
48
3 Operating

- Go to Device Manager of your PC and check the assigned COM port

NOTE If there is no COM port assigned and the device appears as an unknown device,
it is needed to install the drivers for the cable

- Open putty and configure the connection like this (COM port can differ) and
click on Open
© Siemens AG 2020 All rights reserved

- Power on the IOT2050. It is now possible to see the whole boot process

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
49
3 Operating

3.8.1 Install and Setup Industrial OS

With this procedure it is possible to perform the installation and initial setup of the
Industrial OS (chapter 3.2 / chapter 3.3).
Connect the cable and establish the serial connection prior to the boot of the
Service Stick and the mel-setup will appear in the putty console instead of the
monitor.
This can be done when there is no DP monitor or no active converter available

3.8.2 Change boot order permanently

To change the boot order prior to the boot to eMMc follow this process
- Interrupt the boot process at the point Hit any key to stop autoboot by hitting
any key. This will end up in the u-boot shell (indicated by IOT2050>)
© Siemens AG 2020 All rights reserved

- Here change the boot order with the command


setenv boot_targets “usb0 usb1 usb2 mmc0 mmc1” and save the
configuration with saveenv

- Type in boot to continue booting with the changed boot order

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
50
3 Operating

3.8.3 Select boot device for next boot

It is possible to select the boot device only for the upcoming boot – independently
from the set boot order.

- Enter the u-boot shell (see chapter 3.8.2)


- Enter run bootcmd_<device> to boot from one specific device

- This procedure can be used to re-install the Industrial OS, without deleting the
current installation on eMMc beforehand (see chapter 3.2.2).
First boot from USB drive, second boot after automatic reboot from mmc1

3.8.4 Use serial connection instead of ssh or monitor

It is also possible to operate the IOT2050 with a serial connection instead of using
a ssh connection or a monitor.
After having booted from a device with an operating system the login prompt of
© Siemens AG 2020 All rights reserved

Industrial OS or the Example Image will appear, and the terminal can be used for
any kind of terminal operations

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
51
4 Related links

4 Related links
Table 4-1
Topic
\1\ SIMATIC IOT2050 forum
https://support.industry.siemens.com/tf/ww/en/threads/309w
\2\ Download SD-Card Example Image
https://support.industry.siemens.com/cs/ww/en/view/109741799
\3\ Operating Instructions
https://support.industry.siemens.com/cs/ww/en/view/109779016

5 History
Table 5-1
Version Date Modifications
V1.0.0 07/2021 First version
© Siemens AG 2020 All rights reserved

V1.0.1 08/2021 Chapter 3.9.3: corrected “run bootcmd mmc0” to


“run bootcmd_mmc0”
V3.2.2 01/2023 Adapted Industrial OS Version to V3.2.2 and several other
changes

IOT2050 Industrial OS Getting Started


Version 3.2.2, 01/2023
52

You might also like