OpenEtherCATsociety / SOEM

Simple Open Source EtherCAT Master
Other
1.24k stars 653 forks source link

print ECAT frames #763

Closed open04 closed 7 months ago

open04 commented 7 months ago

Is it possible to print the ECAT frames? will use for debugging purposes. I want to print out the frames when I write on SDO or PDO.

ArthurKetels commented 7 months ago

Yes, easiest is to use WireShark. It captures all Ethernet traffic, and has special filters for EtherCAT build in.

open04 commented 7 months ago

Hi Arthur, sorry for confusion but what I meant was to print the ECAT frame in the code itself, in Cpp. I want to see the frames Im sending in the terminal, not to use another application.

ArthurKetels commented 7 months ago

You can do it yourself too. If your print a hexdump of the outgoing and incoming packets. Or you make a complete parser like WireShark does. Why can't you simply use WireShark? Everyone else does it this way with great satisfaction.

The location you want to plug into are ecx_outframe() and ecx_waitinframe().

open04 commented 7 months ago

Thanks Arthur!, Ill try the ecx_outframe() and ecx_waitinframe().

Im using Wireshark and I can also read frames from there. What I want is to print selected frames on the terminal which makes it easy for me and also my colleague to debug if we encounter problems.

open04 commented 7 months ago

I didnt expect it to be complicated. I will not include it on my package, Ill close this issue now. Thanks again Arthur