CmpCharDevice blocks gpiochip access on Raspberry Pi 5 since update from SP18 to SP21

14 hours ago
13 hours ago
  • charly29160 - 14 hours ago

    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!

     

Log in to post a comment.