How to install EtherLab EtherCAT master on Ubuntu 24.04

Add the repository:

curl -fsSL https://download.opensuse.org/repositories/science:/EtherLab/Debian_12/Release.key | gpg --dearmor | sudo tee "/usr/share/keyrings/etherlab.gpg" >/dev/null
sudo echo "deb [signed-by=/usr/share/keyrings/etherlab.gpg] https://download.opensuse.org/repositories/science:/EtherLab/xUbuntu_24.04/ ./" | sudo tee /etc/apt/sources.list.d/etherlab.list
sudo apt update

Now install the EtherCAT master from the repository we just installed

sudo apt install ethercat-master

In case you also need the development headers, install them using

sudo apt install libethercat-dev

For more info, see the EtherLab page

How to configure the EtherCAT Master

Now open /etc/ethercat.conf and set MASTER0_DEVICE to the name of your network interface.

This typically cannot be the same network interface you’re using for internet or other purposes. You can find the name of your network interfaces using ifconfig.

MASTER0_DEVICE="enx00e04c680004"

Now you can (re)start the EtherCAT master using

sudo systemctl restart ethercat