<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>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: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%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> etherlab-dev <etherlab-dev-bounces@etherlab.org> on behalf of $B<~JcpC(B <erixchou@mapacode.tw><br>
<b>Sent:</b> Wednesday, 18 January 2017 9:26:42 PM<br>
<b>To:</b> etherlab-dev@etherlab.org<br>
<b>Subject:</b> [etherlab-dev] "Master still waiting for devices!" problem.</font>
<div> </div>
</div>
<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>
</body>
</html>