<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,</p>
<p><br>
</p>
<p>My CX2100 patch is attached.</p>
<p><br>
</p>
<p>Graeme.</p>
<p><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> $B<~JcpC(B <erixchou@mapacode.tw><br>
<b>Sent:</b> Thursday, 19 January 2017 4:14:33 PM<br>
<b>To:</b> Graeme Foot<br>
<b>Cc:</b> etherlab-dev@etherlab.org<br>
<b>Subject:</b> Re: [etherlab-dev] "Master still waiting for devices!" problem.</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>Hi Graeme,<br>
<br>
</div>
I think that 1) and 2) was done correctly in my case.<br>
</div>
For 3), I'll check dmesg.<br>
</div>
For 4), I found the thread in 2013:<br>
<a href="http://lists.etherlab.org/pipermail/etherlab-users/2013/002074.html" target="_blank" id="LPlnk849848" previewremoved="true">http://lists.etherlab.org/<wbr>pipermail/etherlab-users/2013/<wbr>002074.html</a><br>
</div>
But I can't get the attachment since I'm not in the etherlab-user mail list.<br>
</div>
Is there any other way to get the attachment?<br>
<br>
</div>
Thank you for your response.<br>
Best regards - Erix Chou<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2017-01-19 5:27 GMT+08:00 Graeme Foot <span dir="ltr"><<a href="mailto:Graeme.Foot@touchcut.com" target="_blank">Graeme.Foot@touchcut.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_8988594303130456556divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif">
<div id="m_8988594303130456556divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>I can think of four possible errors at the moment:</p>
<p><br>
</p>
<p>1) Your ethercat configuration file isn't matching the correct MAC address.</p>
<p><br>
</p>
<p>In /etc/sysconfig/ethercat you have "<span>MASTER0_DEVICE="ff:ff:ff:ff:<wbr>ff:ff"".  ff:ff:ff:ff:ff:ff matches the first available device, looking at devices in the order the drivers are loaded (in the <span>DEVICE_MODULES key)</span>.  So you may have
 sepecified a MAC address that is not matching your device</span></p>
<p><span><br>
</span></p>
<p><span><br>
</span></p>
<p><span>2) You are not loading your device module.</span></p>
<p><span><br>
</span></p>
<p><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">In /etc/sysconfig/ethercat you have "</span><span>DEVICE_MODULES=".  This specifies the network driver modules (ethercat versions) that you want to run (space delimited list). 
 You should put your module first in the list if you use a generic MAC address (ie: <span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">ff:ff:ff:ff:ff:ff) in the setting above.</span></span><br>
</span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">eg: </span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><span>DEVICE_MODULES="cpsw e1000 e1000e"</span><br>
</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">3) Your driver doesn't work.</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">Check dmesg for any errors.</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">4) Your driver is not correctly integrating with the EtherCAT master.</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">There's various functions that your driver needs to interact with the master.  But from memory the one that tells the master that a device is available is:</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">ecdev_offer();</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">But the guts of it is that no offered net devices match the requirements of the MASTER0_DEVICE config setting.</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">I wrote a patch for the CX2100 device a while ago.  You could look it up in the forums to check how it interacts with the master (or I could send it if you can't find
 it).  Look for the ecdev_... methods and the notes about the skb's.</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">Regards,</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">Graeme.</span></span></span></p>
<p><span><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></span></p>
<p><span><br>
</span></p>
<p><span><br>
</span></p>
<p><span><br>
</span></p>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_8988594303130456556divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> etherlab-dev <<a href="mailto:etherlab-dev-bounces@etherlab.org" target="_blank">etherlab-dev-bounces@<wbr>etherlab.org</a>>
 on behalf of $B<~JcpC(B <<a href="mailto:erixchou@mapacode.tw" target="_blank">erixchou@mapacode.tw</a>><br>
<b>Sent:</b> Wednesday, 18 January 2017 9:26:42 PM<br>
<b>To:</b> <a href="mailto:etherlab-dev@etherlab.org" target="_blank">etherlab-dev@etherlab.org</a><br>
<b>Subject:</b> [etherlab-dev] "Master still waiting for devices!" problem.</font>
<div> </div>
</div>
<div>
<div class="h5">
<div>
<div dir="ltr">Hi all,<br>
<br>
First appreciate the implement of etherlabmaster.<br>
I'm devolping a non-native supported ethernet device to be able to work as a RTDM EtherCAT master.<br>
What the device is one part of TI AM335x SoC and is named "cpsw".<br>
Everything smoothly while adapting driver code, building module file, and installing.<br>
But I was stuck by a problem when I try to start EtherCAT master.<br>
Following is my steps and message shown by dmesg:<br>
<br>
# /etc/init.d/ethercat start<br>
Starting EtherCAT master 1.5.2  done<br>
<br>
[   30.849754] EtherCAT: Requesting master 0...<br>
[   30.854265] EtherCAT ERROR 0: Master still waiting for devices!<br>
<br>
More information:<br>
<br>
# /opt/etherlab/bin/ethercat master<br>
Master0<br>
  Phase: Waiting for device(s)...<br>
  Active: no<br>
  Slaves: 0<br>
  Ethernet devices:<br>
    Main: a0:f6:fd:22:bd:ed (waiting...)<br>
      Link: DOWN<br>
      Tx frames:   0<br>
      Tx bytes:    0<br>
      Rx frames:   0<br>
      Rx bytes:    0<br>
      Tx errors:   0<br>
      Tx frame rate [1/s]:      0      0      0<br>
      Tx rate [KByte/s]:      0.0    0.0    0.0<br>
      Rx frame rate [1/s]:      0      0      0<br>
      Rx rate [KByte/s]:      0.0    0.0    0.0<br>
    Common:<br>
      Tx frames:   0<br>
      Tx bytes:    0<br>
      Rx frames:   0<br>
      Rx bytes:    0<br>
      Lost frames: 0<br>
      Tx frame rate [1/s]:      0      0      0<br>
      Tx rate [KByte/s]:      0.0    0.0    0.0<br>
      Rx frame rate [1/s]: -509579 -509608 -335544<br>
      Rx rate [KByte/s]:   845836.0 -469824.0 163840.0<br>
      Loss rate [1/s]:          0      0      0<br>
      Frame loss [%]:         0.0    0.0    0.0<br>
  Distributed clocks:<br>
    Reference clock: None<br>
    Application time: 0<br>
                      2000-01-01 00:00:00.000000000<br>
<br>
<br>
<br>
Could anyone kindly advice what is the key point to go forword form "waiting device"?<br>
<br>
Best regards - Erix Chou<br>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div style="font-family:arial;font-size:small">
<div>$BF0Dx2J5;M-8B8x;J(B</div>
<div>$BBfFn;T0BJ?R?7zJ?==<739(B159$BiK<7\lG70l(B<br>
</div>
<div>$B<~JcpC(B Erix Chou</div>
<div>E-mail$B!'(B<a href="mailto:erixchou@mapacode.tw" style="color:rgb(17,85,204)" target="_blank">erixchou@mapacode.tw</a></div>
<div>TEL$B!'(B06-2970665</div>
<div>Mobile$B!'(B0985946776</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>