# `mix ethercat.scan`
[🔗](https://github.com/tallakt/yaethercat/blob/v0.1.0/lib/mix/tasks/ethercat.scan.ex#L1)

Scans the EtherCAT segment on an interface and prints its SubDevices: where they are, who they
are, their AL state, their mailbox, sync managers and the PDOs their SII lists.

    mix ethercat.scan --interface eth1
    mix ethercat.scan --interface eth1 --map

A scan gives the SubDevices their station addresses, and changes nothing else. With `--map` it
also maps their process data, which takes them to Pre-Operational, and prints where each entry is
in the image.

Options:

  * `--interface` (`-i`), the Ethernet interface the segment is on
  * `--udp host:port`, a segment behind UDP instead
  * `--map`, to map the process data too

---

*Consult [api-reference.md](api-reference.md) for complete listing*
