<div dir="ltr"><div>Hi Gavin,</div><div><br></div><div>Thank you very much for your reply. At least this confirms that this is a problem in our setup - we were not aware of this limitation.</div><div><br></div><div>We found the relevant patch and are trying to incorporate it into 1.6 now, hoping our understanding of the code will suffice. Do you think CoE and EoE should then work together on the same slave with that patch? We're running a userspace application, and I've read before about ecrt_master_callbacks() being necessary to synchronize the EoE and master threads, but that only seems to apply to kernel-space applications. We've also seen that a mutex has recently been added to protect master access between the EoE and master thread, so we hoped that this was not an issue anymore.</div><div><br></div><div>Best regards,</div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr" style="margin-left:0pt" align="left"><table style="border:none;border-collapse:collapse"><colgroup><col width="150"><col width="333"></colgroup><tbody><tr style="height:47.50902343749999pt"><td style="vertical-align:top;padding:5pt 5pt 5pt 5pt;overflow:hidden"><p dir="ltr" style="line-height:1.2;text-align:center;margin-top:0pt;margin-bottom:0pt"><a href="https://www.robco.de/" style="text-decoration:none" target="_blank"><span style="font-size:10pt;font-family:Roboto,sans-serif;color:#1155cc;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:133px;height:133px"><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfF5AjIHBSKz4Zxa4Gzpt5JDTTMdD4sfqNjhbMstQV7ToWCWZc1NZxs9tw6YyJVwoB90rplnz_UL7G3dcwzBETM84o7iFnLW4zx5BLinnjWQXpVo40T4BXhjBZVUb8CXz9C9Z42UUZd1oDl8cDuW_mLGcg?key=Ay-1n6Z8hhtNZMlqcAFWUw" width="96" height="96" style="margin-left:0px;margin-top:0px"></span></span></a></p></td><td style="vertical-align:top;padding:5pt 5pt 5pt 5pt;overflow:hidden"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:16pt;font-family:Castoro,serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Bernhard Vorhofer</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:Nunito,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Junior Software Engineer</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"></p><hr><p></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9pt;font-family:Nunito,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:16px;height:16px"><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcHHjugUili_VxK9Nn1lU1aBKntMM8kqtr7pdr4pLACHP662cl0sqhQkAswxEMTnGu_TrB53xNC64DK9pQXSdOw0MZ3fUoxHCxclioCXCBc8_-KFVPMqKoQO0RoIdzNLyKtAfsrculNWQCroxYWrTSQBJU?key=Ay-1n6Z8hhtNZMlqcAFWUw" width="16" height="16" style="margin-left:0px;margin-top:0px"></span></span><span style="font-size:9pt;font-family:Nunito,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"> </span><a href="mailto:bernhard.vorhofer@robco.de" target="_blank"><span style="font-size:10pt;font-family:Nunito,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">bernhard.vorhofer@robco.de</span></a></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9pt;font-family:Nunito,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:16px;height:16px"><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdj2DLKPaVWEFWK2mgJjL_3IVDwUMkyUIFFPK-_46C50m0NkwP24qH1GFOBXyxX7qqYZg5cO8SWAae3w5Br9rEFV-t-wrXnaFjs9w5yYvsK02ipmaPpSY3txl8Vb1PGy1rQuEqWZF-hT4hFvasDi-SvV80?key=Ay-1n6Z8hhtNZMlqcAFWUw" width="16" height="16" style="margin-left:0px;margin-top:0px"></span></span><span style="font-size:10pt;font-family:Nunito,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"> </span><span style="font-size:10pt;font-family:Nunito,sans-serif;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Augustenstraße 10-14, 80333 Munich, Germany</span></p></td></tr><tr style="height:21pt"><td colspan="2" style="vertical-align:top;padding:5pt 5pt 5pt 5pt;overflow:hidden"><p dir="ltr" style="line-height:1.2;background-color:#ffffff;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:Nunito,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">RobCo GmbH</span></p><p dir="ltr" style="line-height:1.2;background-color:#ffffff;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:Nunito,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Managing Directors: Roman Hölzl, Paul Maroldt</span></p><p dir="ltr" style="line-height:1.2;background-color:#ffffff;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:Nunito,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">HRB 259870, Munich Local Court, VAT ID: DE338129593</span></p></td></tr></tbody></table></div></div></div></div><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, 16 Mar 2025 at 23:31, Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com">gavin.lambert@tomra.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-87154416746507513">





<div lang="EN-NZ" style="overflow-wrap: break-word;">
<div class="m_-87154416746507513WordSection1">
<p class="MsoNormal"><span>Yes, that’s a known issue; CoE and EoE in the same slave do not play nicely together.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Currently the only known workaround is to use the
<a href="https://sourceforge.net/u/uecasm/etherlab-patches/ci/default/tree/#readme" target="_blank">
unofficial patchset for 1.5</a>, which includes some patches to fix.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Some of the patches have also been ported to the
<a href="https://gitlab.com/etherlab.org/ethercat/-/tree/devel" target="_blank">devel branch</a> (which I have not tested) but I don’t think they made it into 1.6 for some reason.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<span style="font-family:Gotham,Calibri,"sans-serif";color:rgb(35,31,32)"><strong>Gavin Lambert<br></strong>
 <br>
Software Engineer<br>
<br>

