Using POSIX realtime

More
1 year 5 months ago #328059 by Roger S
Replied by Roger S on topic Using POSIX realtime
Hello Hakan
Here are the results of both checks:

sudo service ethercat status:

● ethercat.service - EtherCAT Master Kernel Modules
     Loaded: loaded (/lib/systemd/system/ethercat.service; enabled; preset: enabled)
     Active: active (exited) since Fri 2025-05-09 13:44:10 CEST; 1min 16s ago
    Process: 542 ExecStart=/usr/sbin/ethercatctl start (code=exited, status=0/SUCCESS)
   Main PID: 542 (code=exited, status=0/SUCCESS)
        CPU: 29ms

Mai 09 13:44:10 roger systemd[1]: Starting ethercat.service - EtherCAT Master Kernel Modules...
Mai 09 13:44:10 roger systemd[1]: Finished ethercat.service - EtherCAT Master Kernel Modules.

sudo modinfo ec_master:

roger@roger:~$ sudo modinfo ec_master
[sudo] Passwort für roger: 
filename:       /lib/modules/6.1.0-30-rt-amd64/updates/dkms/ec_master.ko
version:        1.6.4 1.6.4.g703b611-1+17.1
license:        GPL
description:    EtherCAT master driver module
author:         Florian Pose <fp@igh.de>
srcversion:     976B904C4EBCA2C98AAB9AC
depends:        
retpoline:      Y
name:           ec_master
vermagic:       6.1.0-30-rt-amd64 SMP preempt_rt mod_unload modversions 
sig_id:         PKCS#7
signer:         DKMS module signing key
sig_key:        0C:21:72:1B:F5:21:65:8B:7F:BF:48:64:17:62:5D:68:85:79:BA:BF
sig_hashalgo:   sha256
signature:      4A:E3:8A:17:F3:B0:9F:77:3C:AC:E0:3A:0E:17:7C:E5:BD:73:15:D5:
        8F:E7:72:79:94:A6:2E:EC:4D:F8:90:8C:9A:D3:02:F1:CA:78:59:46:
        5C:C6:5D:40:72:1D:E6:28:B9:F8:DD:C5:87:DE:C3:11:35:50:E7:EC:
        71:78:C7:43:5F:AE:E9:E1:11:FD:28:8E:58:2A:E8:38:AE:84:80:CE:
        BE:16:8A:8F:86:EE:68:3C:33:EA:39:0C:23:F6:C0:A7:CA:6F:95:BB:
        E2:72:1E:47:C4:62:82:4A:09:A2:7D:FB:3B:F3:7C:ED:E3:FC:8D:36:
        62:9F:47:0B:71:CD:04:8D:69:F6:D5:44:AD:A3:00:44:B5:5A:36:C3:
        CA:5B:E0:D5:B5:5A:50:C0:44:2A:42:63:7A:CC:8E:FB:DE:E7:21:1F:
        06:C9:6D:41:F3:60:3A:0A:AA:AE:4F:51:DF:17:17:0C:25:1D:C3:33:
        71:45:9A:5E:14:73:A9:4C:4E:D0:C4:70:DA:00:EA:57:6D:41:EA:63:
        A5:CE:8A:E4:9D:91:01:54:FC:EE:90:5A:FC:96:8A:94:FE:C4:8D:07:
        9C:8E:82:A8:5F:43:4F:86:49:8C:E6:0D:BF:69:D7:53:C4:5D:8B:C6:
        81:05:63:EC:0F:7E:F1:27:C8:FE:46:15:AD:C1:03:28
parm:           main_devices:MAC addresses of main devices (array of charp)
parm:           backup_devices:MAC addresses of backup devices (array of charp)
parm:           debug_level:Debug level (uint)
parm:           run_on_cpu:Bind kthreads to a specific cpu (uint)

To summarize how I installed it:
I followed the procedure described by rodw exactly. I didn't leave anything out, and I didn't add anything. I also lack the knowledge to do that. I've reinstalled the PC three times now, each time with the same result: Master0 link down. The network adapter settings are as I posted them (IPv4 Local Link and IPv6 disabled). UEFI is not active, and the installation itself didn't report any errors.

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

More
1 year 5 months ago #328079 by Hakan
Replied by Hakan on topic Using POSIX realtime
I think it looks ok, maybe there is something with the exact kernel version and the module version but it should still work even with the "tainted" message.
We are just trying to find out why it doesn't work and make it work.
Actually, maybe the interface settings.
You showed some screenshots early in the thread with IPv4 settings and more.
Actually, ethercat and IPv4 are not compatible and one should not configure any IPv4 things on the interface.
On my system, the ethercat interface doesn't even show up on the first screen of that application that lists the interfaces.
This is how my interface is started, in /etc/network/interfaces
Code:
auto enp2s0 iface enp2s0 inet manual         hardware-irq-coalesce-rx-usecs 0         pre-up /sbin/ifconfig $IFACE up         post-down /sbin/ifconfig $IFACE down
That hardware-irq-coelesce setting is a Intel card setting.

The output of my ethercat interface fromthe commadn "ip a"
Code:
4: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000     link/ether c4:62:37:06:66:54 brd ff:ff:ff:ff:ff:ff     inet6 fe80::c662:37ff:fe06:6654/64 scope link        valid_lft forever preferred_lft forever
no ipv4 address


 

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

More
1 year 5 months ago #328128 by Roger S
Replied by Roger S on topic Using POSIX realtime
My Ethercat Interface:
Code:
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000     link/ether 80:ee:73:fd:0f:8b brd ff:ff:ff:ff:ff:ff     inet6 fe80::d771:e69b:b8c8:1f5e/64 scope link noprefixroute        valid_lft forever preferred_lft forever

 

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

