Ethernet Port doesn't take IP-Settings

Post Reply
HannesPrenzel
Posts: 11
Joined: 30 Aug 2023, 11:35

Ethernet Port doesn't take IP-Settings

Post by HannesPrenzel »

I'm trying to realise a Profinet IO Controller with one of the two Ethernet Ports of the RevPi Connect.
Therefor I added a Ethernet Device to the device tree in Codesys and atached the Profinet IO Controller to it.

In the Settings for the Ethernet Port I set the wished IP-Adress, Subnetmask and Gateway.
I marked the checkbox to write the IP-Settings to the OS of the RevPi.

If i load the code into the Revpi and view the Log of the Ethernet Device, it tells that the IP-Settings couldn't be changed and that it got the Error Code 39 when trying.

Do you know the issue or do you have suggestions how to solve it?

Thanks in Advance.
Hannes
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: Ethernet Port doesn't take IP-Settings

Post by dirk »

Hello Hannes that sounds like an exciting topic. Just follow this tutorial created with great kindness and then the problems will almost solve themselves:
https://kunbus-gmbh.atlassian.net/servi ... 1500138395
HannesPrenzel
Posts: 11
Joined: 30 Aug 2023, 11:35

Re: Ethernet Port doesn't take IP-Settings

Post by HannesPrenzel »

Hello Dirk,

meanwhile I was able to solve the problem.
I found the right Pages on the Codesys documentation, which told where there needed to be some extra settings in the config files of the Linux system.

Right now the Profinet is up and running and if I read single bytes of the input byte array of my PN Device, it works.
But if I try to copy the whole byte array to a Memorystructure, which has all the right datatypes (bool, int, ...) using memcpy or sysmemcpy that doesn't seem to work.
My next try will be the use of a for-to-loop with pointers. Maybe this works.
Post Reply