Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Raspberry Pi Profinet Communication between Master/Slave

mstampalia
2021-10-14
2021-10-16
  • mstampalia - 2021-10-14

    Hello,

    I'm trying to establish profinet communication between two Raspberry Pi's.

    Codesys 3.5.17.10 (latest release)
    Control for Raspberry Pi 4.2

    Note: All devies running in demo mode, without licences.

    Raspberry Pi 4 as Profinet Controller
    Raspberry Pi Zero as Profinet Device.

    I have configured by runtime configuration devices as per Codesys Help to include
    https://help.codesys.com/webapp/_pnio_runtime_configuration_device;product=core_ProfinetIO_Configuration_Editor;version=4.1.0.0

    Runtime
    [SysEthernet]
    QDISC_BYPASS=1
    Linux.ProtocolFilter=3

    [SysSocket]
    Adapter.0.Name="eth0"
    Adapter.0.EnableSetIpAndMask=1

    Installed Vlan
    sudo apt-get install vlan # Install VLAN package
    sudo modprobe 8021q # Load 8021q kernel module
    sudo su -c 'echo "8021q" >> /etc/modules'

    Scan for Device cannot locate the Raspberry Pi zero Profinet device, and adding Profinet device manually will not work.

    The bus is not running on the Profinet device; however, the ethernet link is up.

    To check if issue was raspberry pi/runtime configuration error, I have added a desktop (Control Win V3 x64) device with profinet device and configured the runtime file as per the above link. (note i didn't add static ip settings as I have configured static routing in my home router). I have installed WinPcap 4.1.3 as per codesys help.

    [SysSocket]
    Adapter.0.Name="Ethernet 1"
    Adapter.0.EnableSetIpAndMask=1

    The Raspberry Pi 4 can scan and identify the desktop (Control Win V3 x64) profinet device as shown below.

    However, I can not establish communication with desktop (Control Win V3 x64) profinet device due to error 81813F02 DCP no RealStationName.

    I tried add another proifnet controller Server (Control Win V3 x64) to see if issue was raspberry pi runtime and can scan and add the desktop (Control Win V3 x64) profinet device, however have same error 81813F02 DCP no RealStationName.

    Any assistance would be greatly appreciated in establishing Profinet communication.

     

    Last edit: mstampalia 2021-10-14
  • mstampalia - 2021-10-16

    Hello,

    I managed to solve the issue with profinet device on (Control Win V3 x64) and both the windows and raspberry pi profinet controllers.

    Issue was Profinet Device was set to "use remanent data" with Profinet controller setting IP and station name, instead of using the correct setting of "use project parameters". Additionally the Profinet Controller was automatically setting 0.0.0.0 gateway address for profinet device/slave.

    Unfortunately, still can't solve issue with Profinet device on raspberry Pi.

    Looks like a runtime configuration or ethernet communications error (maybe "promiscuous mode" issue)

     

Log in to post a comment.