Ethercat installation from repositories - how to step by step

  • rodw
  • rodw's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
21 Jun 2026 10:21 #347185 by rodw
I've never seen the sysv error before. 
Odd others have got the new method working already.
You need to use sudo for systemctl and journalctl. Can you redo and share?

Please Log in or Create an account to join the conversation.

  • grandixximo
  • grandixximo's Avatar
  • Away
  • Elite Member
  • Elite Member
More
21 Jun 2026 12:15 #347189 by grandixximo
check the output of these command

systemctl status ethercat.service
sudo journalctl -xeu ethercat.service --no-pager
dkms status | grep -i ethercat        # module built for running kernel?
uname -r                              # running kernel matches?
lsmod | grep ec_                     # loaded?
sudo modprobe ec_master              # manual load - shows real error


Is your /etc/ethercat.conf properly set?

Please Log in or Create an account to join the conversation.

More
21 Jun 2026 17:44 #347195 by spumco
[Forum/internet is being really unresponsive, bear with me]

Thanks gents for having a look.  Here's the terminal outputs:

You need to use sudo for systemctl and journalctl. Can you redo and share?
Warning: Spoiler!


Is your /etc/ethercat.conf properly set?
Yes.  Added MAC addr for enp2s0 and "generic"

check the output of these command
mill@debian:~$ sudo dkms status | grep -i ethercat
[sudo] password for mill: 
ethercat/1.6.9: added

mill@debian:~$ uname -r
6.12.86+deb13-rt-amd64

mill@debian:~$ lsmod | grep ec_
typec_ucsi             69632  1 ucsi_acpi
typec                 114688  1 typec_ucsi
roles                  16384  1 typec_ucsi
usb_common             16384  3 xhci_hcd,usbcore,typec_ucsi

mill@debian:~$ sudo modprobe ec_master
modprobe: FATAL: Module ec_master not found in directory /lib/modules/6.12.86+deb13-rt-amd64

So it looks like something didn't get installed properly despite just pasting the linuxcnc-ethercat apt stuff from GH instructions.

Please Log in or Create an account to join the conversation.

More
21 Jun 2026 17:48 #347196 by spumco
Further terminal output after trying to re-install ethercat-master below:

Warning: Spoiler!


 

Please Log in or Create an account to join the conversation.

More
21 Jun 2026 18:14 #347197 by spumco
And the contents of make.log referenced in the "Error!" line in last post:
DKMS (dkms-3.2.2) make.log for ethercat/1.6.9 for kernel 6.12.86+deb13-amd64 (x86_64)
Sun Jun 21 13:46:11 EDT 2026

Building module(s)
# command: ./bootstrap && ./configure --with-linux-dir=/lib/modules/6.12.86+deb13-amd64/build --enable-generic --enable-8139too --enable-e100 --enable-e1000 --enable-e1000e --enable-r8169 --enable-igb --enable-igc --enable-genet --disable-stmmac-pci --disable-dwmac-intel --disable-ccat --disable-eoe --enable-cycles --enable-hrtimer --disable-rtdm --disable-debug-if --disable-debug-ring --disable-regalias --disable-tty --disable-wildcards --enable-sii-assign --enable-rt-syslog && make modules
+ touch ChangeLog
+ mkdir -p m4
+ autoreconf -i
./bootstrap: line 32: autoreconf: command not found

# exit code: 127
# elapsed time: 00:00:00

Please Log in or Create an account to join the conversation.

  • grandixximo
  • grandixximo's Avatar
  • Away
  • Elite Member
  • Elite Member
More
22 Jun 2026 02:29 - 22 Jun 2026 02:50 #347203 by grandixximo
try the commands below

sudo apt install autoconf automake libtool pkg-config linux-headers-$(uname -r)
sudo apt --fix-broken install      # clears half-configured linux-image/headers
sudo dkms autoinstall
dkms status | grep ethercat        # want "installed", not "added"
sudo modprobe ec_master
sudo systemctl start ethercat.service

This is mostly due to missing dependencies, I will add the additional dependencies to the package, should not happen next time.
Last edit: 22 Jun 2026 02:50 by grandixximo.
The following user(s) said Thank You: spumco

Please Log in or Create an account to join the conversation.

More
22 Jun 2026 03:53 #347206 by spumco
That seems to have worked, sort of.

I got the following errors while pasting the commands:
Warning: Spoiler!


fix-broken install and dkms autoinstall seemed to have worked (no errors)

dkms status | grep ethercat reported "installed"

systemctl status ethercat.service:
Warning: Spoiler!


But final commands got an error:
mill@debian:~$ sudo chmod 666 /dev/EtherCAT0
chmod: cannot access '/dev/EtherCAT0': No such file or directory
mill@debian:~$ ethercat slaves
Failed to obtain number of masters: Failed to open master device /dev/EtherCAT0: No such file or directory


I wonder if the "dev" folder is for a RIP install?

Please Log in or Create an account to join the conversation.

More
22 Jun 2026 04:08 #347207 by spumco
sudo apt update and upgrade seems to have fixed whatever was wrong.

after reboot:

mill@debian:~$ sudo systemctl start ethercat.service
[sudo] password for mill: 
mill@debian:~$ ethercat slaves
0  0:0  INIT  E  AS715N_sAxis_V0.10
1  0:1  INIT  E  AS715N_sAxis_V0.10
2  0:2  INIT  E  AS715N_sAxis_V0.10
3  0:3  INIT  E  AS715N_sAxis_V0.10

I think I'm in business.

Thanks a ton for the assistance.
The following user(s) said Thank You: grandixximo, rodw

Please Log in or Create an account to join the conversation.

  • rodw
  • rodw's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
22 Jun 2026 05:23 #347210 by rodw
Spumco, great work. If you have to manually start the service each time. sounds like you overlooked the udev rules in the first post, Sorry about the formatting errors but its an awful post to edit

sudo geany /etc/udev/rules.d/99-ethercat.rules
and the following code block.
The following user(s) said Thank You: spumco

Please Log in or Create an account to join the conversation.

More
22 Jun 2026 10:38 #347216 by spumco

Spumco, great work. If you have to manually start the service each time. sounds like you overlooked the udev rules in the first post, Sorry about the formatting errors but its an awful post to edit

sudo geany /etc/udev/rules.d/99-ethercat.rules
and the following code block.
 

Rod - I hadn't actually gotten to that section of the installation yet.  The first 'ethercat slaves' check is before the 99-ethercat.rules line.

I just stopped when I got the errors starting ethercat service for the first time.  Bulldozing ahead past errors has not served me well in the past, despite my habitual attempts.
 
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

Time to create page: 0.180 seconds
Powered by Kunena Forum