Running ec-debianize ater a resh install

More
10 Mar 2022 18:46 - 10 Mar 2022 18:48 #236875 by Niko
Hi all after installing a 2.8.2 linuxcnc distribution I'm having difficulties with ec-debianize .
As ar as dependencies go I have : mercurial, mercurial-common, mercurial-extension-utils, arch-test, dkms an quilt .
In /etc/mercurial/hgrc I added
[extensions]
mq =
And the net result o my effort is this :
 

Last time I got lucky and had absolutely no issues with that .
Any Ideas how I can get that going ?

Cheers
Attachments:
Last edit: 10 Mar 2022 18:48 by Niko. Reason: Typos due to d and f keys being damaged by chips :D

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

More
10 Mar 2022 19:44 - 13 Mar 2022 10:06 #236883 by rodw
The ec-debianize installation is a bit dated becasue the ether lab code base has migrated to gitlab. Mercurial is not required. Thy are now maintaining an unofficial repository so I Was able to install etherlab master from it. you can try this ( did it using the new linuxcnc debian repo now in debian maste unstable but buster is supported.:

open a terminal
sudo apt install geany curl
sudo geany /etc/apt/sources.list

 insert this line at the end of the file
deb [allow-insecure=yes] https://download.opensuse.org/repositories/home:/bone11111:/branches:/science:/EtherLab/Debian_10/ ./
Save and close geany
enter these two commands to create a security key
KEYRING=/usr/share/keyrings/ethercat.gpg
curl -fsSL https://download.opensuse.org/repositories/home:/bone11111:/branches:/science:/EtherLab/Debian_10/Release.key | gpg --dearmor | sudo tee "$KEYRING" >/dev/null
sudo apt update
sudo apt install -y linux-headers-rt-amd64 
sudo apt install ethercat-dkms libethercat libethercat-dev ethercat-master
ip a (and save MAC address of the NIC used for ethercat)
sudo geany /etc/ethercat.conf
set your Master0 device to your MAC address and device modules to generic
MASTER0_DEVICE="xx:aa:yy:zz:bb:cc"
DEVICE_MODULES="generic"
save and close geany
sudo systemctl enable ethercat.service
sudo systemctl start ethercat.service
sudo systemctl status ethercat.service
sudo chmod 666 /dev/EtherCAT0
Ethercat should be running. If the above command is not found, you have a problem
You can list the slaves if you type
ethercat slaves

 
Last edit: 13 Mar 2022 10:06 by rodw.

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

More
10 Mar 2022 19:49 #236884 by rodw
You still need to install the hal driver
github.com/sittner/linuxcnc-ethercat
I found one of the make files needed editing/replacing based on another forum thread. I am not at my linuxcnc PC to look it up
 

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

More
10 Mar 2022 20:04 - 10 Mar 2022 20:18 #236885 by rodw
Here it is:
forum.linuxcnc.org/9-installing-linuxcnc...ve-config-sdo#203252
makes changes  to (actually replaces)  realtime.mk

So to finish this off, install the linuxcnc hal driver

mkdir dev
cd dev
git clone https://github.com/sittner/linuxcnc-ethercat.git
cd linuxcnc-ethercat/src
replace the contents of realtime.mk with the revisions on this forum thread
https://forum.linuxcnc.org/9-installing-linuxcnc/41983-linuxcnc-ethercat-undefined-symbol-ecrt-slave-config-sdo#203252

make clean
sudo make install
Last edit: 10 Mar 2022 20:18 by rodw.
The following user(s) said Thank You: Niko

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

More
11 Mar 2022 04:57 #236916 by Niko
Thank you or the quick reply Rod .
It's a stubborn little thing . Updated the keyring an still get this : The following signatures were invalid

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

More
11 Mar 2022 08:25 #236921 by rodw

Thank you or the quick reply Rod .
It's a stubborn little thing . Updated the keyring an still get this : The following signatures were invalid

Strange, I just did it on my chromebook and I got
The following NEW packages will be installed:
  ethercat-dkms ethercat-master libethercat libethercat-dev
0 upgraded, 4 newly installed, 0 to remove and 269 not upgraded.
Need to get 19.3 kB/1,234 kB of archives.
After this operation, 70.2 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  ethercat-dkms libethercat ethercat-master libethercat-dev
Install these packages without verification? [y/N] 

So I said Yes and continued

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

More
13 Mar 2022 07:13 - 13 Mar 2022 08:29 #237080 by Niko
So I did another fresh install and it worked .
Thank you !
Must have found a quick way to mess things up last time .

One thing in the manual you meant sudo geany /etc/ethercat.conf not ethernet.conf

Now I'm going to play around with one of those busano ethercat modules for arduino .
They should be good for an operator panel .

Edit :
for the linuxcnc-ethercat part of the driver expat, libexpat1 and libexpat1-dev are needed .
Last edit: 13 Mar 2022 08:29 by Niko.

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

More
13 Mar 2022 10:15 #237096 by rodw
Great work!
I edited the instructions to correct the error.
What OS did you install this on?
What version of Linuxcnc are you using?
This is by far the easiest method I found to install the ethercat master and more importantly it gets it from the source without depending on 3rd party code.

Now only if I could create a deb version of the ethercat hal driver! It is out of my comfort zone but if somebody with a bit more knowledge did this it would be awesome!

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

More
13 Mar 2022 15:53 #237121 by Niko
I used the top one straight from the download page :
LinuxCNC 2.8.2 Debian 10 Buster PREEMPT-RT ISO
The PC isn't anything worth talking about . To be honest I haven't had anything that's too slow for linuxcnc .
In this case an old core 2 vpro that used to run vista, its only for testing .
The ethernet chip isn't on the prefferred list either .
The following user(s) said Thank You: rodw

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

More
17 Mar 2022 17:57 #237547 by Niko
So I haven't had much time to play around with this .
Today I found this :
sudo ethercatctl start
returns
modprobe: FATAL: Module ec_master not found in directory /lib/modules/4.19.0-17-rt-amd64

And as expected ethercat0 is not in /dev/

I tried looking for ec_master.ko but find returned nothing .

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

Time to create page: 0.094 seconds
Powered by Kunena Forum