This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How can I sniff EtherCAT ?

0

Hi,

OK, first time using Wireshark, and it fell at the first hurdle, hmm. Can some kind person help? I'm trying to use to sniff an EtherCAT packet. Just to verify, that my understanding of size, is correct. Wireshark says it works with EtherCAT.

However, I get error dialogue about Wireshark being unable to initiate capture session, and 'failed to set hardware filter to promiscuous mode'. And to check https://wiki.wireshark.org/WinPcap and https://wiki.wireshark.org/CaptureSetup. Nothing relevant there, unfortunately, nor google.

I have an image of the dialogue, that I can PM if need be. Seems I need 60 points on this forum, to be able to post images.

I have 2 other network adaptors on the PC, used for regular Ethernet traffic, and Wireshark can sniff those fine. I don't know if it's relevant, but those two are external USB-connected network adaptors (both ASIX AX88179 USB 3.0 to Gigabit Ethernet models). Whereas the adaptor used for EtherCAT, is the PC onboard network adaptor. I have to use the latter for EtherCAT, as it won't work with the external adaptors, reason unknown. None of the 3 network adaptors expose a 'promiscuous mode' setting in their properties. I am familiar with what 'promiscuous mode' is. I have admin rights on the PC.

The setup I have, is a PC-based and Visual-Studio-2010-hosted Beckhoff-provided TwinCAT3 master project. It communicates with an EtherCAT slave running on an Infineon XMC4300 CPU. This created using the Infineon DAVE4.3.2 IDE, using an Infineon-provided example EtherCAT project. This uses the DAVE ECAT_SSC APP component, and Beckhoff-provided ET9300 Slave Stack Code (SSC) Tool, to configure the values to be provided to the TwinCAT3 master. And all works, fine.

I've tried starting Wireshark before the master and slave start communicating, as well as after, with the same results.

I'm not quite sure I understand why Wireshark needs to place the adaptor in promiscuous mode. As I understand, this makes the adaptor accept all packets, not just those with its' IP address. I don't need the adaptor to accept packets which are not addressed to it. I would just like to capture one packet intended for it.

I've tried each of the following, same results: Turning off the 'Capture packets in promiscuous mode' setting, in Wireshark Edit > Preferences > Capture. Turning off the other 3 options there. Setting the default interface to the onboard network adaptor. Restarting Wireshark. Rebooting PC.

I suspect, that because the turning off the first option gave same results, the error dialogue indication that inability to set promiscuous mode, is the problem, is infact, a red-herring.

I'm using the latest Wireshark, Version 2.2.6 (v2.2.6.0-g32dac6a), downloaded and installed this morning, from the Wireshark website.

Any ideas, anyone ?

Ah, found the answer! Nothing like explaining the problem, to elicit the solution. It's to select 'Promiscuous Mode (use with Wireshark only)' setting (of course !), in I/O > Devices > mydevice > Adapter settings, in the TwinCAT3 project..

Many thanks,

David King

asked 26 May '17, 00:52

David%20King's gravatar image

David King
31113
accept rate: 100%

edited 26 May '17, 01:12

@David King,

Please post your "answer" as an answer and accept it to help others in future.

(26 May '17, 02:06) grahamb ♦

One Answer:

0

Ah, found the answer! Nothing like explaining the problem, to elicit the solution. It's to select 'Promiscuous Mode (use with Wireshark only)' setting (of course !), in I/O > Devices > mydevice > Adapter settings, in the TwinCAT3 project..

answered 26 May '17, 02:09

David%20King's gravatar image

David King
31113
accept rate: 100%