Atemsys error in acontis EtherCAT demo

I’ve been trying to follow the “How to Get Started” guide, for the acontis EC-Master EtherCAT Stack, here: acontis EC-Master EtherCAT Stack | Toradex Developer Center, and I’m looking for information on binding the Ethernet interface to the atemsys kernel module. I’m using an Apalis iMX8.

I’ve successfully followed the steps up until the point I have to run EcMasterDemo with the optimized link layer, in the “Evaluate EC-Master + EC-Engineer” section. I get the following output from the app:

0000000000: EcMasterDemo V3.2.3.01 for Linux_aarch64 Copyright acontis technologies GmbH @ 2025
0000000000: Full command line: -fslfec 1 1 custom imx8 rgmii 7 nopinmuxing nomacaddr -t 0 -sp
0000000000: Start Remote API Server now
0000000001: EC-Master V3.2.3.01 (Protected) for Linux_aarch64 Copyright acontis technologies GmbH @ 2025
0000000003: emllFslFec(0x00000001): V3.2.3.01 (Unrestricted) for Linux_aarch64 Copyright acontis technologies GmbH @ 2025
0000000004: LinkOsCreateContext(): open device '/dev/atemsys' failed!
0000000004: CEcDeviceBase::Open() Failed to open link layer!
0000000004: emInitMaster(): Error opening EtherCAT device!
0000000204: Cannot initialize EtherCAT-Master: ERROR: Open failed (0x98110011))
0000000204: Stop Remote Api Server
0000000715: ERROR: Cannot de-initialize EtherCAT-Master: ERROR: Invalid state (0x9811000e)
0000000716: EcMasterDemo stop.

I’m not sure I’ve done the binding to the atemsys module correctly. The steps describe using a “BindFecToAtemsys.sh” script, which is not available in the latest acontis EC master image. I see further up the webpage, there’s a “Note about BindFecToAtemsys.sh”. There’s an instruction to “Add atemsys_fec.dtbo to fdt_overlays in /boot/overlays.txt.”, which I followed, but I still see the error above.

Is there something else I’m missing here? One thing I’ve noticed is that there is no atemsys_fec.dtbo file in /boot/overlays/. I do see atemsys_fec1.dtbo and atemsys_fec2.dtbo though. I’ve tried adding those to /boot/overlays.txt instead, but I still get an error when I run the app.

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello, and thank you for your detailed question!

You’re on the right track with the updated workflow for binding the FEC Ethernet interface to the atemsys kernel module, as the older BindFecToAtemsys.sh script is no longer available (and not compatible with BSP 6.6 or later). Let me help clarify the process and troubleshoot your issue.

Correct Process for Binding the FEC Interface

1. Overlay Selection for Apalis iMX8

On Apalis iMX8, you will typically see two overlay files:

  • atemsys_fec1.dtbo — for the first FEC port
  • atemsys_fec2.dtbo — for the second FEC port

You should use the overlay corresponding to the Ethernet interface you plan to use for EtherCAT. For example, if you’re using the first port, add the following line to /boot/overlays.txt:

fdt_overlays=atemsys_fec1.dtbo

Or, if you also have other overlays, append it like this:

fdt_overlays=[other overlays] atemsys_fec1.dtbo

Save the file and reboot your device for changes to take effect.

2. Verify Overlay Application

After rebooting, check that the overlay was applied:

dmesg | grep atemsys

You should see messages related to the atemsys driver.

3. Ensure Optimized Link Layer is Installed

The EC-Master stack requires the optimized link layer, specifically the libemllFslFec.so library, which you must request from Acontis (it’s not included by default). Make sure it is installed in the directory where EcMasterDemo expects it.

4. Run EcMasterDemo With the Proper Arguments

Make sure you are using the correct command, for example:

./EcMasterDemo -fslfec 1 1 custom imx8 rgmii 7 nopinmuxing nomacaddr -t 0 -sp

This is for FEC1; update accordingly if you use FEC2.

What To Do If You Still See /dev/atemsys Not Found

Your error:

open device '/dev/atemsys' failed!

suggests the driver is not loaded, the device is unavailable, or the overlay has not been applied correctly.

  1. Check if /dev/atemsys exists

    ls -l /dev/atemsys
    

    If the file is not there, the overlay may not have been applied correctly. Double-check /boot/overlays.txt, reboot, and review dmesg logs.

  2. Confirm the overlay matches the physical interface
    Double-check which Ethernet port you are using (fec1 or fec2) and ensure the correct overlay file (atemsys_fec1.dtbo or atemsys_fec2.dtbo) is specified.

  3. Verify permissions
    Make sure your user has permission to access /dev/atemsys, although generally this will be root or a system service.

Additional References

For more detail, please see the official documentation:
acontis EC-Master EtherCAT Stack - How to Get Started


Would you like a step-by-step guide for checking the overlay application or help identifying which FEC port your hardware is using?

Best regards,
Toradex AI Assistant.

Thanks. That’s solved it.

For me, I needed to add “atemsys_fec1.dtbo” to overlays.txt, and then do a reboot.