Hi,
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:
Could not open GPIOChip0.
Access to path /dev/gpiochip0 not allowed. Add /dev/gpiochip0 to permitted paths in configuration file if required
Could not open GPIOChip4. Trying to open GPIOChip0
Access to path /dev/gpiochip4 not allowed. Add /dev/gpiochip4 to permitted paths in configuration file if required
Could not open any GPIOChip.
System details:
Raspberry Pi 5, 32-bit Raspberry Pi OS (armv7l), kernel 6.12.47+rpt-rpi
gpiodetect correctly shows gpiochip0 [pinctrl-rp1] (54 lines) as the RP1 GPIO controller
Runtime: CODESYS Control for Raspberry Pi SL 4.21.0.0, Runtime Toolkit SP21+
This worked without issues before the update to SP21. I've tried adding the following to CODESYSControl_User.cfg without success:
ini[CmpCharDevice]
Linux.DevicePath.1=/dev/gpiochip0
Linux.DevicePath.2=/dev/gpiochip4
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.
Thanks in advance!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
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:
Could not open GPIOChip0.
Access to path /dev/gpiochip0 not allowed. Add /dev/gpiochip0 to permitted paths in configuration file if required
Could not open GPIOChip4. Trying to open GPIOChip0
Access to path /dev/gpiochip4 not allowed. Add /dev/gpiochip4 to permitted paths in configuration file if required
Could not open any GPIOChip.
System details:
Raspberry Pi 5, 32-bit Raspberry Pi OS (armv7l), kernel 6.12.47+rpt-rpi
gpiodetect correctly shows gpiochip0 [pinctrl-rp1] (54 lines) as the RP1 GPIO controller
Runtime: CODESYS Control for Raspberry Pi SL 4.21.0.0, Runtime Toolkit SP21+
This worked without issues before the update to SP21. I've tried adding the following to CODESYSControl_User.cfg without success:
ini[CmpCharDevice]
Linux.DevicePath.1=/dev/gpiochip0
Linux.DevicePath.2=/dev/gpiochip4
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.
Thanks in advance!
this is probably:
https://content.helpme-codesys.com/en/CODESYS%20Control/_rtsl_linux_dedicated_user.html
..switch back from rootless mode due GPIO will not work.