0% found this document useful (0 votes)
25 views20 pages

Linux Support Package Installation Manual enUS en-US

Uploaded by

byron7cueva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views20 pages

Linux Support Package Installation Manual enUS en-US

Uploaded by

byron7cueva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Linux Support Package V1.

7
Introduction 1

Installation 2

3
SIMATIC Using the modules

Modules on IPC devices 4


Industrial PC
Linux Support Package V1.7

Installation Manual

03/2024
A5E53649014-AA
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.

DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.

WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.

CAUTION
indicates that minor personal injury can result if proper precautions are not taken.

NOTICE
indicates that property damage can result if proper precautions are not taken.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation, in particular its warning notices and safety instructions.
Qualified personnel are those who, based on their training and experience, are capable of identifying risks and
avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:

WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be complied with. The information in the relevant documentation must be observed.

Trademarks
All names identified by ® are registered trademarks of Siemens Aktiengesellschaft. The remaining trademarks in
this publication may be trademarks whose use by third parties for their own purposes could violate the rights of
the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.

Siemens Aktiengesellschaft A5E53649014-AA Copyright © Siemens 2024.


Digital Industries Ⓟ 03/2024 Subject to change All rights reserved
Postfach 48 48
90026 NÜRNBERG
GERMANY
Table of contents

1 Introduction ........................................................................................................................................... 4
2 Installation............................................................................................................................................. 5
2.1 Compiling and installing the modules................................................................................... 5
3 Using the modules ................................................................................................................................. 7
3.1 Changing the status of the LEDs ........................................................................................... 7
3.2 Configuring and testing the watchdog ................................................................................. 8
3.3 Button ............................................................................................................................... 11
3.4 Monitoring the battery ....................................................................................................... 12
3.5 Monitoring temperature and fan ........................................................................................ 13
3.6 Checking the redundant AC power supply .......................................................................... 15
3.7 Reacting to power loss (NAU) ............................................................................................. 16
3.8 Accessing the NVRAM (read/write) ..................................................................................... 17
4 Modules on IPC devices ....................................................................................................................... 18
4.1 Hardware / feature table .................................................................................................... 18

Linux Support Package V1.7


Installation Manual, 03/2024, A5E53649014-AA 3
Introduction1

1
SIMATIC IPC Linux Support Package is a device driver collection for Siemens SIMATIC IPCs.
Some features of the mainline Linux kernel are currently not available by default on SIMATIC
IPCs. In this manual, you will find information about how to use these features on SIMATIC
IPC devices.
• LEDs
• Watchdog
• Buttons
• CMOS battery monitoring
• Temperature monitoring
• Fan monitoring
• Fan control
• Redundant AC power supply failure monitoring
• NVRAM access and power failure detection (NAU)

Note
Not every feature is supported on every IPC. For details, see chapter "Hardware / feature table
(Page 18)".

Linux Support Package V1.7


4 Installation Manual, 03/2024, A5E53649014-AA
Installation2

2
2.1 Compiling and installing the modules

Prerequisites
• Supported SIMATIC IPC hardware. For details, see "Hardware / feature table (Page 18)".
• Working Linux operating system. We recommend Siemens SIMATIC Industrial Linux V3.4.2
or higher.
• Tools for building the modules and Linux kernel header files. On Debian based
distributions these tools are stored in a package called "build-essential" and the kernel
header files are stored in a package called "linux-headers-amd64". For details, see
documentation of your distribution.

Compiling the modules


1. Copy the source code and the Makefile to a working directory.
2. Open a command line.
3. Change directory to your working directory.
4. Compile the modules:
$ make

Note
Since LSP version 1.7.0, the LED compatibility driver is no more built by default, since legacy
led names are declared as deprecated.
The simatic_ipc_compat driver can be used with conditional build:
"make EXTRA_MODULES=led_compat"

Linux Support Package V1.7


Installation Manual, 03/2024, A5E53649014-AA 5
Installation
2.1 Compiling and installing the modules

