# EtherCAT + Nerves

**URL:** <https://forum.elixirforum.com/t/ethercat-nerves/22261>\
**Category:** Questions\
**Tags:** nerves, eth0\
**Created:** [May 7, 2019, 6:02pm UTC](https://forum.elixirforum.com/t/ethercat-nerves/22261 "2019-05-07T18:02:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alde103](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/77aa72/32.png) [@alde103](https://forum.elixirforum.com/u/alde103)\
**Post date:** [May 7, 2019, 6:02pm UTC](https://forum.elixirforum.com/t/ethercat-nerves/22261/1 "2019-05-07T18:02:04Z")

</div>

Hi all, has anyone worked with EtherCAT and Nerves before?

I’m quite new with Ethercat, so I’m looking for a good starting point like a reliable and recommended library (and easy to use haa) that handles Ethercat that can be added to a nerves custom system.

Thanks in advance 🙂 .

---

<div class="post-metadata">

**Author:** ![ElixirTip](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/elixirtip/32/7689_2.png) [@ElixirTip](https://forum.elixirforum.com/u/ElixirTip)\
**Post date:** [May 7, 2019, 7:07pm UTC](https://forum.elixirforum.com/t/ethercat-nerves/22261/2 "2019-05-07T19:07:10Z")

</div>

I’ve worked with EtherCAT. Nerves uses Buildroot which includes an EtherCAT package `igh-ethercat`. It goes through the standard network stack. It also has a few hardware drivers such as `e100` for better performance. To include it you need to make a [custom Nerves system](https://hexdocs.pm/nerves/systems.html#content) and add the package.

Ultimately, we found it didn’t have the performance we needed for our specific hardware. So we made a custom, private Nerves system that uses [Acontis’s EtherCAT](https://www.acontis.com/en/) offering.

---

<div class="post-metadata">

**Author:** ![alde103](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/77aa72/32.png) [@alde103](https://forum.elixirforum.com/u/alde103)\
**Post date:** [May 7, 2019, 8:36pm UTC](https://forum.elixirforum.com/t/ethercat-nerves/22261/3 "2019-05-07T20:36:49Z")

</div>

Thanks for the answer, you give me a good path to follow !!! :).

If you do not mind to tell us, did you used the nerves official supported hardware or another one?  
I’m asking it because I’m planning to use a Rpi3 and I want to know if it’s worth to looking at igh-ethercat or directly to the Arcontis, or which were your performance limitations that igh-ethercat doesn’t accomplished?  
Also I want to ask:  
In your opinion, which package is more friendly to use (or to make an elixir wrapper)?

Thanks in advance…

---

<div class="post-metadata">

**Author:** ![ElixirTip](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/elixirtip/32/7689_2.png) [@ElixirTip](https://forum.elixirforum.com/u/ElixirTip)\
**Post date:** [May 10, 2019, 5:09pm UTC](https://forum.elixirforum.com/t/ethercat-nerves/22261/4 "2019-05-10T17:09:01Z")

</div>

We had problems with `igh-ethercat` with raspberry pi. It simply couldn’t compile the `igh-ethercat` package. We never figured out why. It worked with BeagleBone Black and that’s what we’re still using.

We needed sub-millisecond response times on EtherCAT. `igh-ethercat` doesn’t provide hardware drivers for BBB (or RPi). So it was taking several milliseconds for a round trip.

If you don’t need that level of performance, then go with `igh-ethercat`. It’s also open source. Actontis provides proprietary, enterprise-level solutions so you’ll be paying quite a bit for it.

---

<div class="post-metadata">

**Author:** ![alde103](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/77aa72/32.png) [@alde103](https://forum.elixirforum.com/u/alde103)\
**Post date:** [May 23, 2019, 8:40pm UTC](https://forum.elixirforum.com/t/ethercat-nerves/22261/5 "2019-05-23T20:40:24Z")

</div>

Hi all, here is an update of this thread; first, I tried to build `igh-ethernet` package in buildroot for a rpi3, however, since rpi3 doesn’t have any `igh-ethernet` supported hardware. The `igh-ethernet` needs to be compiled with `--enable-generic` option, therefore, I needed to add a custom `igh-ethernet` package to buildroot, also I enabled udev, taskset packages. Despite this, I had these types of warnings during compilation:

```elixir
depmod: WARNING: /home/alde/Documents/Elixir/Nerves/repos/valiot_system_rpi3/.nerves/artifacts/valiot_system_rpi3-portable-1.7.2-valiot.7/target/lib/modules/4.19.25/extra/devices/ec_generic.ko needs unknown symbol kernel_bind

depmod: WARNING: /home/alde/Documents/Elixir/Nerves/repos/valiot_system_rpi3/.nerves/artifacts/valiot_system_rpi3-portable-1.7.2-valiot.7/target/lib/modules/4.19.25/extra/master/ec_master.ko needs unknown symbol sched_setscheduler
.
.
.

```

The following error was shown during runtime:

```elixir
iex(3)> cmd "modprobe ec_master"
modprobe: can't load module ec_master (extra/master/ec_master.ko): unknown symbol in module, or unknown parameter
1

```

At this point I thought it could be a kernel version issue, since when compiling a similar repository (for [bbb](https://github.com/NewVistas/nerves_system_bbb_with_ethercat)), the compilation works without warnings, therefore, I lost interest in using `igh-ethernet` haha.

The second option was the arcontis software `atemsys`, which it appears to be easier to compile, so I added a custom package to buildroot, however, during compilation I had the same type of warning (only 1 warning) as before:

```elixir
depmod: WARNING: /home/alde/Documents/Elixir/Nerves/repos/valiot_system_rpi3/.nerves/artifacts/valiot_system_rpi3-portable-1.7.2-valiot.7/target/lib/modules/4.19.25/extra/atemsys.ko needs unknown symbol of_find_compatible_node

```

Therefore, it also fails at runtime.

My third option was the SOEM project, I had no issue with this library (compiles with no warnings), however, this package is refered by the community more as a library than a master software, therefore, I think that its better to make an Elixir wrapper than add the package in buildroot.

Giving another chance to the previous options (atmsys, igh-ethernet) and looking the [bbb](https://github.com/NewVistas/nerves_system_bbb_with_ethercat) project, it seems that by disabling `CONFIG_TRIM_UNUSED_KSYMS=y` in linux-x.x.defconfig both packages works in runtime !!!

The option `CONFIG_TRIM_UNUSED_KSYMS=y` seem to be to trim exported kernel symbols that are not used, which for me seems that it makes the opposite, I also do not know what kind of problems I am creating when disabling this option :(, Does anyone knows?

Currently, the problem in which I am working with `igh-ethernet` is to open a device `/dev/EtherCAT0` that does not exist, but I think it’s a matter of executing some package commands and defining some rules in `/etc/udev/rule.d` (this directory does not exist either).

Does anyone know how to define these rules in Nerves?, or does it have to be done in Buildroot?

Regards.

---

<div class="post-metadata">

**Author:** ![n0gg1n](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/n0gg1n/32/18271_2.png) [@n0gg1n](https://forum.elixirforum.com/u/n0gg1n)\
**Post date:** [March 7, 2026, 9:16pm UTC](https://forum.elixirforum.com/t/ethercat-nerves/22261/6 "2026-03-07T21:16:14Z")

</div>

If anyone is still stumbling upon this problem, I’ve written two libraries which are both running on \<10ms cycle time on a Rpi4:

- [igh\_ethercat](https://www.github.com/sid2baker/igh_ethercat) (a wrapper for IgH EtherCAT written with Zigler)
- [ethercat](https://www.github.com/sid2baker/ethercat) (written in pure Elixir)