More
1 year 5 months ago #328134 by Hakan
Replied by Hakan on topic Using POSIX realtime
This is interesting...
Looks the same. I changed my device to the same settings you have and it still works.
Is it a Realtek device? Which kernel module does it use? Find with the command "lspci -k" and find the network adapter.

I looked in the source code for when it rejects a device and this is what it says in the ecdev_offer() function in module.c:
Code:
* The master decides, if it wants to use the device for EtherCAT operation,  * or not. It is important, that the offered net_device is not used by the  * kernel IP stack. If the master, accepted the offer, the address of the  * newly created EtherCAT device is returned, else \a NULL is returned.

There are some debug outputs that can be interesting. Unfortunately the debug attempt before failed
because the master is configured before the debug can be set in the way we tried before.
But here is a way.
First stop the ethercat server with the command "sudo /usr/sbin/ethercatctl stop".
Then copy the the file /usr/sbin/ethercatctl (it is a script) to a new name like ectl and change the line as shown
Code:
sudo cp /usr/sbin/ethercatctl ectl # ... edit ectl and add debug_level=1 to this line a shown around line 126 in ectl     # load master module     if ! ${MODPROBE} ${MODPROBE_FLAGS} ec_master \             main_devices="${DEVICES}" backup_devices="${BACKUPS}" debug_level=1; then         exit 1     fi # Make executable chmod +x ectl # and start the ethercat master, then reset debug level to 0. It produces a lot of info sudo ./ectl start ethercat debug 0 sudo dmesg

Then have a look at the output, the lines around the configuration is important.
 

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

More
1 year 5 months ago - 1 year 5 months ago #328135 by Roger S
Replied by Roger S on topic Using POSIX realtime
Hello Hakan
I hope I did everything correctly. Here's the result of lspci -k:
Code:
00:00.0 Host bridge: Intel Corporation Device 461c     DeviceName: Onboard - Other     Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Device 4164 00:02.0 VGA compatible controller: Intel Corporation Alder Lake-N [UHD Graphics]     DeviceName: Onboard - Video     Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Alder Lake-N [UHD Graphics]     Kernel driver in use: i915     Kernel modules: i915 00:14.0 USB controller: Intel Corporation Alder Lake-N PCH USB 3.2 xHCI Host Controller     DeviceName: Onboard - Other     Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Alder Lake-N PCH USB 3.2 xHCI Host Controller     Kernel driver in use: xhci_hcd     Kernel modules: xhci_pci 00:14.2 RAM memory: Intel Corporation Alder Lake-N PCH Shared SRAM     DeviceName: Onboard - Other 00:16.0 Communication controller: Intel Corporation Alder Lake-N PCH HECI Controller     DeviceName: Onboard - Other     Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Alder Lake-N PCH HECI Controller     Kernel driver in use: mei_me     Kernel modules: mei_me 00:17.0 SATA controller: Intel Corporation Alder Lake-N SATA AHCI Controller     DeviceName: Onboard - SATA     Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Alder Lake-N SATA AHCI Controller     Kernel driver in use: ahci     Kernel modules: ahci 00:1c.0 PCI bridge: Intel Corporation Alder Lake-N PCI Express Root Port     Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Alder Lake-N PCI Express Root Port     Kernel driver in use: pcieport 00:1c.1 PCI bridge: Intel Corporation Alder Lake-N PCI Express Root Port     Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Alder Lake-N PCI Express Root Port     Kernel driver in use: pcieport 00:1d.0 PCI bridge: Intel Corporation Alder Lake-N PCI Express Root Port     Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Alder Lake-N PCI Express Root Port     Kernel driver in use: pcieport 00:1f.0 ISA bridge: Intel Corporation Alder Lake-N PCH eSPI Controller     DeviceName: Onboard - Other     Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Alder Lake-N PCH eSPI Controller 00:1f.3 Audio device: Intel Corporation Alder Lake-N PCH High Definition Audio Controller     DeviceName: Onboard - Sound     Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Alder Lake-N PCH High Definition Audio Controller     Kernel driver in use: snd_hda_intel     Kernel modules: snd_hda_intel, snd_sof_pci_intel_tgl 00:1f.4 SMBus: Intel Corporation Alder Lake-N SMBus     DeviceName: Onboard - Other     Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Alder Lake-N SMBus     Kernel driver in use: i801_smbus     Kernel modules: i2c_i801 00:1f.5 Serial bus controller: Intel Corporation Alder Lake-N SPI (flash) Controller     DeviceName: Onboard - Other     Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Alder Lake-N SPI (flash) Controller 01:00.0 Ethernet controller: Intel Corporation Ethernet Controller I226-LM (rev 04)     Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Ethernet Controller I226-LM     Kernel driver in use: igc     Kernel modules: igc 02:00.0 Ethernet controller: Intel Corporation Ethernet Controller I226-LM (rev 04)     Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Ethernet Controller I226-LM     Kernel driver in use: igc     Kernel modules: igc 03:00.0 Non-Volatile memory controller: Transcend Information, Inc. NVMe PCIe SSD 110S/112S/120S/MTE300S/MTE400S/MTE652T2 (DRAM-less) (rev 03)     Subsystem: Transcend Information, Inc. NVMe PCIe SSD 110S/112S/120S/MTE300S/MTE400S/MTE652T2 (DRAM-less)     Kernel driver in use: nvme     Kernel modules: nvme
Last edit: 1 year 5 months ago by Roger S.

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

More
1 year 5 months ago #328137 by Roger S
Replied by Roger S on topic Using POSIX realtime

File Attachment:

File Name: dmesg_2025...10-7.txt
File Size:70.36 KB

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

Time to create page: 0.140 seconds
Powered by Kunena Forum