Installing the modules


1. After successful compilation, the modules can be installed:
$ sudo -E make install
$ sudo depmod

Note
Siemens SIMATIC Industrial Linux V3.2.4 or higher uses a watchdog setup based on LSP
via initramfs. So after LSP installation the following command is necessery to generate an
updated initramfs image.

$ sudo update-initramfs -u

Automatic activation
After successful installation, the modules are activated automatically during the booting
process on every compatible Siemens SIMATIC IPC.
After a reboot, the main module simatic-ipc and the necessary submodules are loaded
automatically.

Linux Support Package V1.7


6 Installation Manual, 03/2024, A5E53649014-AA
Using the modules3

3
3.1 Changing the status of the LEDs
Prerequisites

Note
Since LSP version 1.5, the LED names have been changed to conform to the Linux naming
convention, please refer to: (https://docs.kernel.org/leds/leds-class.html)

The new driver simatic-ipc-compat.ko can be loaded manually to create additional


LEDs with the previous names.
The following table shows the new and the old names:

Legacy Name New Name


simatic-ipc:<color>:run-stop <color>:status-1
simatic-ipc:<color>:error <color>:status-2
simatic-ipc:<color>:maint <color>:status-3
simatic-ipc:<color>:fan <color>:alarm
simatic-ipc:<color>:hdd<n>-alarm <color>:disk-err-<n>
With <color> = red, green, yellow
The legacy LED names can be created manually with:
$ sudo modprobe simatic-ipc-leds-compat

Prerequisites
The LEDs are available through the sysfs interface. The path is:
/sys/class/leds/
There is no further configuration necessary.

Procedure
1. Open a command line.
2. Configure the brightness attribute of the corresponding LED. This has to be done with
superuser rights.
To enable the lights, write "1".
To disable the lights, write "0".
$ sudo su
# echo 1 > /sys/class/leds/red:status-1/brightness
# echo 0 > /sys/class/leds/yellow:status-2/brightness
You can now see the change on your IPC's LEDs

Linux Support Package V1.7


7 Installation Manual, 03/2024, A5E53649014-AA
Using the modules
3.2 Configuring and testing the watchdog

3.2 Configuring and testing the watchdog

Prerequisites
• The watchdog is available through the sysfs interface. The path is:
/sys/class/watchdog/watchdog*
• Unnecessary and/or not working watchdog drivers are disabled.
To disable watchdog driver:
– Add the following lines to: /etc/modprobe.d/blacklist.conf:
blacklist wdat_wdt
blacklist mei_wdt
blacklist iTCO_wdt

Note
On IPC127E the only available watchdog is wdat_wdt.
If you want to use the watchdog on IPC127E, don't disable it.

Triggering the watchdog


After enabling the watchdog module, it has to be triggered periodically, for example from a
custom application. As basic alternative, the kernel watchdog daemon can be used to trigger
the watchdog.
On Industrial Linux 2.x, which is based on Debian 10 (Buster), the daemon is configured via:
/usr/lib/systemd/system.conf.d/99-watchdog.conf
For details, see: "Debian Manpage for systemd-system.conf
(https://manpages.debian.org/buster/systemd/systemd-system.conf.5.en.html).

Defining the timeout for the watchdog


The following entry defines the timeout for the watchdog. If the watchdog is not triggered
during this time, it will cause a system reset/reboot.
RuntimeWatchdogSec=64s

Linux Support Package V1.7


8 Installation Manual, 03/2024, A5E53649014-AA
Using the modules
3.2 Configuring and testing the watchdog

Override the default configuration


If you want to override the watchdog's default configuration on Industrial Linux 2.x, create a
user configuration file
/etc/systemd/system.conf.d/watchdog.conf
with the following content:
[Manager]
RuntimeWatchdogSec=32s

Note
Other distributions use other configuration files.
For details, see documentation of your distribution.

Timeout values
The hardware watchdog is able to use one of these timeout values:
• IPC427D, IPC477D, IPC227E, IPC277E, IPC427E, IPC477E:
2s, 4s, 6s, 8s, 16s, 32s, 48s, 64s
• IPC227G, IPC277G, IPC BX-39A, IPC PX-39A:
1 - 255s, 1 - 255min
(Minute mode is used, if watchdogs daemons timeout setting is > 255s. In this case, the
timeout is always round off to the minute.)
• IPC627D, IPC647D, IPC677D, IPC827D, IPC847D, IPC627E, IPC647E, IPC677E, IPC847E:
1s, 2s, ..., 255s
• IPC227D, IPC277D
1s, 2s, ..., 600s (10 min)
• IPC BX-21A:
1s, 2s, ..., 1024s
• IPC BX-56A, IPC BX-59A:
1s, 2s, ..., 255s

Linux Support Package V1.7


Installation Manual, 03/2024, A5E53649014-AA 9
Using the modules
3.2 Configuring and testing the watchdog

Testing

Note
These test steps do not apply to SIMATIC IPC127E, IPC2x7D.

NOTICE
Danger of data loss
The following test steps will cause your system to become unresponsive, after which the
watchdog will perform a hard reset.
In order to avoid data loss, please take the necessary precautions, like for example:
• save all files, sync filesystems
• close applications

1. Ensure that your watchdog configuration is correct.


2. Force a kernel panic with the following commands:
$ sudo su
# echo 1 > /proc/sys/kernel/sysrq
# echo c > /proc/sysrq-trigger
3. After the configured watchdog timeout, the device will perform a hard reset. After
rebooting, you can check the watchdog status with:
$ cat /sys/class/watchdog/watchdog0/bootstatus
– The watchdog status should be "32" (WDIOF_CARDRESET) in case of a reboot triggered
by the watchdog.
– The watchdog status should be "0" in case of a normal reboot.
4. In addition, the following message appears in syslog:
"simatic-ipc-wdt: last reboot caused by watchdog reset"

See also
manpages.debian.org bullseye systemd systemd-system.conf.5.en.html
(https://manpages.debian.org/bullseye/systemd/systemd-system.conf.5.en.html)

Linux Support Package V1.7


10 Installation Manual, 03/2024, A5E53649014-AA
Using the modules
3.3 Button

3.3 Button

Prerequisites
Button will be represent as an input device under Linux. The path is:
/dev/input/by-path/platform-gpio-keys-polled-event
You can do the following step to ensure that the button test works properly:
1. Finding the event file which platform-gpio-keys-polled-event links to
$ ls -l /dev/input/by-path/
lrwxrwxrwx 1 root root 9 Apr 21 2022 pci-0000:00:14.0-usb-
0:3:1.0-event-kbd -> ../event4
lrwxrwxrwx 1 root root 9 Apr 21 2022 pci-0000:00:14.0-usb-
0:3:1.1-event -> ../event6
lrwxrwxrwx 1 root root 9 Apr 21 2022 pci-0000:00:14.0-usb-
0:3:1.1-event-mouse -> ../event5
lrwxrwxrwx 1 root root 9 Apr 21 2022 pci-0000:00:14.0-usb-
0:3:1.1-mouse -> ../mouse0
lrwxrwxrwx 1 root root 10 Feb 12 13:40 platform-gpio-keys-polled-
event -> ../event16
2. Checking the name of event device
$ cat /sys/class/input/event16/device/name simatic-ipc-keys
3. If the name is simatic-ipc-keys, the button function is normal; otherwise, one will just
look at the wrong input device

Testing
Using following command to install package "evtest"
$ sudo apt install -y evtest
Then the button state could be read by using
$ sudo evtest /dev/input/by-path/platform-gpio-keys-polled-event

Linux Support Package V1.7


Installation Manual, 03/2024, A5E53649014-AA 11
Using the modules
3.4 Monitoring the battery

3.4 Monitoring the battery

Prerequisites
• Battery monitoring is available through the sysfs interface. The path is:
/sys/class/hwmon/hwmon*
• There is no further configuration necessary.

Monitoring battery status

Using "lm-sensors"
For monitoring the battery status, a tool like "lm-sensors" is recommended. Once installed,
use the following example command:
$ sensors
CMOSBattery-isa-0000
Adapter: ISA adapter
in0: 3.00 V (crit min = +2.50 V)

Reading the attribute "in0_input" for the corresponding hwmon


You can also check the status by reading the attribute "in0_input" for the corresponding
hwmon:
$ cat /sys/class/hwmon/hwmon3/in0_input
3000

Possible battery statuses


The battery can be in one of the following statuses:
• 3.00V - Full: CMOS battery capacity is still sufficient.
• 2.55V - Exhausted: CMOS battery capacity is exhausted, please replace as soon as
possible.
• 0.00V - Empty/Critical: CMOS battery is empty, please replace immediately.

Note
The values are only updated once every 24 hours because checking the remaining voltage
does negatively impact the battery voltage.

Linux Support Package V1.7


12 Installation Manual, 03/2024, A5E53649014-AA
Using the modules
3.5 Monitoring temperature and fan

3.5 Monitoring temperature and fan


Not all available hardware sensors report valid sensor data. Find information on how to fix
this, in this chapter.

Prerequisites
• A tool for reading temperature and fan values, like "lm-sensors".
• Temperature and fan monitoring is available through the sysfs interface. The path is:
/sys/class/hwmon/hwmon*

Note
For some devices temperature monitoring depends on external drivers "emc1403" (IPC127E,
IPC BX-21A, IPC BX-56A, IPC BX-59A IPC227D, IPC277D, IPC227E, IPC277E, IPC227G, IPC277G,
IPC427D, IPC477D, IPC427E and IPC477E) "nct6775" (IPC BX-39A, IPC PX-39A) and
"adm1021" (IPC627E, IPC677E, IPC647E, IPC847E, IPC627D, IPC647D, IPC677D, IPC827D,
IPC847D).
These drivers have to be available. This is the case in most current Linux enviroments.
After installing "simatic-ipc", the needed external drivers will be loaded automatically.

Procedure
1. Copy the suitable lmsensors configuration file for your device from "lmsensors.conf"
directory in this package to:
/etc/sensors.d/ .
2. Ensure that only one configuration file exists in the target directory.
3. To check sensor data. use the following example command:
Example 1
$ sensors
sch5347-isa-0000
Adapter: ISA adapter
Chassis (front) 1: 2171 RPM (min = 650 RPM)
Power Supply: 0 RPM (min = 0 RPM)
HDD: 0 RPM (min = 0 RPM)
Chassis (front) 2: 2223 RPM (min = 650 RPM)
Mainboard: +25.0°C (high = +70.0°C, crit = +70.0°C)

Linux Support Package V1.7


Installation Manual, 03/2024, A5E53649014-AA 13
Using the modules
3.5 Monitoring temperature and fan

Example 2
$ sensors
emc1423-i2c-0-4c
Adapter: SMBus I801 adapter at 4040
CPU: +25.0°C
– (low = -3.0°C, hyst = +7.0°C) ALARM (CRIT)
– (high = +100.0°C, hyst = +90.0°C)
– (crit = +21.0°C, hyst = +11.0°C)
Mainboard: +27.0°C
– (low = -3.0°C, hyst = +7.0°C) ALARM (CRIT)
– (high = +85.0°C, hyst = +75.0°C)
– (crit = +21.0°C, hyst = +11.0°C)
RAM: +25.0°C
– (low = -3.0°C, hyst = +7.0°C) ALARM (CRIT)
– (high = +85.0°C, hyst = +75.0°C)
– (crit = +21.0°C, hyst = +11.0°C)

Linux Support Package V1.7


14 Installation Manual, 03/2024, A5E53649014-AA
Using the modules
3.6 Checking the redundant AC power supply

3.6 Checking the redundant AC power supply

Prerequisites
• An IPC with built-in redundant AC power supply (Rack IPC only).
• Redundant AC power supply monitoring is available through the sysfs interface. The path
is:
/sys/class/power_supply/ac_redundant/

Procedure
1. To check the status of the power supply, query the "online" file.
2. Use the following example command:
$ cat /sys/class/power_supply/ac_redundant/online
1

Possible redundant AC power supply states


The AC power supply can be in one of the following statuses:
• 0 - inactive: One of the two power supplies failed, please replace immediately.
• 1 - active: Both power supplies are working as intended.

Linux Support Package V1.7


Installation Manual, 03/2024, A5E53649014-AA 15
Using the modules
3.7 Reacting to power loss (NAU)

3.7 Reacting to power loss (NAU)

Prerequisites
• An IPC with built-in power supply that supports NAU. For details, see "Hardware / feature
table (Page 18)"
• A NAU device is available through a UIO interface. The path is:
/dev/uio*/.

Procedure
1. Open the newly created device "/dev/uio0" in your application.
2. Create a response action to the interrupt triggered by the device.

Note
In the folder "examples/nvram" you find an example application called
"handle_nau_int.c".
To get a basic understanding how to react to interrupts from NAU, please have a look at the
source code of this example application.

Linux Support Package V1.7


16 Installation Manual, 03/2024, A5E53649014-AA
Using the modules
3.8 Accessing the NVRAM (read/write)

3.8 Accessing the NVRAM (read/write)


The NVRAM device has a very limited storage capacity. For faster access, bigger chunks have
to be written to the NVRAM.

Prerequisites
• An IPC with built-in NVRAM device. For details, see "Hardware / feature table (Page 18)"
• A NVRAM device is available through a UIO interface. The path is:
/dev/uio*/.

Procedure
1. Open the newly created device "/dev/uio0" in your application.
2. Read data from or write data to the device.

Note
In the folder "examples/nvram" you find an example application called
"test_uio_nvram.c".
To get a basic understanding how to read data from and write data to the NVRAM, please
have a look at the source code of this example application.

Linux Support Package V1.7


Installation Manual, 03/2024, A5E53649014-AA 17
Modules on IPC devices4

4
4.1 Hardware / feature table
SIMATIC Box PC: Hardware / feature table

IPC127E IPC BX-56A IPC227D IPC227E IPC227G IPC277G IPC427D IPC627D IPC BX-39A
IPC BX-59A IPC427E IPC627E
IPC827D
Hardware detec- ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
tion
simatic-ipc
LEDs ✓ ✓ ✓ ✓ ✓ − 1) ✓ ✓ 3) ✓
simatic-ipc-
leds
Watchdog + 2) ✓ − ✓ ✓ ✓ ✓ ✓ ✓
simatic-ipc-
wdt
Battery monitor- ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
ing
simatic-ipc-
batt
Temperature and ✓ 5) ✓ ✓ 5) ✓ 5) ✓ 5) ✓ 5) ✓ 5) ✓ ✓ 5)
fan monitoring
simatic-ipc-
sensors
Redundant AC − 6) − 6) − 6) − 6) − 6) − 6) − 6) − 6) − 6)
power supply
monitoring
simatic-ipc-
ps
NVRAM and − 8) ✓ 7) ✓ 7) ✓ 7) ✓ 7) ✓ 7) ✓ 7) ✓ 7) ✓ 7)
power loss notifi-
cation (NAU)
simatic-ipc-
nvram
Buttons − 9) − 9) − 9) − 9) − 9) − 9) − 9) − 9) − 9)
simatic-ipc-
input
Fan control − 10) ✓ − 10) − 10) − 10) − 10) − 10) − 10) − 10)

