piBridge with CODESYS Control for Raspberry PI 4.8.0.0 does not work

Topics about the Software of Revolution Pi
Post Reply
User avatar
rossanoparis
Posts: 14
Joined: 09 May 2019, 14:35
Location: Italy
Contact:

piBridge with CODESYS Control for Raspberry PI 4.8.0.0 does not work

Post 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
Attachments
bridge-status.png
bridge-status.png (5.38 KiB) Viewed 36222 times
User avatar
nicolaiB
KUNBUS
Posts: 931
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

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

Post 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
User avatar
Amar
KUNBUS
Posts: 160
Joined: 15 Jul 2019, 12:58

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

Post 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
KUNBUS
fandi
Posts: 8
Joined: 30 Aug 2023, 06:08

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

Post 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
Attachments
Screenshot.jpg
Screenshot.jpg (95.03 KiB) Viewed 34767 times
I'm new to RevPi but hoping to understand it to help my company sells
hwopereis
Posts: 7
Joined: 23 Jan 2024, 15:12

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

Post 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?
User avatar
Amar
KUNBUS
Posts: 160
Joined: 15 Jul 2019, 12:58

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

Post 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
KUNBUS
damadmai
Posts: 2
Joined: 25 Mar 2024, 13:37

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

Post 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
Post Reply