Page 1 of 1

piBridge with CODESYS Control for Raspberry PI 4.8.0.0 does not work

Posted: 09 Jun 2023, 11:01
by rossanoparis
Hallo at all

I'm trying to upgrade an application from CODESYS Control for Raspberry PI 4.7.0.0 to CODESYS Control for Raspberry PI 4.8.0.0
I need to do that, because of other devices I'm using in my automation solution.

Everything went fine during the project upgrade, but in online mode I see the piBridge in error status (please see the attacched image)
The error I can get from CODESYS LOG is "Error code: 8193, Write to config.rsc failed!"

Despite that ,the system seems working well, but I'd like to investigate this strange situation I'm facing before deploying the solution in production environment

Other application details:
RevPi OS Version: Buster
CODESYS 3.5.19
Revolution Pi Library for CODESYS V1.3.0.0

Is there something I can do?
Are you planning to align your drivers to the newest CODESYS Control for Raspberry PI 4.8.0.0 package and CODESYS 3.5.19 ? It would be very welcome

Best regards
Rossano

Re: piBridge with CODESYS Control for Raspberry PI 4.8.0.0 does not work

Posted: 09 Jun 2023, 17:03
by nicolaiB
Hi,

we're currently busy updating the library for CODESYS SP19. For now the supported version is SP18 (as stated in the package README). The estimated release date for SP19 is begin of July.

Nicolai

Re: piBridge with CODESYS Control for Raspberry PI 4.8.0.0 does not work

Posted: 12 Jun 2023, 09:02
by rossanoparis
Thank you Nicolai

Re: piBridge with CODESYS Control for Raspberry PI 4.8.0.0 does not work

Posted: 12 Jun 2023, 09:22
by Amar
Hi,
CODESYS V3.5 SP19 includes a bug fix. CDS-81506: CODESYS Control SysFile system file access vulnerability.
ForceIecFilePath is activated by default, due to which file access from IEC is now restricted to the configured paths only (file sandbox).

For more details see Advisory 2023-01, which is available on the CODESYS website:

https://customers.codesys.com/index.php ... &download=

Release notes for CODESYS V3.5 SP19
https://www.codesys.com/fileadmin/data/ ... 35190.html

In the Revolution Pi Library for Codesys, file write access under the following folder, /etc/revpi/, is required in order to create a config.rsc file based on devices configured in the CODESYS application project. The CODESYS project using the KUNBUS RevolutionPiBridge IO library creates a configuration file /etc/revpi/config.rsc, which is basically the PiCtory file /var/www/revpi/pictory/projects/_config.rsc.

Customers using Revolution Pi CODESYS devices will therefore have to manually configure PlaceholderFilePath in /etc/CODESYSControl_User.cfg as mentioned below.

[SysFile]
PlaceholderFilePath.1=/etc/revpi, $configrsc$

Restart CODESYS Control in order to load the new changes from /etc/CODESYSControl_User.cfg.
Alternatively, you could reboot the device, and the changes will be automatically loaded from the user configuration file at the start of CODESYS Control.

sudo service codesyscontrol restart

Regards,
Amar

Re: piBridge with CODESYS Control for Raspberry PI 4.8.0.0 does not work

Posted: 13 Jun 2023, 17:30
by rossanoparis
Thank you Amar

Re: piBridge with CODESYS Control for Raspberry PI 4.8.0.0 does not work

Posted: 01 Nov 2023, 03:10
by fandi
Hello,

Getting in to this, I also have the same symbol going on on my piBridge but everything runs normal is there any follow up on this?

Image
CODESYS V3.5 SP19 Patch 3 + (64-bit)
Runtime 4.9.0.0
Library 1.4.0.0
RevPi Connect SE with Bullseye image installed

Is there a specific things I need to setup? since it runs normally...
My configuration

Regards,
Fandi

Re: piBridge with CODESYS Control for Raspberry PI 4.8.0.0 does not work

Posted: 17 Feb 2024, 01:46
by hwopereis
Amar wrote: 12 Jun 2023, 09:22 Hi,
CODESYS V3.5 SP19 includes a bug fix. CDS-81506: CODESYS Control SysFile system file access vulnerability.
ForceIecFilePath is activated by default, due to which file access from IEC is now restricted to the configured paths only (file sandbox).

For more details see Advisory 2023-01, which is available on the CODESYS website:

https://customers.codesys.com/index.php ... &download=

Release notes for CODESYS V3.5 SP19
https://www.codesys.com/fileadmin/data/ ... 35190.html

In the Revolution Pi Library for Codesys, file write access under the following folder, /etc/revpi/, is required in order to create a config.rsc file based on devices configured in the CODESYS application project. The CODESYS project using the KUNBUS RevolutionPiBridge IO library creates a configuration file /etc/revpi/config.rsc, which is basically the PiCtory file /var/www/revpi/pictory/projects/_config.rsc.

Customers using Revolution Pi CODESYS devices will therefore have to manually configure PlaceholderFilePath in /etc/CODESYSControl_User.cfg as mentioned below.

[SysFile]
PlaceholderFilePath.1=/etc/revpi, $configrsc$

Restart CODESYS Control in order to load the new changes from /etc/CODESYSControl_User.cfg.
Alternatively, you could reboot the device, and the changes will be automatically loaded from the user configuration file at the start of CODESYS Control.

sudo service codesyscontrol restart

Regards,
Amar
Thank you for the extensive response. Very helpful!

For me, the adjustment you mentioned didn't work when done in the /etc/CODESYSControl_User.cfg file. I'm not sure why, but the piBridgeLeft and piBridgeEnd still had the red triangle.
It did however work, when I commented out the existing line in the /etc/CODESYSControl.cfg file, and added the abovementioned line.
Screenshot 2024-02-17 014225.png
As I'm quite new to both codesys and the RevPi I'm wondering: would this give any problems I'm not aware of?

Re: piBridge with CODESYS Control for Raspberry PI 4.8.0.0 does not work

Posted: 19 Feb 2024, 10:28
by Amar
It is recommended to use latest Codesys control runtime.(CODESYS Control for Raspberry Pi MC V 4.10.0)

https://store.codesys.com/en/softplcs-f ... d-licenses

Some other configuration (probably 1-Wire Busmaster) occupied the placeholder path on your configured device.
When you install a new Codeys Control v4.10 your default configuration in /etc/CODESYSControl.cfg should work with previous mentioned changes.

For more info please also look out on CODESYS Forge forum:
https://forge.codesys.com/forge/talk/En ... it=25#843b

You can perhaps assign next path number PlaceholderFilePath.2 to the commented section.
Regards, Amar

Re: piBridge with CODESYS Control for Raspberry PI 4.8.0.0 does not work

Posted: 25 Mar 2024, 13:42
by damadmai
You can also apply the fix using this oneliner using SSH Access:

Code: Select all

echo -e '\n[SysFile]\nPlaceholderFilePath.1=/etc/revpi, $configrsc$' | sudo tee -a /etc/CODESYSControl_User.cfg && sudo service codesyscontrol restart