1) Device has no visible LEDs.


2) No dedicated Siemens hardware watchdog available but "wdat_wdt" can be used as watchdog instead.
3) Device may report 4 HDD LEDs even if only 2 are available.
4) LEDs are not visible on the front panel, only on the back of the device.
5) Device has no fans.
6) No redundant AC power supply available.
7) Feature is an order option.
8) Hardware does not support NAU/NVRAM.
9) Device has no button.
10) Device has no feature for Fan control.

Linux Support Package V1.7


18 Installation Manual, 03/2024, A5E53649014-AA
Modules on IPC devices
4.1 Hardware / feature table

SIMATIC Panel PC: Hardware / feature table

IPC277D IPC277E IPC477D IPC677D IPC PX-39A


IPC477E IPC677E
Hardware detection ✓ ✓ ✓ ✓ ✓
simatic-ipc
LEDs − 1) − 1) − 1) ✓ 3) 4) − 1)
simatic-ipc-
leds
Watchdog − ✓ ✓ ✓ ✓
simatic-ipc-
wdt
Battery monitoring ✓ ✓ ✓ ✓ ✓
simatic-ipc-
batt
Temperature and ✓ 5) ✓ 5) ✓ 5) ✓ ✓ 5)
fan monitoring
simatic-ipc-
sensors
Redundant AC − 6) − 6) − 6) − 6) −6)
power supply moni-
toring
simatic-ipc-ps
NVRAM and power ✓ 7) ✓ 7) ✓ 7) ✓ 7) ✓ 7)
loss notification
(NAU)
simatic-ipc-
nvram
Buttons − 9) − 9) − 9) − 9) − 9)
simatic-ipc-
input
Fan Control − 10) − 10) − 10) − 10) − 10)
1) Device has no visible LEDs.
2) No dedicated Siemens hardware watchdog available but "wdat_wdt" can be used as watchdog instead.
3) Device may report 4 HDD LEDs even if only 2 are available.
4) LEDs are not visible on the front panel, only on the back of the device.
5) Device has no fans.
6) No redundant AC power supply available.
7) Feature is an order option.
8) Hardware does not support NAU/NVRAM.
9) Device has not button
10) Device has no feature for Fan Control

