<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to CmpCharDevice blocks gpiochip access on Raspberry Pi 5 since update from SP18 to SP21</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e7f7cd3ad7/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e7f7cd3ad7/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/e7f7cd3ad7/</id><updated>2026-07-22T06:19:48.921000Z</updated><subtitle>Recent posts to CmpCharDevice blocks gpiochip access on Raspberry Pi 5 since update from SP18 to SP21</subtitle><entry><title>CmpCharDevice blocks gpiochip access on Raspberry Pi 5 since update from SP18 to SP21</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e7f7cd3ad7/?limit=25#bc06" rel="alternate"/><published>2026-07-22T06:19:48.921000Z</published><updated>2026-07-22T06:19:48.921000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.come60f7db84966bb9bc86a9827b1240a3930fbcabc</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;yes, this is a known issue which will be fixed with 3.5.23.0 .. soll will take some time.&lt;br/&gt;
You need to switch back the runtime running not as dedicated user, like it was before 4.21.0.0&lt;br/&gt;
How to switch back you'll find here. ('Change service user' in the deploy tool)&lt;br/&gt;
&lt;a href="https://content.helpme-codesys.com/en/CODESYS%20Control/_rtsl_linux_dedicated_user.html" rel="nofollow"&gt;https://content.helpme-codesys.com/en/CODESYS%20Control/_rtsl_linux_dedicated_user.html&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CmpCharDevice blocks gpiochip access on Raspberry Pi 5 since update from SP18 to SP21</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e7f7cd3ad7/?limit=25#5c6e" rel="alternate"/><published>2026-07-21T12:32:28.317000Z</published><updated>2026-07-21T12:32:28.317000Z</updated><author><name>nixola</name><uri>https://forge.codesys.com/u/nixola/</uri></author><id>https://forge.codesys.coma86e0ad4b59e27a73da4a43a8802a6539c1ca2ec</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, I added the following lines to &lt;code&gt;/etc/codesyscontrol/CODESYSControl_User.cfg&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[CmpCharDevice]
PermittedPath.0=/dev/i2c*
PermittedPath.1=/dev/spidev*
PermittedPath.2=/sys/class/gpio/*
PermittedPath.3=/dev/gpiochip*&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;However, I'm still unable to read or control GPIO pins from any CODESYS application. Specifically, setting the pin direction (and, thus, the IoDrvGpioSysfs driver configuration) fails, with a rather non-descript error in the logs:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Setting direction failed for GPIO pin 586&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;IEC&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Update configuration failed from driver IoDrvGPIOSysfs&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;CmpIoMgr&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;I'm running CODESYS Control for Linux ARM64 SL version 4.21.0.0; it's running in rootless mode, as the &lt;code&gt;codesyscontrol&lt;/code&gt; user, but said user is in the &lt;code&gt;gpio&lt;/code&gt; group and can otherwise normally interact with GPIO, both via &lt;code&gt;gpioset&lt;/code&gt;/&lt;code&gt;gpioget&lt;/code&gt; and via the sysfs driver in &lt;code&gt;/sys/class/gpio/&lt;/code&gt;.&lt;br/&gt;
The system is a custom 64-bit Raspberry OS based distro, running on a Raspberry Pi CM5 on kernel 6.18.34 with PREEMPT_RT scheduling.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CmpCharDevice blocks gpiochip access on Raspberry Pi 5 since update from SP18 to SP21</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e7f7cd3ad7/?limit=25#3bb8" rel="alternate"/><published>2026-07-20T17:10:42.921000Z</published><updated>2026-07-20T17:10:42.921000Z</updated><author><name>charly29160</name><uri>https://forge.codesys.com/u/charly29160/</uri></author><id>https://forge.codesys.com7372c0cc8f572a9c442fc4569f42ea253ec6c952</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;wird nicht mit kopiert - sorry:&lt;br/&gt;
PermittedPath.0=/dev/i2c&lt;em&gt;&lt;br/&gt;
PermittedPath.1=/dev/spidev&lt;/em&gt;&lt;br/&gt;
PermittedPath.2=/sys/class/gpio/&lt;em&gt;&lt;br/&gt;
PermittedPath.3=/dev/gpiochip&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>CmpCharDevice blocks gpiochip access on Raspberry Pi 5 since update from SP18 to SP21</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e7f7cd3ad7/?limit=25#9641" rel="alternate"/><published>2026-07-20T17:09:11.311000Z</published><updated>2026-07-20T17:09:11.311000Z</updated><author><name>charly29160</name><uri>https://forge.codesys.com/u/charly29160/</uri></author><id>https://forge.codesys.come3dbd44eadb2be8de76d46eda5d47a3ceca97a60</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Problem gefunden und erledigt =&amp;gt; in CODESYSControl_User.cfg ergänzt:&lt;br/&gt;
&lt;span&gt;[CmpCharDevice]&lt;/span&gt;&lt;br/&gt;
PermittedPath.0=/dev/i2c&lt;em&gt;&lt;br/&gt;
PermittedPath.1=/dev/spidev&lt;/em&gt;&lt;br/&gt;
PermittedPath.2=/sys/class/gpio/&lt;em&gt;&lt;br/&gt;
PermittedPath.3=/dev/gpiochip&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Dann funktioniert es wieder&lt;br/&gt;
Gruß&lt;br/&gt;
Karl Schuler&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CmpCharDevice blocks gpiochip access on Raspberry Pi 5 since update from SP18 to SP21</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e7f7cd3ad7/?limit=25#faad" rel="alternate"/><published>2026-07-20T12:58:05.549000Z</published><updated>2026-07-20T12:58:05.549000Z</updated><author><name>charly29160</name><uri>https://forge.codesys.com/u/charly29160/</uri></author><id>https://forge.codesys.comd816c28493a1d483662844f2d3d9aa1703441540</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Noch eine Info dazu:&lt;br/&gt;
als Version der Pi MC SL wird mir 4.21.0.0 angezeigt. &lt;br/&gt;
In der log steht jedoch für IoDrvGPIO: 4.17.0.0&lt;br/&gt;
was ist das Problem?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CmpCharDevice blocks gpiochip access on Raspberry Pi 5 since update from SP18 to SP21</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e7f7cd3ad7/?limit=25#9e24" rel="alternate"/><published>2026-07-20T11:16:20.946000Z</published><updated>2026-07-20T11:16:20.946000Z</updated><author><name>charly29160</name><uri>https://forge.codesys.com/u/charly29160/</uri></author><id>https://forge.codesys.com1d688e08736afe279ec9b33055ab20f8ea1fbca7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo Herr Schwellinger - Danke für die Info. Der Fehler besteht weiterhin:&lt;br/&gt;
Follow-up: Rootless mode is not the cause here — verified with ps aux, the runtime binary runs as root:&lt;/p&gt;
&lt;p&gt;root      1974 48.9  0.7 854852 62140 ?        SLl  13:00   0:04 /opt/codesys/bin/codesyscontrol.bin /etc/codesyscontrol/CODESYSControl.cfg&lt;/p&gt;
&lt;p&gt;gpioinfo gpiochip0 as root also works flawlessly (all 54 lines listed correctly, no permission errors at the kernel level). So the block is happening purely inside CmpCharDevice's own sandboxing, not at the Linux/kernel permission level and not due to a dedicated unprivileged user. The correct config key to whitelist /dev/gpiochip0 for CmpCharDevice is still what I'm looking for.&lt;/p&gt;
&lt;p&gt;Im Voraus herzlichen Dank für Ihre Hilfe &lt;br/&gt;
Karl Schuler&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CmpCharDevice blocks gpiochip access on Raspberry Pi 5 since update from SP18 to SP21</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e7f7cd3ad7/?limit=25#27bc" rel="alternate"/><published>2026-07-20T11:16:15.953000Z</published><updated>2026-07-20T11:16:15.953000Z</updated><author><name>charly29160</name><uri>https://forge.codesys.com/u/charly29160/</uri></author><id>https://forge.codesys.comd5a2c711ba1be7245f8682acc0b593fabb2d34cd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo Herr Schwellinger - Danke für die Info. Der Fehler besteht weiterhin:&lt;br/&gt;
Follow-up: Rootless mode is not the cause here — verified with ps aux, the runtime binary runs as root:&lt;/p&gt;
&lt;p&gt;root      1974 48.9  0.7 854852 62140 ?        SLl  13:00   0:04 /opt/codesys/bin/codesyscontrol.bin /etc/codesyscontrol/CODESYSControl.cfg&lt;/p&gt;
&lt;p&gt;gpioinfo gpiochip0 as root also works flawlessly (all 54 lines listed correctly, no permission errors at the kernel level). So the block is happening purely inside CmpCharDevice's own sandboxing, not at the Linux/kernel permission level and not due to a dedicated unprivileged user. The correct config key to whitelist /dev/gpiochip0 for CmpCharDevice is still what I'm looking for.&lt;/p&gt;
&lt;p&gt;Im Voraus herzlichen Dank für Ihre Hilfe &lt;br/&gt;
Karl Schuler&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CmpCharDevice blocks gpiochip access on Raspberry Pi 5 since update from SP18 to SP21</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e7f7cd3ad7/?limit=25#b9f3" rel="alternate"/><published>2026-07-19T11:20:52.609000Z</published><updated>2026-07-19T11:20:52.609000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com28f8e3ca124401817906745bb2bfa9ab8dc39d76</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;this is probably:&lt;br/&gt;
&lt;a href="https://content.helpme-codesys.com/en/CODESYS%20Control/_rtsl_linux_dedicated_user.html" rel="nofollow"&gt;https://content.helpme-codesys.com/en/CODESYS%20Control/_rtsl_linux_dedicated_user.html&lt;/a&gt;&lt;br/&gt;
..switch back from rootless mode due GPIO will not work.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CmpCharDevice blocks gpiochip access on Raspberry Pi 5 since update from SP18 to SP21</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e7f7cd3ad7/?limit=25#db52" rel="alternate"/><published>2026-07-19T09:55:12.796000Z</published><updated>2026-07-19T09:55:12.796000Z</updated><author><name>charly29160</name><uri>https://forge.codesys.com/u/charly29160/</uri></author><id>https://forge.codesys.comf498f2d0b89e001a6b1373dc657ae8ba38fb8c9b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
after updating CODESYS Control for Raspberry Pi SL from patch level 18 to 21 (currently 4.21.0.0), the IoDrvGPIO driver ("GPIOs B+/Pi2") can no longer open any GPIO chip on a Raspberry Pi 5. Log output on login:&lt;/p&gt;
&lt;p&gt;Could not open GPIOChip0.&lt;br/&gt;
Access to path /dev/gpiochip0 not allowed. Add /dev/gpiochip0 to permitted paths in configuration file if required&lt;br/&gt;
Could not open GPIOChip4. Trying to open GPIOChip0&lt;br/&gt;
Access to path /dev/gpiochip4 not allowed. Add /dev/gpiochip4 to permitted paths in configuration file if required&lt;br/&gt;
Could not open any GPIOChip.&lt;/p&gt;
&lt;p&gt;System details:&lt;br/&gt;
Raspberry Pi 5, 32-bit Raspberry Pi OS (armv7l), kernel 6.12.47+rpt-rpi&lt;br/&gt;
gpiodetect correctly shows gpiochip0 &lt;span&gt;[pinctrl-rp1]&lt;/span&gt; (54 lines) as the RP1 GPIO controller&lt;br/&gt;
Runtime: CODESYS Control for Raspberry Pi SL 4.21.0.0, Runtime Toolkit SP21+&lt;/p&gt;
&lt;p&gt;This worked without issues before the update to SP21. I've tried adding the following to CODESYSControl_User.cfg without success:&lt;br/&gt;
ini&lt;span&gt;[CmpCharDevice]&lt;/span&gt;&lt;br/&gt;
Linux.DevicePath.1=/dev/gpiochip0&lt;br/&gt;
Linux.DevicePath.2=/dev/gpiochip4&lt;br/&gt;
Could you tell me the correct section/key to whitelist /dev/gpiochip0 (and /dev/gpiochip4) for CmpCharDevice? I suspect this is part of the general security hardening introduced around SP21 (similar to ForceIecFilePath for SysFile, or the new Gateway "accept local clients only" default), but I couldn't find it documented anywhere.&lt;br/&gt;
Thanks in advance!&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>