Ethercat installation from repositories - how to step by step

More
09 Nov 2024 23:22 - 10 Nov 2024 00:33 #314153 by Rkatts
I installed LinixCNC 2.9.3 (Debian 12) using the ISO from the downloads page.  Then I tried using the instructions of this thread to install ethercat, but I'm getting errors.  I have tried several different suggestions, but none worked.
nc:~$ sudo apt update
[sudo] password for aa:
Hit:1 http://security.debian.org/debian-security bookworm-security InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:5 https://www.linuxcnc.org bookworm InRelease
Hit:4 https://repository.qtpyvcp.com/apt develop InRelease
Get:6 http://download.opensuse.org/repositories/science:/EtherLab/Debian_12 ./ InRelease [1,575 B] Err:6 http://download.opensuse.org/repositories/science:/EtherLab/Debian_12 ./ InRelease The following signatures were invalid: EXPKEYSIG A94819A7CB97A204 science:EtherLab OBS Project
Fetched 1,575 B in 2s (1,019 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
126 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://download.opensuse.org/repositories/science:/EtherLab/Debian_12 ./ InRelease: The following signatures were invalid: EXPKEYSIG A94819A7CB97A204 science:EtherLab OBS Project
W: Failed to fetch http://download.opensuse.org/repositories/science:/EtherLab/Debian_12/./InRelease The following signatures were invalid: EXPKEYSIG A94819A7CB97A204 science:EtherLab OBS Project
W: Some index files failed to download. They have been ignored, or old ones used instead. nc:~$ sudo apt install linuxcnc-ethercat
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed: autoconf autoconf-archive automake autotools-dev ethercat-dkms ethercat-master libethercat libltdl-dev libtool m4
Suggested packages: gnu-standards autoconf-doc libtool-doc gfortran | fortran95-compiler gcj-jdk m4-doc
The following NEW packages will be installed: autoconf autoconf-archive automake autotools-dev ethercat-dkms ethercat-master libethercat libltdl-dev libtool linuxcnc-ethercat m4
0 upgraded, 11 newly installed, 0 to remove and 126 not upgraded. Need to get 5,372 kB of archives. After this operation, 86.5 MB of additional disk space will be used. Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bookworm/main amd64 autoconf-archive all 20220903-3 [775 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 m4 amd64 1.4.19-3 [287 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 autoconf all 2.71-3 [332 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 autotools-dev all 20220109.1 [51.6 kB]
Get:5 http://deb.debian.org/debian bookworm/main amd64 automake all 1:1.16.5-1.3 [823 kB]
Err:6 http://download.opensuse.org/repositories/science:/EtherLab/Debian_12 ./ ethercat-dkms 1.6.0.g8330bca-1+3.1 404 Not Found [IP: 195.135.223.226 80]
Get:7 http://deb.debian.org/debian bookworm/main amd64 libtool all 2.4.7-7~deb12u1 [517 kB]
Get:8 http://deb.debian.org/debian bookworm/main amd64 libltdl-dev amd64 2.4.7-7~deb12u1 [164 kB]
Err:9 http://download.opensuse.org/repositories/science:/EtherLab/Debian_12 ./ ethercat-master 1.6.0.g8330bca-1+3.1 404 Not Found [IP: 195.135.223.226 80]
Err:10 http://download.opensuse.org/repositories/science:/EtherLab/Debian_12 ./ libethercat 1.6.0.g8330bca-1+3.1 404 Not Found [IP: 195.135.223.226 80]
Err:11 http://download.opensuse.org/repositories/science:/EtherLab/Debian_12 ./ linuxcnc-ethercat 1.39.0.g4299f7a-0 404 Not Found [IP: 195.135.223.226 80] Fetched 2,951 kB in 0s (6,985 kB/s)
E: Failed to fetch http://download.opensuse.org/repositories/science:/EtherLab/Debian_12/all/ethercat-dkms_1.6.0.g8330bca-1%2b3.1_all.deb 404 Not Found [IP: 195.135.223.226 80]
E: Failed to fetch http://download.opensuse.org/repositories/science:/EtherLab/Debian_12/amd64/ethercat-master_1.6.0.g8330bca-1%2b3.1_amd64.deb 404 Not Found [IP: 195.135.223.226 80]
E: Failed to fetch http://download.opensuse.org/repositories/science:/EtherLab/Debian_12/amd64/libethercat_1.6.0.g8330bca-1%2b3.1_amd64.deb 404 Not Found [IP: 195.135.223.226 80]
E: Failed to fetch http://download.opensuse.org/repositories/science:/EtherLab/Debian_12/amd64/linuxcnc-ethercat_1.39.0.g4299f7a-0_amd64.deb 404 Not Found [IP: 195.135.223.226 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
[code][code] 
[/code][/code]
Last edit: 10 Nov 2024 00:33 by Rkatts.

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

More
10 Nov 2024 00:29 #314160 by Rkatts
So I ran the following and still failed.
nc:~$ sudo apt install ethercat-master libethercat-dev linuxcnc-ethercat
[sudo] password for aa:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed: autoconf autoconf-archive automake autotools-dev ethercat-dkms libethercat libltdl-dev libtool m4
Suggested packages: gnu-standards autoconf-doc libtool-doc gfortran | fortran95-compiler gcj-jdk m4-doc
The following NEW packages will be installed: autoconf autoconf-archive automake autotools-dev ethercat-dkms ethercat-master libethercat libethercat-dev libltdl-dev libtool linuxcnc-ethercat m4
0 upgraded, 12 newly installed, 0 to remove and 126 not upgraded.
Need to get 2,444 kB/5,394 kB of archives.
After this operation, 86.6 MB of additional disk space will be used. Do you want to continue? [Y/n] y
Err:1 http://download.opensuse.org/repositories/science:/EtherLab/Debian_12 ./ ethercat-dkms 1.6.0.g8330bca-1+3.1 404 Not Found [IP: 195.135.223.226 80]
Err:2 http://download.opensuse.org/repositories/science:/EtherLab/Debian_12 ./ ethercat-master 1.6.0.g8330bca-1+3.1 404 Not Found [IP: 195.135.223.226 80]
Err:3 http://download.opensuse.org/repositories/science:/EtherLab/Debian_12 ./ libethercat 1.6.0.g8330bca-1+3.1 404 Not Found [IP: 195.135.223.226 80]
Err:4 http://download.opensuse.org/repositories/science:/EtherLab/Debian_12 ./ libethercat-dev 1.6.0.g8330bca-1+3.1 404 Not Found [IP: 195.135.223.226 80]
Err:5 http://download.opensuse.org/repositories/science:/EtherLab/Debian_12 ./ linuxcnc-ethercat 1.39.0.g4299f7a-0 404 Not Found [IP: 195.135.223.226 80]
E: Failed to fetch http://download.opensuse.org/repositories/science:/EtherLab/Debian_12/all/ethercat-dkms_1.6.0.g8330bca-1%2b3.1_all.deb 404 Not Found [IP: 195.135.223.226 80]
E: Failed to fetch http://download.opensuse.org/repositories/science:/EtherLab/Debian_12/amd64/ethercat-master_1.6.0.g8330bca-1%2b3.1_amd64.deb 404 Not Found [IP: 195.135.223.226 80]
E: Failed to fetch http://download.opensuse.org/repositories/science:/EtherLab/Debian_12/amd64/libethercat_1.6.0.g8330bca-1%2b3.1_amd64.deb 404 Not Found [IP: 195.135.223.226 80]
E: Failed to fetch http://download.opensuse.org/repositories/science:/EtherLab/Debian_12/amd64/libethercat-dev_1.6.0.g8330bca-1%2b3.1_amd64.deb 404 Not Found [IP: 195.135.223.226 80]
E: Failed to fetch http://download.opensuse.org/repositories/science:/EtherLab/Debian_12/amd64/linuxcnc-ethercat_1.39.0.g4299f7a-0_amd64.deb 404 Not Found [IP: 195.135.223.226 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

 

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

More
10 Nov 2024 00:38 #314162 by Rkatts
"If you have Secure Boot enabled (can be checked with mokutil --sb-state),..."
nc:~$ mokutil --sb-state
EFI variables are not supported on this system

 

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

More
10 Nov 2024 00:42 #314163 by Rkatts
I am using kernel:
nc:~$ uname -r
6.1.0-23-rt-amd64

I'm assuming this came with the LinuxCNC 2.9.3 install.

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

More
10 Nov 2024 00:54 #314164 by rodw

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

More
10 Nov 2024 01:10 #314165 by Rkatts

Pleas follow this sticky
forum.linuxcnc.org/ethercat/53785-instal...thercat-repositories
 

I created a file in my Downloads folder named ecat.sh.  I entered the following content (copied directly from our attachment) and saved it.
#!/bin/bash
echo "requires sudo to run eg: sudo ./ecat.sh"
# Removing old repo if it exists
if [ -e /etc/apt/sources.list.d/ighvh.sources ]
then
    echo "removing ethercat repository file\n"
    rm /etc/apt/sources.list.d/ighvh.sources
fi
# Install ethercat repositories.
echo "Install ethercat repository"
mkdir -p /usr/local/share/keyrings/
wget -O- https://build.opensuse.org/projects/science:EtherLab/signing_keys/download?kind=gpg | gpg --dearmor | dd of=/etc/apt/trusted.gpg.d/science_EtherLab.gpg
tee -a /etc/apt/sources.list.d/ighvh.sources > /dev/null <<EOT
Types: deb
Signed-By: /etc/apt/trusted.gpg.d/science_EtherLab.gpg
Suites: ./
URIs: http://download.opensuse.org/repositories/science:/EtherLab/Debian_12/
EOT

Navigated to my Downloads folder and ran the script.
nc:~/Downloads$ sudo ./ecat.sh
sudo: ./ecat.sh: command not found

What am I missing?

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

More
10 Nov 2024 01:59 #314167 by Rkatts
This seems to have fixed the permissions.
nc:~/Downloads$ chmod +x ecat.sh

Then ran:
nc:~/Downloads$ sudo ./ecat.sh
[sudo] password for aa:
requires sudo to run eg: sudo ./ecat.sh
Install ethercat repository
--2024-11-09 19:52:41--  https://build.opensuse.org/projects/science:EtherLab/signing_keys/download?kind=gpg
Resolving build.opensuse.org (build.opensuse.org)... 195.135.223.221, 2a07:de40:b250:131:10:151:131:20
Connecting to build.opensuse.org (build.opensuse.org)|195.135.223.221|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/octet-stream]
Saving to: ‘STDOUT’

-                                [ <=>                                        ]   1.08K  --.-KB/s    in 0s      

2024-11-09 19:52:42 (28.1 MB/s) - written to stdout [1109]

1+1 records in
1+1 records out
733 bytes copied, 0.608919 s, 1.2 kB/s

Tried again from the start.
nc:~$ sudo apt update
E: Conflicting values set for option Signed-By regarding source http://download.opensuse.org/repositories/science:/EtherLab/Debian_12/ ./: /etc/apt/trusted.gpg.d/science_EtherLab.gpg != /etc/apt/trusted.gpg.d/science_EtherLab.gpg.key.binary.gpg
E: The list of sources could not be read.

Any ideas?
 

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

More
More
14 Nov 2024 14:06 - 14 Nov 2024 17:28 #314446 by Rkatts
After installing LinuxCNC 2.9.3 (Debian 12) and EtherCAT module (Master driver 1.6.2), I am unable to get EtherCAT communication working.  LinuxCNC will run, but there is no active status or feedback positions.  DS402 statuswords are zero, indicating there is no communication.

I have a LinuxCNC system running with an older version (2.8.0).  I copied the linuxcnc_axis folder from the working system and put it into this one and made adjustments for the new system.

In ecat_gantry.ini, the hal file is listed correctly.
[HAL]
TWOPASS=ON
HALFILE = ecat_gantry.hal

In ecat_gantry.hal, I updated the loadusr command. (removed the path that was incorrect)
loadusr -W lcec_conf ethercat-conf.xml
loadrt lcec

The ethercat-conf.xml file is configured correctly for the three servo drives. This same configuration works on an almost identical system. The only difference in hardware is the AKD2G in this system is FS3 (functional safety) whereas the working system is FS1 (STO only).  I made the appropriate change in the ethercat pid code.
<!--cnc-bg Config -->
<masters>
  <master idx="0" appTimePeriod="1000000" refClockSyncCycles="1">
      
       <!-- AKD X Axis (beam) -->
   <slave idx="0" type="generic" vid="0000006A" pid="00414b44" configPdos="true">
      <!-- Clear SM PDOs -->
      <sdoConfig idx="1C12" subIdx="00">
        <sdoDataRaw data="00"/>
      </sdoConfig>
      <!-- Clear SM PDOs -->
      <sdoConfig idx="1C13" subIdx="00">
        <sdoDataRaw data="00"/>
      </sdoConfig>
      
      <!-- Clear RX PDO1 -->
      <sdoConfig idx="1A00" subIdx="00">
        <sdoDataRaw data="00"/>
      </sdoConfig>
      <!-- Map status word to RX-PDO1 -->
      <!--  0x6041 0010 -->
      <sdoConfig idx="1A00" subIdx="01">
        <sdoDataRaw data="10 00 41 60"/>
      </sdoConfig>
      <!-- Map position feedback to RX-PDO1 -->
      <!-- 0x6064 0020 -->
      <sdoConfig idx="1A00" subIdx="02">
        <sdoDataRaw data="20 00 64 60"/>
      </sdoConfig>
      <!-- Set RX-PDO1 count to 2 -->
      <sdoConfig idx="1A00" subIdx="00">
        <sdoDataRaw data="02"/>
      </sdoConfig>

(That is only the first part of the ethercat-conf.xml file.)

It recognizes the 3 servo drives, but they are all errored.
jim@cnc:~$ ethercat slaves
0  6:0  PREOP   E  AKD EtherCAT Drive (CoE)
1  6:1  SAFEOP  E  AKD2G Dual Axis FS3 EtherCAT Drive (CoE)
2  1:0  PREOP   E  AKD EtherCAT Drive (CoE)
jim@cnc:~$ sudo dmesg | grep EtherCAT
[sudo] password for jim: 
[    4.545203] EtherCAT: Master driver 1.6.2 1.6.2.g285cdf0-1+12.2
[    4.545268] EtherCAT: 1 master waiting for devices.
[    4.572786] ec_generic: EtherCAT master generic Ethernet device module 1.6.2 1.6.2.g285cdf0-1+12.2
[    4.572795] EtherCAT: Accepting 00:1B:21:5A:44:37 as main device for master 0.
[    4.588476] EtherCAT 0: Starting EtherCAT-IDLE thread.
[    4.588497] EtherCAT 0: Link state of ecm0 changed to UP.
[    5.192449] EtherCAT 0: Link state of ecm0 changed to DOWN.
[    5.240474] EtherCAT 0: Link state of ecm0 changed to UP.
[    5.264455] EtherCAT 0: 3 slave(s) responding on main device.
[    5.264458] EtherCAT 0: Slave states on main device: PREOP, SAFEOP + ERROR.
[    5.265859] EtherCAT 0: Scanning bus.
[    5.878393] EtherCAT WARNING 0-1: Slave has state error bit set (SAFEOP + ERROR)!
[    7.657131] EtherCAT ERROR 0-1: Timeout after 1000 ms while waiting for SDO 0x1c12:0 upload response.
[    7.657134] EtherCAT ERROR 0-1: Failed to read number of assigned PDOs for SM2.
[    8.657645] EtherCAT ERROR 0-1: Timeout after 1000 ms while waiting for SDO 0x1c13:0 upload response.
[    8.657647] EtherCAT ERROR 0-1: Failed to read number of assigned PDOs for SM3.
[    9.267846] EtherCAT 0: Bus scanning completed in 4000 ms.
[    9.267848] EtherCAT 0: Using slave 0 as DC reference clock.
[    9.267851] EtherCAT 0: Starting EoE thread.
[    9.307336] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[    9.308655] EtherCAT ERROR 0-0: AL status message 0x001D: "Invalid output configuration".
[    9.310093] EtherCAT 0-0: Acknowledged state PREOP.
[    9.316500] EtherCAT ERROR 0-1: AL status message 0x001B: "Sync manager watchdog".
[    9.320634] EtherCAT 0-1: Acknowledged state SAFEOP.
[    9.372708] EtherCAT ERROR 0-2: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[    9.374026] EtherCAT ERROR 0-2: AL status message 0x001D: "Invalid output configuration".
[    9.375463] EtherCAT 0-2: Acknowledged state PREOP.
[    9.397756] EtherCAT ERROR 0-1: AL status message 0x001B: "Sync manager watchdog".
[    9.403141] EtherCAT 0-1: Acknowledged state SAFEOP.
[    9.469755] EtherCAT ERROR 0-1: AL status message 0x001B: "Sync manager watchdog".
[    9.473818] EtherCAT 0-1: Acknowledged state SAFEOP.
...
[55800.087042] EtherCAT WARNING 0-1: SDO information error response while fetching SDO entry 0x1C32:0E!
[55800.087045] EtherCAT ERROR 0-1: SDO abort message 0x06090011: "Subindex does not exist".
[55800.089891] EtherCAT WARNING 0-1: SDO information error response while fetching SDO entry 0x1C32:0F!
[55800.089893] EtherCAT ERROR 0-1: SDO abort message 0x06090011: "Subindex does not exist".
[55800.092737] EtherCAT WARNING 0-1: SDO information error response while fetching SDO entry 0x1C32:10!
[55800.092738] EtherCAT ERROR 0-1: SDO abort message 0x06090011: "Subindex does not exist".
[55800.096957] EtherCAT WARNING 0-1: SDO information error response while fetching SDO entry 0x1C32:11!
[55800.096958] EtherCAT ERROR 0-1: SDO abort message 0x06090011: "Subindex does not exist".
[55800.101182] EtherCAT WARNING 0-1: SDO information error response while fetching SDO entry 0x1C32:12!
[55800.101183] EtherCAT ERROR 0-1: SDO abort message 0x06090011: "Subindex does not exist".

Can anyone help me determine what is wrong?
Last edit: 14 Nov 2024 17:28 by Rkatts.

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

Time to create page: 0.120 seconds
Powered by Kunena Forum