Linux Support Package V1.7


Installation Manual, 03/2024, A5E53649014-AA 19
Modules on IPC devices
4.1 Hardware / feature table

SIMATIC Rack PC: Hardware / feature table

IPC227G IPC277G IPC647D IPC847D IPC BX-21A


IPC647E IPC847E
Hardware detection ✓ ✓ ✓ ✓ ✓
simatic-ipc
LEDs ✓ − 1) ✓ ✓ ✓
simatic-ipc-
leds
Watchdog ✓ ✓ ✓ ✓ ✓
simatic-ipc-
wdt
Battery monitoring ✓ ✓ ✓ ✓ ✓
simatic-ipc-
batt
Temperature and ✓ 5) ✓ 5) ✓ ✓ ✓ 5)
fan monitoring
simatic-ipc-
sensors
Redundant AC − 6) − 6) ✓ 7) ✓ 7) − 6)
power supply moni-
toring
simatic-ipc-ps
NVRAM and power ✓ 7) ✓ 7) − 8) − 8) − 7)
loss notification
(NAU)
simatic-ipc-
nvram
Buttons − 9) − 9) − 9) − 9) ✓
simatic-ipc-
input
Fan Control − 10) − 10) − 10) − 10) − 10)
1) Device has no visible LEDs.
2) No dedicated Siemens hardware watchdog available but "wdat_wdt" can be used as watchdog instead.
3) Device may report 4 HDD LEDs even if only 2 are available.
4) LEDs are not visible on the front panel, only on the back of the device.
5) Device has no fans.
6) No redundant AC power supply available.
7) Feature is an order option.
8) Hardware does not support NAU/NVRAM.
9) Device has not button
10) Device has no feature for Fan Control

Linux Support Package V1.7


20 Installation Manual, 03/2024, A5E53649014-AA

You might also like