</span><br>
 <br><img style="height: 45px; width: 192px;" src="cid:ii_195a36143659fb34c071" width="192" height="45" border="0">
 <br>

 <a href="https://www.facebook.com/TOMRA.Food/" target="_blank"><img alt="tomra facebook" src="cid:ii_195a36143654244f7ca2" height="30"></a> <a href="https://www.linkedin.com/company/tomra-food/" target="_blank"><img alt="tomra linkedin" src="cid:ii_195a36143664c933db13" height="30"></a> <a href="https://twitter.com/TOMRAFood" target="_blank"><img alt="tomra twitter" src="cid:ii_195a3614366dee978ed4" height="30"></a> <a href="https://www.youtube.com/playlist?list=PLDD3B1A7BAE919EC6" target="_blank"><img alt="tomra youtube" src="cid:ii_195a3614366c2ca7d1d5" height="30"></a> <a href="https://www.instagram.com/tomrafood/" target="_blank"><img alt="tomra instragram" src="cid:ii_195a361436667135026" height="30"></a><br>
<span style="font-size:75%;font-family:Calibri,Candara,Segoe,Optima,Arial,sans-serif;color:rgb(110,129,134)"> <b>TOMRA Food (ANZ) Limited</b> 
| 4 Henderson Place | PO Box 13 516 | Onehunga 1061 | New Zealand </span><br>
<p style="font-size:10pt;margin-bottom:5pt;font-family:Arial;margin-top:0px"></p>
<span style="font-size:75%;font-family:Calibri,Candara,Segoe,Optima,Arial,sans-serif;color:rgb(110,129,134)"> Phone: +64 96 34 00 88 | <a href="https://www.tomra.com/food" target="_blank">https://www.tomra.com/food</a></span><br>
<span style="font-size:60%;font-family:Gotham,Calibri,"sans-serif";color:rgb(110,129,134)">The information contained in this communication and any attachment is confidential and may be legally privileged. It should only be read by the person(s) to whom it is addressed. If you have received this communication in error, please notify the sender and delete the communication. </span><br>
<span style="font-size:60%;font-family:Gotham,Calibri,"sans-serif";width:75%;color:rgb(110,129,134)">
</span><div style="border-width:medium medium medium 1.5pt;border-style:none none none solid;border-color:currentcolor currentcolor currentcolor blue;padding:0cm 0cm 0cm 4pt">
<div>
<div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(225,225,225) currentcolor currentcolor;padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11pt;font-family:"Calibri",sans-serif"> Etherlab-users <<a href="mailto:etherlab-users-bounces@etherlab.org" target="_blank">etherlab-users-bounces@etherlab.org</a>>
<b>On Behalf Of </b>Bernhard Vorhofer<br>
<b>Sent:</b> Saturday, 15 March 2025 5:00 am<br>
<b>To:</b> <a href="mailto:etherlab-users@etherlab.org" target="_blank">etherlab-users@etherlab.org</a><br>
<b>Subject:</b> [Etherlab-users] EoE in userspace - Other mailbox response<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">Dear all,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">we're currently investigating some issues with a particular slave (BBH SCU-2-EC FSoE Master). There are multiple issues (sometimes the slave refuses state change to OP, for example), but something that piqued our interest be seen in the
 following log excerpt:<u></u><u></u></p>
</div>
<div>
<div>
<div>
<div style="margin-bottom:3pt;box-sizing:inherit;max-width:none">
<div>
<div>
<div>
<div>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG 0: ecrt_master_sdo_upload(master = 0x00000000d53d8735, slave_position = 0, index = 0x4002, subindex = 0x00, target = 0x00000000f9b1cb01, target_size = 40, result_size = 0x000000007e76960b, abort_code = 0x000000002d1055bf)<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG 0-0: Scheduling SDO upload request.<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG 0-0: Processing SDO request...<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG 0-0: Uploading SDO 0x4002:00.<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG 0-0: Upload request:<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG: 00 20 40 02 40 00 00 00 00 00 <u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG 0-0: Upload response:<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG: 00 30 41 02 40 00 28 00 00 00 00 74 0B 00 DF 8C <u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG: CC 04 00 00 00 00 00 00 80 3F 00 00 00 00 00 00 <u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG: 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 <u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG: 00 00 <u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG 0-0: Uploaded data:<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG: 00 74 0B 00 DF 8C CC 04 00 00 00 00 00 00 80 3F <u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG: 00 00 80 3F 00 00 00 00 <u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG 0-0: Finished SDO request.<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG 0: ecrt_master_sdo_upload(master = 0x00000000d53d8735, slave_position = 0, index = 0x4002, subindex = 0x00, target = 0x00000000f9b1cb01, target_size = 40, result_size = 0x000000004af47ed5, abort_code = 0x00000000d0acc148)<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG 0-0: Scheduling SDO upload request.<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG 0-0: Processing SDO request...<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG 0-0: Uploading SDO 0x4002:00.<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG 0-0: Upload request:<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT DEBUG: 00 20 40 02 40 00 00 00 00 00 <u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT WARNING 0-0: Other mailbox protocol response for eoe0s0.<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT ERROR 0-0: Timeout after 1000 ms while waiting for SDO 0x4002:0 upload response.<u></u><u></u></span></pre>
<pre style="margin-right:0cm;margin-bottom:3pt;margin-left:0cm"><span style="font-size:9pt;font-family:Consolas">kernel: EtherCAT ERROR 0-0: Failed to process SDO request.<u></u><u></u></span></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal">The first SDO request is successful, the second one times out. Right before the timeout, the message "Other mailbox protocol response for eoe0s0" appears. It seems that the SDO response somehow ends up in the EoE thread, is dropped there
 and thus lost.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Are we interpreting this behavior correctly? Is there anything that can be done to prevent this from happening, and could this cause some other issues we're seeing (slave refusing to go to OP due to "Invalid input configuration")?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">We've seen the function `ecrt_master_callbacks`, but it seems that it's only relevant in case the application is run in a kernel module. Our application runs in a userspace process.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thank you very much and best regards,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Bernhard Vorhofer<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>

</div></blockquote></div>