IOT-GATE-IMX8PV2: Debian Linux: How-To Guide
Contents
- 1 Overview
- 2 Serial Console
- 3 Connection and Login
- 4 Package Management
- 5 Device Serial Number and Product Configuration
- 6 Gateway Peripheral Initialization Script
- 7 Cellular Modem
- 8 WiFi
- 9 NVME
- 10 LEDs
- 11 TPM
- 12 CMD button
- 13 Industrial I/O Interfaces
- 14 RTC
- 15 Watchdog
Overview
The example run-time Linux filesystem image for the CompuLab IOT-GATE-IMX8PV2 Internet of Things Gateway is based on Debian GNU/Linux Trixie. The default Debian Trixie Linux image includes more than 650 software packages. Among them:
- Core system
- Debian package management system
- SSH server and client
- PulseAudio configuration and usage utilities
- NetworkManager
- ModemManager
- Bluez5 Bluetooth tools and daemons
- Docker
Serial Console
IOT-GATE-IMX8PV2 provides a serial console on the main panel micro-USB DBG connector.
Connecting to a host PC
- Use a micro-USB cable to connect the Console connector to a USB port on your host PC.
- Make sure the CP2104 driver is available with your operating system, otherwise install CP2104 driver onto the host PC from https://www.silabs.com/documents/public/software/CP210x_Windows_Drivers_with_Serial_Enumeration.zip
- Identify the host PC interface and port number that will be used for communication with the device:
- In most Linux PCs, the serial port will be denoted as one of the following (where n is a positive integer): /dev/ttyUSB0, /dev/ttyUSB1 ... /dev/ttyUSBn
- In Windows PCs, the serial port usually will be denoted as one of the following (where n is a positive integer): COM1, COM2 ... COMn
- Start a terminal emulation program (such as PuTTY on Windows or minicom on Linux).
- In the port configuration section of the terminal emulation program select the port identified in previous step and set the following serial port parameters:
Baud Rate Data Bits Stop Bits Parity Flow Control 115200 8 1 none none
Connection and Login
This Debian rootfs comes with a default sudo user compulab. User password has to be set at the very first login:
Debian GNU/Linux 13 iot-gate-imx8pv2 ttymxc1 Default User: compulab iot-gate-imx8pv2 login: compulab You are required to change your password immediately (administrator enforced). New password: Retype new password:
To login into the Linux system, use a terminal emulator as described here, or connect through the network (ssh).
Package Management
The IOT-GATE-IMX8PV2 Debian Linux image includes everything required to use the Debian package management utilities.
Use apt and dpkg for managing software packages.
Device Serial Number and Product Configuration
Product information is stored in on-board EEPROM.
- To read the product serial number, issue the folowing command:
compulab@iot-gate-imx8pv2:~$ cat /proc/device-tree/baseboard-sn
- To read the product configuration part number, issue the following command:
compulab@iot-gate-imx8pv2:~$ cat /proc/device-tree/baseboard-options
Gateway Peripheral Initialization Script
During O/S boot IOT-GATE-IMX8PV2 automatically runs the Gateway peripheral initialization script that detects WiFi/Bluetooth modules and Cellular modem and configures the virtual device files used to address these devices and other ones like user LEDs
The script creates access files for all permanent and detected optional devices and interfaces.
Gateway Interfaces
Gateway interfaces access directory example:
/run/iot-gate-imx8pv2/gateway/access/
├── blkdev
│ └── emmc -> /dev/mmcblk2
├── cmd_button
│ └── event -> /dev/input/event1
├── leds
│ ├── green_a -> /sys/class/leds/Green_A
│ └── red_a -> /sys/class/leds/Red_A
├── network
│ ├── bluetooth -> /sys/class/bluetooth/hci0
│ ├── modem
│ │ ├── at1 -> /dev/ttyModemAT1
│ │ ├── at2 -> /dev/ttyModemAT2
│ │ └── qcdm -> /dev/ttyModemQCDM
│ └── wlan -> /sys/class/net/wlan0
└── tpm
├── tpm -> /sys/class/tpm/tpm0
└── tpmrm -> /sys/class/tpmrm/tpmrm0
Cellular Modem
IOT-GATE-IMX8PV2 cellular interface is implemented with a mini-PCIe cellular modem module and a nano-SIM socket. To set up IOT-GATE-IMX8PV2 for cellular functionality, install an active SIM card into SIM socket located behind the side panel service bay door. Remove the service bay door to access the SIM socket.
| Cellular modem is present only in gateways ordered with the JT910G configuration option |
Cellular Connection
The ModemManager can be used to log into almost any Internet Service Provider with simple configuration setup.
In the following example:
- Replace ISP-APN with the APN name of the cellular provider.
compulab@iot-gate-imx8pv2:~$ sudo nmcli connection add type gsm ifname '*' con-name CellularCon apn <ISP-APN>
- Connect cellular network
compulab@iot-gate-imx8pv2:~$ sudo nmcli connection up CellularCon
- Disconnect cellular network
compulab@iot-gate-imx8pv2:~$ sudo nmcli connection down CellularCon
Modem Reset
The cellular modem module can be forced into hardware reset by toggling a proper GPIO.
Use the following commands to reset the modem:
compulab@iot-gate-imx8pv2:~$ chip=$(sudo gpiodetect | sed -nE "s/^gpiochip([0-9]+)\s+\[.*2-0020.*\].*/\1/p")
compulab@iot-gate-imx8pv2:~$ sudo gpioset -t 0 -c ${chip} 11=1 ; sleep 0.3 ; sudo gpioset -t 0 -c ${chip} 11=0
WiFi
IOT-GATE-IMX8PV2 features an optional 802.11ax WiFi interface, implemented with the Intel WiFi 6 AX210 module.
The NetworkManager can be used to manage WiFi interface.
WiFi Interface
- For the IOT-GATE-IMX8PV2 with WiFi option (WB) the Gateway initialization script will create the following access files:
/run/iot-gate-imx8pv2/gateway/access/network ├── ... └── wlan -> /sys/class/net/wlan0
- Display WiFi network interface info
compulab@compulab-imx8mp:~$ wlan=$(basename $(readlink -f /run/iot-gate-imx8pv2/gateway/access/network/wlan))
compulab@compulab-imx8mp:~$ sudo ifconfig ${wlan}
compulab@compulab-imx8mp:~$ sudo iwconfig ${wlan}
Enable/Disable WiFi Interface
- To enable WiFi interface:
compulab@iot-gate-imx8pv2:~$ sudo nmcli radio wifi on
- To disable WiFi interface:
compulab@iot-gate-imx8pv2:~$ sudo nmcli radio wifi off
Network Scanning
- Sample WiFi scanning:
compulab@iot-gate-imx8pv2:~$ nmcli dev wifi list
- The output will show the list of Access Points and Ad-Hoc cells in range.
Connecting to Access Point
In the following example:
- Replace <SSID> and <PASSWORD> with the actual access point parameters:
compulab@iot-gate-imx8pv2:~$ sudo nmcli device wifi connect <SSID> password <PASSWORD> name WifiCon
- Disconnect wireless network:
compulab@iot-gate-imx8pv2:~$ sudo nmcli connection down WifiCon
- Connect wireless network again:
compulab@iot-gate-imx8pv2:~$ sudo nmcli connection up WifiCon
Creating Access Point
| Debian 13 ipv4 forwarding must be turned on manually |
- Enable port forwarding:
compulab@iot-gate-imx8pv2:~$ echo -e "net.ipv4.ip_forward=1\nnet.ipv6.conf.all.forwarding=1" | sudo tee /etc/sysctl.d/99-ip-forward.conf
- Apply the configuration immediately:
compulab@iot-gate-imx8pv2:~$ sudo sysctl --system
compulab@iot-gate-imx8pv2:~$ sudo systemctl restart systemd-sysctl
- Enable wireless AP (replace <SSID> and <PASSWORD> with desired access point parameters):
compulab@iot-gate-imx8pv2:~$ sudo nmcli device wifi hotspot ssid <SSID> password <PASSWORD> con-name HotspotCon
- Disable wireless AP:
compulab@iot-gate-imx8pv2:~$ sudo nmcli connection down HotspotCon
- Enable wireless AP again:
compulab@iot-gate-imx8pv2:~$ sudo nmcli connection up HotspotCon
NVME
IOT-GATE-IMX8PV2 can be assembled with an optional NVMe secondary storage device.
| i.MX8M-Plus SoC features a single PCIe interface which is shared between AX210 WiFi module and NVME socket. Only one device can be active. By default PCIe is configured for WiFi module operation and NVME is disabled. |
For the IOT-GATE-IMX8PV2 with NVMe option (NB) the Gateway initialization script will create the following access files:
/run/iot-gate-imx8pv2/gateway/access/blkdev/ ├── ... └── nvme -> /dev/nvme0n1
The nvme utility (nvme-cli package) can be used to manage and administer NVMe device.
- Display NVMe drive info
compulab@compulab-imx8mp:~$ nvme=$(readlink -e /run/iot-gate-imx8pv2/gateway/access/blkdev/nvme)
compulab@compulab-imx8mp:~$ sudo nvme list -v -o normal ${nvme}
LEDs
IOT-GATE-IMX8PV2 features a user Bi-Color (Red + Green) LED found on the main panel. The dual LED is controlled via GPIO pins and can be accessed via sysfs interface.
- The Green and the Res LEDs are referred to as Green_A and Red_A respectively
- The Gateway initialization script creates the following access files for LEDs:
/run/iot-gate-imx8pv2/gateway/access/leds/ ├── green_a -> /sys/class/leds/Green_A └── red_a -> /sys/class/leds/Red_A
- Choose a LED (Red in this example):
compulab@iot-gate-imx8pv2:~$ LED_NAME=red_a
compulab@iot-gate-imx8pv2:~$ LED=$(readlink -e /run/iot-gate-imx8pv2/gateway/access/leds/${LED_NAME})
- Turn the LED ON
compulab@iot-gate-imx8pv2:~$ echo "1" | sudo tee -a ${LED}/brightness
- Turn the LED OFF
compulab@iot-gate-imx8pv2:~$ echo "0" | sudo tee -a ${LED}/brightness
- Set LED's trigger
compulab@iot-gate-imx8pv2:~$ echo "heartbeat" | sudo tee -a ${LED}/trigger
TPM
IOT-GATE-IMX8PV2 features TPM 2.0 implemented with Infineon SLB9673.
The Gateway initialization script creates the following access files for TPM:
/run/iot-gate-imx8pv2/gateway/access/tpm/ ├── tpm -> /sys/class/tpm/tpm0 └── tpmrm -> /sys/class/tpmrm/tpmrm0
TPM Initialization
The TPM driver is loaded gets loaded automatically
- Make sure that the TPM kernel object is loaded:
compulab@iot-gate-imx8pv2:~# lsmod | grep tpm_tis_i2c
- Load the TPM kernel object manually is required:
compulab@iot-gate-imx8pv2:~$ modprobe tpm_tis_i2c
TPM Basic Functionality
- Install the tpm2-tools package:
compulab@iot-gate-imx8pv2:~$ sudo apt-get update && sudo apt-get install tpm2-tools
- Validate basic functionality
compulab@iot-gate-imx8pv2:~$ sudo tpm2_getrandom --hex 32
The correct result will be returned generated 32-symbol key.
CMD button
The CMD button is implemented as gpio-keys device with code 171 (KEY_CONFIG).
It is exposed as a standard Linux Input Device and can be accessed from userspace via the corresponding /dev/input/eventX device file.
Enable/disable CMD button
To enable/disable CMD button please use iotg-config tool (Peripherals Options → Configure Peripherals → Configure Misc Peripherals).
Input Device
During O/S boot, the Gateway initialization script creates an access file pointing to the corresponding input event device.
Example
/run/iot-gate-imx8pv2/gateway/access/ ... ├── cmd_button │ └── event -> /dev/input/event1 ...
CMD Button Demo
The cmd_button demo utility uses the Linux utility evtest to monitor CMD button press events and perform a user action, namely toggling the state of User LED A.
compulab@iot-gate-imx8pv2:~$ sudo /opt/cl-iotg/shell/cmd_button
#######################
# CMD Button Demo #
#######################
Press CMD button and observe User LED A state change
Press 'Ctrl+C' to stop the Demo
CMD Button pressed: LED state: red
CMD Button pressed: LED state: green
CMD Button pressed: LED state: red
CMD Button pressed: LED state: green
CMD Button pressed: LED state: red
CMD Button pressed: LED state: green
CMD Button pressed: LED state: red
CMD Button pressed: LED state: green
^C
Industrial I/O Interfaces
The IOT-GATE-IMX8PV2 features two configurable Industrial I/O ports. Each port can be individually configured to operate in either RS485 or CAN mode.
In addition, the IOT-GATE-IMX8PV2 provides four programmable signals that can be used as either digital inputs or digital outputs.
These three interfaces are treated as a virtual I/O stack, where the RS485/CAN ports are managed as virtual slots A and B, and the Digital I/O interface is managed as virtual slot C.
I/O Initialization Script
During O/S boot, the IOT-GATE-IMX8PV2 automatically runs the Industrial I/O initialization script. The script examines the user-defined I/O configuration, such as RS485, CAN, and Digital I/Os, and creates access files for all enabled interfaces.
Industrial I/O Stack access directory example:
/run/iot-gate-imx8pv2/io_stack/
└── frontplane
├── A
│ ├── access
│ │ └── can -> /sys/class/net/canA
│ └── type.CAN
├── B
│ ├── access
│ │ └── tty -> /dev/ttymxc0
│ └── type.RS485
└── C
├── access
│ ├── di.map
│ └── do.map
└── type.DIO
CAN bus
The IOT-GATE-IMX8PV2 CAN 2.0B interfaces are implemented with i.MX8M Plus CAN controllers (aka FlexCAN).
FlexCAN interface key characteristics:
- Supports CAN 2.0B protocol specification
- Galvanic isolation from the main unit
- Optional 120Ω termination resistors
The CAN signals are routed to the Industrial I/O connector as follows:
| Pin | Signal Name | Description |
| 12 | PORTA_TRM | PORT-A: 120Ω termination control Connect to ISO1_GND (pin 17) to disable termination |
| 13 | PORTA_NEG | PORT-A: CAN bus low |
| 14 | PORTA_POS | PORT-A: CAN bus high |
| 15 | PORTB_NEG | PORT-B: CAN bus low |
| 16 | PORTB_POS | PORT-B: CAN bus high |
| 17 | ISO1_GND | Isolated ground for CAN domain |
| 18 | PORTB_TRM | PORT-B: 120Ω termination control Connect to ISO1_GND (pin 17) to disable termination |
Please refer to IOT-GATE-IMX8PV2 reference guide for Industrial I/O Connector full pin-out.
Enable/Disable CAN Interface
To enable/disable CAN Interface on a specific Industrial I/O port (aka virtual slot) please use iotg-config tool (Industrial I/O Stack Options → Configure Industrial I/O Stack → Slot A / B).
Access CAN Interface
During O/S boot, the Industrial I/O initialization script automatically creates access files for all enabled CAN interfaces.
- Detect a CAN interface on the slot A:
compulab@iot-gate-imx8pv2:~$ canA=$(basename $(readlink -e /run/iot-gate-imx8pv2/io_stack/frontplane/A/access/can))
- Detect a CAN interface on the slot B:
compulab@iot-gate-imx8pv2:~$ canB=$(basename $(readlink -e /run/iot-gate-imx8pv2/io_stack/frontplane/B/access/can))
| Use ${canA} and ${canB} variables for accessing CAN interfaces. |
CAN 2.0B
The following example demonstrates how to configure and use the CAN interface on the slot A
CAN interface configuration
- Disable the CAN interface:
compulab@iot-gate-imx8pv2:~$ sudo ip link set ${canA} down
- Configure the CAN interface bit-rate to 1 Mbits/sec:
compulab@iot-gate-imx8pv2:~$ sudo ip link set ${canA} type can bitrate 1000000
- Enable the CAN interface:
compulab@iot-gate-imx8pv2:~$ sudo ip link set ${canA} up
Send/Receive packets
Use cansend utility to send packets via the CAN interface:
- Send standard CAN frame
compulab@iot-gate-imx8pv2:~$ sudo cansend ${canA} 111#1122334455667788
- Send extended CAN frame
compulab@iot-gate-imx8pv2:~$ sudo cansend ${canA} 11111111#1122334455667788
Use cangen utility to generate continuous traffic on the CAN interface:
- CAN frames (extended mode) generator, random payload, interval between two successive frames 50 msec:
compulab@iot-gate-imx8pv2:~$ sudo cangen -g 50 -e -D r -v ${canA}
...
canA 062732AC#
canA 0F5E0A2E#FC
canA 0F7E7A24#A6.8F.AD.6E
canA 1D64ADFC#0E.66.77
canA 0322F5FD#9B.1F.EC.4A.01.1F
canA 098A5C8F#
canA 151EBD68#8F.B1.A7.70.53.7A.F4.26
canA 0EDB6A60#A7.47.82.6A.0C.9D.02.75
canA 02C007EB#4C.D2.66.14.1A.12.1E.72
canA 1C06246D#DD.65.A8.0D.92.9E.84.2B
canA 1CE351BD#CE.5D.25
canA 0F843F27#49.89.5D.51.24.35.A7.12
...
Use candump utility to capture, display, filter, and log real-time CAN (Controller Area Network) bus traffic
- Dump all received data frames as well as error frames:
... compulab@iot-gate-imx8pv2:~ $ sudo candump any,0:0,#FFFFFFFF canA 0DC514CB [8] 55 56 36 7C 7A 0A 30 24 canA 0825720E [8] 6D 9C B6 0F D6 30 A4 00 canA 02E8D437 [7] 9E 18 08 19 50 92 A3 canA 06F860CD [3] 27 11 38 canA 08FC1CA5 [8] 6E 03 72 7E 45 76 A3 41 canA 1026292B [8] 13 0C 80 60 0B 73 AA 49 canA 090079D8 [0] canA 1AC761C8 [5] E9 55 A7 04 93 canA 0771D951 [8] 0D 81 BC 6C 60 4B 97 0F canA 03C3FA5A [8] 36 7C 3B 10 91 CE AC 06 canA 0CA0F9E2 [4] E2 60 50 2A canA 05062028 [8] 8C 7D F8 38 CD 3C 02 0E ...
RS485
The IOT-GATE-IMX8PV2 interfaces are implemented using MAX13488 (or compatible) transceiver interfaced with i.MX8M Plus UART ports.
IMX8PV2 key characteristics:
- 2-wire, half-duplex
- Programmable baud rate of up to 1Mbps
- Galvanic isolation from the main unit
- Optional 120 termination resistors controlled by shorting between PORTA-TRM and PORTB-TRM pins to ISO1_GND pin
The IMX8PV2 signals are routed to the Industrial I/O connector as follows:
| Pin | Signal Name | Description |
| 12 | PORTA_TRM | PORT-A: 120 termination control Connect to ISO1_GND (pin 17) to disable termination |
| 13 | PORTA_NEG | PORT-A: IMX8PV2 negative |
| 14 | PORTA_POS | PORT-A: IMX8PV2 positive |
| 15 | PORTB_NEG | PORT-B: IMX8PV2 negative |
| 16 | PORTB_POS | PORT-B: IMX8PV2 positive |
| 17 | ISO1_GND | Isolated ground for IMX8PV2 domain |
| 18 | PORTB_TRM | PORT-B: 120 termination control Connect to ISO1_GND (pin 17) to disable termination |
Please refer to IOT-GATE-IMX8PV2 reference guide for Industrial I/O Connector full pin-out.
Enable/Disable RS485 Interface
To enable/disable IMX8PV2 Interface on a specific Industrial I/O port (aka virtual slot) please use iotg-config tool (Industrial I/O Stack Options → Configure Industrial I/O Stack → Slot A / B).
Access RS485 Interface
During O/S boot, the Industrial I/O initialization script automatically creates access files for all enabled IMX8PV2 interfaces.
- Detect an RS485 interface on the slot A:
compulab@iot-gate-imx8pv2:~$ ttyRS485_A=$(basename $(readlink -e /run/iot-gate-imx8pv2/io_stack/frontplane/A/access/tty))
- Detect an RS485 interface on the slot B:
compulab@iot-gate-imx8pv2:~$ ttyRS485_B=$(basename $(readlink -e /run/iot-gate-imx8pv2/io_stack/frontplane/B/access/tty))
| Use ${ttyRS485_A} and ${ttyRS485_B} variables for accessing IMX8PV2 interfaces |
compulab@iot-gate-imx8pv2:~$ stty -F ${ttyRS485_B}
Digital I/O
The IOT-GATE-IMX8PV2 provides four programmable signals which can be used as either digital inputs or outputs.
DIO key characteristics:
- Designed for 24V PLC applications
- Digital outputs maximal output current 1A per channel
- Digital inputs self-powered with current limit
The DIO signals are routed to the Industrial I/O connector as follows:
| Pin | Signal Name | Description |
| 6 | ISO2_GND | Isolated ground for DIO domain |
| 7 | DIO_VIN | Digital I/O external DC power input |
| 8 | DIO1 | Digital input / output 1 |
| 9 | DIO0 | Digital input / output 0 |
| 10 | DIO3 | Digital input / output 3 |
| 11 | DIO2 | Digital input / output 2 |
| External voltage supply in the range 6-24V DC must be supplied via DIO_VIN pin for correct operation of digital inputs and outputs |
Please refer to IOT-GATE-IMX8PV2 reference guide for Industrial I/O Connector full pin-out.
Enable Digital Inputs and Outputs
The IOT-GATE-IMX8PV2 provides four programmable signals that can be configured as either digital inputs or digital outputs.
The Digital I/O interface is managed as virtual slot C.
To configure the direction of a specific signal, use the iotg-config tool (Industrial I/O Stack Options → Configure Industrial I/O Stack → Slot C.
Access DIO Interface
During O/S boot, the Industrial I/O initialization script automatically creates access files for the DIO signals according to trhe user-defined configuration.
DIO signals can be accessed either through the DIO utilities developed by Compulab and included in the IOT-GATE-IMX8PV2 Debian Linux image, or through the GPIO utilities provided by the gpiod package.
In the following example, digital signals 0 and 3 are configured as inputs (DI0 and DI3), while signals 1 and 2 are configured as outputs (DO1 and DO2).
Show DIO to GPIO chip/line mapping
Use dioinfo to show Digital Input and Output GPIO chip/line mapping.
compulab@iot-gate-imx8pv2:~$ /opt/cl-iotg/shell/dioinfo
Stack Slot C: DIO (4x DI; 4x DO)
~~~~~~~~~~~~~~~~~
Digital GPIO GPIO
Signal Chip Line
~~~~~~~~~~~~~~~~~
DI 0: 2 19
DI 1: -1 -1
DI 2: -1 -1
DI 3: 1 10
~~~~~~~~~~~~~~~~~
DO 0: -1 -1
DO 1: 5 5
DO 2: 5 6
DO 3: -1 -1
~~~~~~~~~~~~~~~~~
Note that the table above contains valid GPIO chip/line information only for the DI0, DO1, DO2, and DI3 signals.
The remaining entries are not valid because the corresponding signals are not accessible.
Reading Digital Inputs
Example
Read state of input pin DI0:
- Use dioget to access digital inputs.
compulab@iot-gate-imx8pv2:~$ dioget=/opt/cl-iotg/shell/dioget
compulab@iot-gate-imx8pv2:~$ sudo ${dioget} 0
- Alternatively, use gpioget to access the underlying GPIO:
compulab@iot-gate-imx8pv2:~$ sudo gpioget --numeric -c 2 19
Setting Digital Outputs
Example
Setting output pin DO2 to HIGH state:
- Use dioset to access digital outputs.
compulab@iot-gate-imx8pv2:~$ dioset=/opt/cl-iotg/shell/dioset
compulab@iot-gate-imx8pv2:~$ sudo ${dioset} 2 1
- Alternatively, use gpioset to access the underlying GPIO:
compulab@iot-gate-imx8pv2:~$ sudo gpioset --toggle 0 -c 5 6=1
RTC
IOT-GATE-IMX8PV2 RTC is implemented with the AM1805 real-time clock (RTC) chip.
Back-up battery keeps the RTC running to maintain clock and time information whenever the main power supply is not present.
Accessing and setting the RTC
- To access the RTC time and date run:
compulab@iot-gate-imx8pv2:~$ sudo hwclock 2026-10-26 09:09:12.642662+00:00
- To set the date and write it into the RTC do the following:
compulab@iot-gate-imx8pv2:~$ sudo date -s "31 Dec 2021 10:00:00" Fri Dec 31 10:00:00 IST 2021 compulab@iot-gate-imx8pv2:~$ sudo hwclock -w compulab@iot-gate-imx8pv2:~$ sudo hwclock 2021-12-31 10:00:08.323645+02:00
Watchdog
IOT-GATE-IMX8PV2 watchdog function is implemented with the i.MX8M Plus watchdog.
By default watchdog is not configured.
compulab@iot-gate-imx8pv2:~$ systemctl show | grep RuntimeWatchdog
RuntimeWatchdogUSec=0
The value RuntimeWatchdogUSec=0 means watchdog logic is disabled: no watchdog device is opened, configured, or pinged
Watchdog configuration
- Edit /etc/systemd/system.conf file to configure watchdog related parameters, in particular RuntimeWatchdogSec and ShutdownWatchdogSec.
- RuntimeWatchdogSec - specifies the watchdog timeout for runtime services, meaning services that are actively running during normal system operation. The value is in seconds and should be set to a positive integer.
- ShutdownWatchdogSec - specifies the watchdog timeout for the shutdown process, insuring the system doesn't hang indefinitely during the shutdown. The value is in seconds and should be set to a positive integer.
- Reboot the device
- Verify watchdog configuration
compulab@iot-gate-imx8pv2:~$ systemctl show | grep RuntimeWatchdog
RuntimeWatchdogUSec=10s
Watchdog testing
- Run the following command to simulate kernel panic:
root@iot-gate-imx8pv2:/home/compulab# echo "c" | sudo tee /proc/sysrq-trigger
- As a result, the watchdog is not fed and the system reboots after 10 sec.