Linux Support Package Installation Manual enUS en-US
Linux Support Package Installation Manual enUS en-US
7
Introduction 1
Installation 2
3
SIMATIC Using the modules
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.
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
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)".
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.
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"
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.
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)
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
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.
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
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
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)
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
Prerequisites
• Battery monitoring is available through the sysfs interface. The path is:
/sys/class/hwmon/hwmon*
• There is no further configuration necessary.
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)
Note
The values are only updated once every 24 hours because checking the remaining voltage
does negatively impact the battery voltage.
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)
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)
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
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.
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.
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)