# 使用wireshark进行EtherCAT分析实时性~~·

https://www.ethercat.org/en/products/98A8E06BB941491398D4E66B481F3CAF.htm

# EtherCAT Parser for Wireshark

The parser for EtherCAT is automatically included in the latest Wireshark version available.

To display detailed frame information added by the ET2000 Multi-Channel Probe from Beckhoff Automation, there is a specific EtherCAT DLL available for Wireshark here.

# Cant capture EtherCAT packet

 0 Hello I installed Wireshark v1.4.3 When I tried to capture EtherCAT packet from my Realtek NIC, I can not see the EtherCAT packet. I only can capture DHCP protocol packet. Should I have to config other option to capture EtherCAT packet? asked 16 Feb '11, 20:54 Younghyun Jo1●1●1●1accept rate: 0% Jaap ♦7.8k●13●84 Hello i have a similiar problem. I cant capture ethercat messages. I am connecting to a beckhoff i/o module(EK1100) using a cross network cable. I use Twincat program for ethercat master protocol. There is no problem with the operation of the device. On same pc i use wireshark to monitor messages. The program has two modes: run and config mode. I can capture an ethercat message which shows the switching between modes but when input and output values change i can not get a message. In twincat program i can see what has changed. I did not change anythin in wireshark and i have all the plugins, i use version 1.4.3. I could notunderstand what is going on any help will be helpful. (31 Jan '12, 11:15)Hakan Kapson

 0 According to http://www.ethercat.org/en/technology.html#3.1, EtherCAT uses either Ethertype 0x88A4 or UDP port 0x88A4. And at the link layer, it's just ethernet.So you don't have to do anything special to be able to capture EtherCAT packets. Take a look at http://wiki.wireshark.org/CaptureSetup/Ethernet for information on how to capture in different setups. Regarding dissecting of the EtherCAT frame, it's done in a separate plugin, have you installed all the plugins that came with Wireshark? answered 16 Feb '11, 22:52 SYN-bit ♦♦16.1k●8●53●229accept rate: 20% I am sure I already installed ethercat plugin for wireshark. I can see ethercat.dll in Wiresharkplugins1.4.3 directory. I dont know why this problem happened to me. Does anyboy has another idea? (16 Feb '11, 23:00)Younghyun Jo (I converted your "answer" to a "comment" to adhere to the Q&A nature of this site) Is the PC you are capturing on communicating over EtherCAT itself? If not, did you enable "promiscuous mode"? How is your capturing PC connected to the network that transfers EtherCAT messages? Did you check the CaptureSetup link I mentioned earlier? (17 Feb '11, 00:35)SYN-bit ♦♦
 0 Hello, i have come across the same problem. I have found the solution in the Slave Implementation Guide. The steps below are the solution. I/O Devices->your device->Adapter->set the Promiscuous Mode( use with Netmon/ Wireshark only)Scan Boxes answered 13 Sep '13, 01:59 Ecatrui1accept rate: 0%

Tags:

ethercat ×3

Seen: 4,256 times

Last updated: 13 Sep '13, 01:59

# EtherCAT

EtherCAT is an open, high performance Ethernet-based fieldbus system. The development goal of EtherCAT was to apply Ethernet to automation applications which require short data update times (also called cycle times) with low communication jitter (for synchronization purposes) and low hardware costs. The EtherCAT protocol is optimised for process data and is transported directly within the standard IEEE 802.3 Ethernet frame using Ethertype 0x88a4. It may consist of several sub-datagrams, each serving a particular memory area of the logical process images that can be up to 4 gigabytes in size. The data sequence is independent of the physical order of the nodes in the network; addressing can be in any order. Broadcast, multicast and communication between slaves are possible. If IP routing is required, the EtherCAT protocol can be inserted into UDP/IP or TCP/IP datagrams. This also enables any control with Ethernet protocol stack to address EtherCAT systems.

## Protocol dependencies

• Ethernet: EtherCAT can use Ethernet as its transport mechanism. The assigned Ethernet type for EtherCAT traffic is 0x88A4.

• UDP: EtherCAT protocol can be transported in UDP datagrams. The assigned UDP port for EtherCAT is 0x88a4.

## Example traffic

Frame 1 (128 bytes on wire, 128 bytes captured)
Ethernet II, Src: MS-NLB-PhysServer-14_a6:c9:01:8e (02:0e:a6:c9:01:8e), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
.... .000 0111 0000 = Length: 0x0070
.... 0... .... .... = Reserved: Valid (0x0000)
0001 .... .... .... = Type: EtherCAT command (0x0001)
EtherCAT datagram: Cmd: 'LRW' (12), Len: 100, Addr 0x10000, Cnt 2
Command    : Logical memory read write (0x0c)
Index      : 0x39
Length     : 100 (0x64) - No Roundtrip - Last Sub Command
.... .000 0110 0100 = Length: 100
..00 0... .... .... = Reserved: Valid (0)
.0.. .... .... .... = Round trip: Frame is not circulating (0)
0... .... .... .... = Last indicator: Last EtherCAT datagram (0)
Interrupt  : 0x0000
Data      : 000000000000000000000000000000000000000000000000...
Working Cnt: 2

## Preference Settings

There are no EtherCAT specific preference settings. Allowing sub dissectors to handle data based on heuristic analysis is always enabled and cannot be turned off.

## Sub dissectors

Dissectors that are interested in dissecting the EtherCAT datagram portion of the EtherCAT frame (there may be multiple EtherCAT datagrams in each frame), may do so using heuristic analysis by registering themselves using the function heur_dissector_add("ecat.data", ...).

'

## Example capture file

Capture of startup sequence for some Beckhoff devices.

## Display Filter

A complete list of IP display filter fields can be found in the display filter reference

• Show only the EtherCAT based traffic:
 ecat
 ecat.ado == 0x130
Filter on a specific slave by its position or fixed EtherCAT address (adp):
 ecat.adp == 0x3e9
Filter on a specific cmd (here APRD):
 ecat.cmd == 0x1
Filter on a specific field of a sub command :
 ecat.sub1.idx < 0x80
Show only the EtherCAT mailbox traffic:
 ecat_mailbox

## Capture Filter

• Capture Ethercat-over-Ethernet traffic only:

 ether proto 0x88a4

Capture Ethercat-over-UDP traffic only:

 udp port 0x88a4

SOEM (Simple Open EtherCAT Master) can be found at http://openethercatsociety.github.io/

IgH EtherCAT Master for Linux can be found at http://www.etherlab.org/en/ethercat/index.php

• 评论

3

• 上一篇
• 下一篇