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 EtherCAT - Netwerk adapted could not be opened

  • broos72482 - 2022-04-30

    I have a very simple demo application using a:
    - Raspberry pi 4b.
    - UGreen 10/100/1000 MB USB 3.0 networkadapter.
    - Codesys soft-PLC for the raspberry pi (Codesys V3.5 SP17 Patch 2 64-bit).

    The demo applicatition looks as follows:

    What have i done:
    - I've downloaded the xml descriptor files.
    - Inserted the EtherCAT Master.
    - Inserted a buscoupler.
    - Inserted a EL1008 DI module.
    - Inserted a EL2008 DO module.

    When start the application i get the following messages from the logging:

    Scanning doesn't find any devices. When i first connect the application it seems to try to communicatie. I
    see the communication leds blinking now and then and after a while it stops.
    However for linux the interface seems to be working. ifconfig eth1 shows it transmits packets but doesnt
    receive anything.

    Any help is appreciated.

  • broos72482 - 2022-04-30

  • eschwellinger

    eschwellinger - 2022-05-02

    does the same configuration work on eth0?
    if you plug an usb ethernet adapter a reboot/runtime restart is needed.


    Last edit: eschwellinger 2022-05-02
  • broos72482 - 2022-05-04

    Thanks for your help. runtime restart was the solution.

    The problem was that the UGREEN USB 3.0 adapter was NOT on the list of hardware for the Raspberry pi. So I bought a USB 2.0 Belkin adapter, which was on the list of compatible hardware (https://elinux.org/RPi_VerifiedPeripherals).
    However the're is a problem with both network adapters when booting the Raspberry pi. The are not recognized at boot time. So rebooting was not an option.

    Using eth0 would probably work. What i tried is using the USB network adapter on eth1 for connection with the soft-plc, ssh, nomachine. But I couldn't get it working.

    After that I disabled tcp/ip in the dhcpcd.conf file with the options noipv4 and noipv6 after interface eth1. But don't know if thats necessary?

    But when I put the Belkin adapter in the Raspberry pi after a reboot it is perfectly recognized, I use the dmesg command for that.
    Now when i use:
    sudo /etc/init.d/codesyscontrol stop
    sudo /etc/init.d/codesyscontrol start
    It works perfectly.
    - I still have to solve the booting problem. Assuming I use eth0 for SSH, codesys: Will a
    PiHAT with an extra ethernet port be a possibility ? Will it work better in combination
    with the codesys soft PLC ? Can you give me any advise ?
    - I think the problem with the booting might be a problem when the system boots the
    usb-> ethernet driver is not loaded so the networkadapter might not be recognized.
    For a PiHAT may be the modules (ethernet driver) is loaded earlier in the booting process.
    If I can solve that problem is there a way to kickstart the EtherCAT bus manually
    from a program in the soft-PLC? This would give me the possibility to start the bus without
    restarting the soft-PLC ?
    Thanks in advance.

  • broos72482 - 2022-05-26

    I found out that when booting from sd-card the usb to ethernet adapter is recognised ok. Only when i boot from usb (using a M.2 Expansion Board voor Argon ONE) different USB to ethernet adapters will not be recognised at boot time.

  • broos72482 - 2022-05-26

    Last edit: broos72482 2022-05-26

Log in to post a comment.