This:<div><br></div><div>[snip]</div><div>not clear why you have all three ec_xxx drivers reported in the log<br>Which one is defined in /etc/sysconfig/ethercat?</div><div>[/snip]</div><div><br></div><div>Appears to have solved the problem. I knocked it down to just generic, and I'm communicating. It's slow, which is to be expected, but working. It's for simple ASCII text, so speed shouldn't be too much of a factor.</div>
<div><br></div><div>Currently, to get the connection up and running, I have to do the following:</div><div><br></div><div><div># ifconfig eoe0s7 192.168.127.10</div># ifconfig eoe0s7 up<br></div><div><br></div><div>Is there any way to make this happen automatically on startup? In /etc/network, I created a file called ifcg-eoe0s7 and put in:</div>
<div><br></div><div><div>IPADDRESS=<a href="http://192.168.127.10/24">192.168.127.10/24</a></div><div>STARTMODE=auto</div></div><div><br></div><div>But it must not be working because the virtual interface doesn't even have an IP Address until I give it one manually.</div>
<div><br></div><div>Thanks!<br></div><div><br></div><div><br></div><div><div class="gmail_quote">On Wed, Aug 15, 2012 at 12:02 PM, Matthieu Bec <span dir="ltr"><<a href="mailto:mbec@gmto.org" target="_blank">mbec@gmto.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 08/15/12 09:33, Thomas Bitsky, Jr. wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
First, Matt, thanks for your responses.<br>
<br>
Matt, is this the version you are running?<br>
# ethercat version<br>
IgH EtherCAT master 1.5.1 35223d2e6e72<br>
<br>
<br>
So, Matt's solution didn't work for me. I took out the callbacks from my<br>
program and ran it. The network went into operation.<br>
<br>
Then I did:<br>
# ifconfig eoe0s7 up<br>
# ifconfig eoe0s7 192.168.127.10<br>
</blockquote>
<br>
check your netmask? it should match the one of your device. \8 is kind of unusual, probably not default<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That brought the interface up and gave it the IP Address 192.168.127.10<br>
successfully. I pinged that interface, and got a response.<br>
<br>
Then, I tried to ping 192.168.127.254, which is the device that it's<br>
attached to.<br>
<br>
# ping 192.168.127.254<br>
PING 192.168.127.254 (192.168.127.254) 56(84) bytes of data.<br>
From 192.168.127.10 icmp_seq=1 Destination Host Unreachable<br>
<br>
The error log is going crazy with these messages. I think it must be the<br>
problem:<br>
<br>
[ 2687.384659]<br>
[ 2687.384665] Pid: 0, comm: swapper Tainted: P W<br>
(2.6.32-42-generic-pae #95-Ubuntu) Latitude E6510<br>
[ 2687.384672] EIP: 0060:[<c03ac336>] EFLAGS: 00000202 CPU: 3<br>
[ 2687.384680] EIP is at acpi_idle_enter_bm+0x275/0x2a4<br>
[ 2687.384684] EAX: c088eb4c EBX: 00000ee7 ECX: 00000000 EDX: 03036000<br>
[ 2687.384689] ESI: 00000000 EDI: f6e404cc EBP: f74cbf78 ESP: f74cbf50<br>
[ 2687.384694] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068<br>
[ 2687.384698] CR0: 8005003b CR2: b94c0004 CR3: 00799000 CR4: 000006f0<br>
[ 2687.384703] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000<br>
[ 2687.384707] DR6: ffff0ff0 DR7: 00000400<br>
[ 2687.384710] Call Trace:<br>
[ 2687.384719] [<c04ca54a>] cpuidle_idle_call+0x7a/0x100<br>
[ 2687.384727] [<c01085a4>] cpu_idle+0x94/0xd0<br>
[ 2687.384735] [<c05b31b7>] start_secondary+0xc4/0xc6<br>
[ 2687.393250] BUG: scheduling while atomic: swapper/0/0x10000100<br>
[ 2687.393256] Modules linked in: durability ec_generic ec_e1000<br>
ec_8139too ec_master mii michael_mic arc4 binfmt_misc snd_hda_codec_idt<br>
</blockquote>
<br>
<br>
not clear why you have all three ec_xxx drivers reported in the log<br>
Which one is defined in /etc/sysconfig/ethercat?<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
snd_hda_intel snd_pcm_oss snd_hda_codec snd_hwdep snd_mixer_oss snd_pcm<br>
snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event<br>
pcmcia dell_wmi snd_seq fbcon tileblit font snd_timer uvcvideo nvidia(P)<br>
sdhci_pci yenta_socket rsrc_nonstatic bitblit psmouse dell_laptop sdhci<br>
videodev agpgart v4l1_compat ppdev snd_seq_device softcursor pcmcia_core<br>
lib80211_crypt_tkip snd led_class dcdbas serio_raw soundcore<br>
snd_page_alloc vga16fb vgastate wl(P) lib80211 parport_pc video output<br>
lp parport ses enclosure usbhid usb_storage hid ohci1394 ahci ieee1394<br>
e1000e [last unloaded: e1000]<br>
<br>
<br>
These messages only appear when I activate the EoE interface. Please<br>
note that I am not doing any locking in my program at this time.<br>
<br>
Thanks in advance for any help.<br>
<br>
Thanks!<br>
Tom<br>
<br>
On Wed, Aug 15, 2012 at 10:26 AM, Matthieu Bec <<a href="mailto:mbec@gmto.org" target="_blank">mbec@gmto.org</a><br>
<mailto:<a href="mailto:mbec@gmto.org" target="_blank">mbec@gmto.org</a>>> wrote:<br>
<br>
note that's using the master stack only.<br>
<br>
I don't use the EtherLAB suite. There could be an issue if it<br>
requests the master and its internal loop doesn't "send_ext".<br>
Actually ecrt_master_send_ext isn't exported by cdev so that could<br>
indeed be a problem.<br>
Can you try starting the master only?<br>
<br>
On 08/15/12 07:48, Matthieu Bec wrote:<br>
<br>
I have an EL6614, besides starting the master (stable-1.5),<br>
configuring<br>
the network interface and bringing it up, nothing else is needed<br>
to get<br>
EOE connectivity.<br>
<br>
<br>
On 08/14/12 15:15, Thomas Bitsky, Jr. wrote:<br>
<br>
Ok, so I made some progress, I think. I was able to build as<br>
a kernel<br>
module and install the module. So long as the virtual<br>
interface (eoe0s7)<br>
is not up, the program brings the network into Operation and<br>
scans at<br>
100Hz.<br>
<br>
Then, I issue # ifconfig eoe0s7 up<br>
<br>
About 20 seconds later, the entire system hangs and I need<br>
to reboot.<br>
<br>
In the kernel log, I am seeing this: BUG: scheduling while<br>
atomic:<br>
swapper/0/0x10000100<br>
<br>
My understanding is that occurred when using semaphores when<br>
spinlocks<br>
should have been used in the master callbacks. I changed<br>
over the<br>
program to spin locks, but the same thing occurred.<br>
<br>
I'm not sure what I could try other than falling back to<br>
1.4.0 and<br>
seeing if I'm just running into a stable-1.5 bug. I'm<br>
following the tty<br>
examples in the directory very closely. Beyond changing the<br>
hardware<br>
declarations to match the network, it's the same program.<br>
<br>
Does anyone have an EoE example they could share?<br>
<br>
Thanks!<br>
T<br>
<br>
<br>
On Tue, Aug 14, 2012 at 7:29 AM, Matthieu Bec <<a href="mailto:mbec@gmto.org" target="_blank">mbec@gmto.org</a><br>
<mailto:<a href="mailto:mbec@gmto.org" target="_blank">mbec@gmto.org</a>><br>
<mailto:<a href="mailto:mbec@gmto.org" target="_blank">mbec@gmto.org</a> <mailto:<a href="mailto:mbec@gmto.org" target="_blank">mbec@gmto.org</a>>>> wrote:<br>
<br>
<br>
Hello Thomas,<br>
<br>
it might be a simple network config problem: the IP<br>
address of your<br>
virtual interface shouldn't be the same as your field<br>
device. Try<br>
assigning it something different on the same subnet, e.g.<br>
<a href="http://192.168.127.1/8" target="_blank">192.168.127.1/8</a> <<a href="http://192.168.127.1/8" target="_blank">http://192.168.127.1/8</a>><br>
<<a href="http://192.168.127.1/8" target="_blank">http://192.168.127.1/8</a>> and check your routing<br>
table is correct<br>
<br>
Regards<br>
<br>
On 08/13/12 22:21, Thomas Bitsky, Jr. wrote:<br>
<br>
Hello! I'm new to using EtherLAB. I've got the master<br>
installed as a<br>
service, and it's communicating to the network<br>
fine. However,<br>
I'm having<br>
trouble getting the EoE feature up and running.<br>
<br>
I have an Ethernet device in the field with the IP<br>
Address<br>
192.168.127.254 that I need to communicate with<br>
through a web<br>
browser. I<br>
have an EL6601 that the master is able to see fine.<br>
When I put<br>
the<br>
network into Operation, the RUN light goes steady.<br>
<br>
I'm running on Ubuntu 10.04. I have not installed<br>
any real-time<br>
extensions; I'm just working with EtherLAB right now.<br>
<br>
If I execute:<br>
# ethercat eoe<br>
<br>
I get a listing for eoe0s7 as a virtual interface,<br>
and that it<br>
is down.<br>
<br>
<br>
So, I created in /etc/network the file ifcg-eoe0s7<br>
with the<br>
following<br>
contents:<br>
<br>
IPADDRESS=<a href="http://192.168.127.254/8" target="_blank">192.168.127.254/8</a><br>
<<a href="http://192.168.127.254/8" target="_blank">http://192.168.127.254/8</a>> <<a href="http://192.168.127.254/8" target="_blank">http://192.168.127.254/8</a>><br>
<<a href="http://192.168.127.254/8" target="_blank">http://192.168.127.254/8</a>><br>
STARTMODE=auto<br>
<br>
I restarted the computer.<br>
<br>
To raise the interface, I enter:<br>
<br>
# ifconfig eoe0s7 up<br>
<br>
The virtual interface goes up, and the LINK light<br>
on the<br>
EL6601 goes<br>
solid green.<br>
<br>
However, I'm unable to ping 192.168.127.254, or get<br>
the pages it<br>
serves<br>
to pop up. So, I did more reading, and I think I<br>
need to do some<br>
function calls in the program. So, I added to my<br>
test program:<br>
<br>
<br>
void send_callback(void *cb_data)<br>
{<br>
ec_master_t *m = (ec_master_t *) cb_data;<br>
sem_wait(&mutex);<br>
ecrt_master_send_ext(m);<br>
sem_post(&mutex);<br>
}<br>
<br>
<br>
/*****************************<u></u>____**************************<u></u>**__**__******************/<br>
<br>
<br>
void receive_callback(void *cb_data)<br>
{<br>
ec_master_t *m = (ec_master_t *) cb_data;<br>
sem_wait(&mutex);<br>
ecrt_master_receive(m);<br>
sem_post(&mutex);<br>
}<br>
<br>
int<br>
main(int argc, char **argv)<br>
{<br>
<br>
...<br>
<br>
// setup callbacks for EoE<br>
ecrt_master_callbacks(master, send_callback,<br>
receive_callback, master);<br>
<br>
...<br>
<br>
}<br>
<br>
<br>
<br>
However, it won't build:<br>
<br>
durability.o: In function `send_callback':<br>
<br>
/home/tbj/srcroot/durability/_<u></u>___src/durability.c:279: undefined<br>
reference<br>
to `ecrt_master_send_ext'<br>
durability.o: In function `main':<br>
<br>
/home/tbj/srcroot/durability/_<u></u>___src/durability.c:321: undefined<br>
reference<br>
to `ecrt_master_callbacks'<br>
<br>
<br>
This is my makefile:<br>
<br>
CC = gcc<br>
ETHERCAT_TOPDIR = /home/tbj/srcroot/ethercat<br>
CFLAGS = -I$(ETHERCAT_TOPDIR)/include -g -O2<br>
LDFLAGS = -L$(ETHERCAT_TOPDIR)/lib/.libs -lethercat<br>
-lrt<br>
<br>
OBJECTS = durability.o<br>
<br>
durability.exe : $(OBJECTS)<br>
$(CC) $(CFLAGS) $(OBJECTS) $(LDFLAGS) -o durability.exe<br>
<br>
%.o : %.c<br>
$(CC) $(CFLAGS) -c $<<br>
<br>
<br>
Can anyone tell me what I'm missing? I feel like<br>
I'm one step<br>
away from<br>
having this working, but I can't find anything else<br>
in any<br>
documentation<br>
that would lead me to the answer.<br>
<br>
Thanks in advance for any help.<br>
<br>
T<br>
<br>
<br>
______________________________<u></u>_____________________<br>
etherlab-users mailing list<br>
<a href="mailto:etherlab-users@etherlab.org" target="_blank">etherlab-users@etherlab.org</a><br>
<mailto:<a href="mailto:etherlab-users@etherlab.org" target="_blank">etherlab-users@<u></u>etherlab.org</a>><br>
<mailto:<a href="mailto:etherlab-users@" target="_blank">etherlab-users@</a>__<a href="http://etherlab.org" target="_blank">ether<u></u>lab.org</a><br>
<mailto:<a href="mailto:etherlab-users@etherlab.org" target="_blank">etherlab-users@<u></u>etherlab.org</a>>><br>
<a href="http://lists.etherlab.org/____mailman/listinfo/etherlab-____users" target="_blank">http://lists.etherlab.org/____<u></u>mailman/listinfo/etherlab-____<u></u>users</a><br>
<<a href="http://lists.etherlab.org/__mailman/listinfo/etherlab-__users" target="_blank">http://lists.etherlab.org/__<u></u>mailman/listinfo/etherlab-__<u></u>users</a>><br>
<br>
<<a href="http://lists.etherlab.org/__mailman/listinfo/etherlab-__users" target="_blank">http://lists.etherlab.org/__<u></u>mailman/listinfo/etherlab-__<u></u>users</a><br>
<<a href="http://lists.etherlab.org/mailman/listinfo/etherlab-users" target="_blank">http://lists.etherlab.org/<u></u>mailman/listinfo/etherlab-<u></u>users</a>>><br>
<br>
<br>
<br>
--<br>
Matthieu Bec GMTO Corp.<br>
cell: <a href="tel:%2B1%20626%20354%209367" value="+16263549367" target="_blank">+1 626 354 9367</a> <tel:%2B1%20626%20354%209367><br>
<tel:%2B1%20626%20354%209367> P.O. Box<br>
90933<br>
phone: <a href="tel:%2B1%20626%20204%200527" value="+16262040527" target="_blank">+1 626 204 0527</a> <tel:%2B1%20626%20204%200527><br>
<tel:%2B1%20626%20204%200527> Pasadena,<br>
CA 91109-0933<br>
<br>
<br>
<br>
<br>
--<br>
Thomas C. Bitsky Jr.<br>
Lead Developer and Application Engineer<br>
ADC | <a href="http://automateddesign.com" target="_blank">automateddesign.com</a> <<a href="http://automateddesign.com" target="_blank">http://automateddesign.com</a>><br>
<<a href="http://automateddesign.com" target="_blank">http://automateddesign.com</a>><br>
P: <a href="tel:630-783-1150" value="+16307831150" target="_blank">630-783-1150</a> <tel:<a href="tel:630-783-1150" value="+16307831150" target="_blank">630-783-1150</a>> F: <a href="tel:630-783-1159" value="+16307831159" target="_blank">630-783-1159</a><br>
<tel:<a href="tel:630-783-1159" value="+16307831159" target="_blank">630-783-1159</a>> M: <a href="tel:630-632-6679" value="+16306326679" target="_blank">630-632-6679</a> <tel:<a href="tel:630-632-6679" value="+16306326679" target="_blank">630-632-6679</a>><br>
<br>
______________________________<u></u>___________________<br>
etherlab-users mailing list<br>
<a href="mailto:etherlab-users@etherlab.org" target="_blank">etherlab-users@etherlab.org</a> <mailto:<a href="mailto:etherlab-users@etherlab.org" target="_blank">etherlab-users@<u></u>etherlab.org</a>><br>
<a href="http://lists.etherlab.org/__mailman/listinfo/etherlab-__users" target="_blank">http://lists.etherlab.org/__<u></u>mailman/listinfo/etherlab-__<u></u>users</a><br>
<<a href="http://lists.etherlab.org/mailman/listinfo/etherlab-users" target="_blank">http://lists.etherlab.org/<u></u>mailman/listinfo/etherlab-<u></u>users</a>><br>
<br>
<br>
<br>
--<br>
Matthieu Bec GMTO Corp.<br>
cell: <a href="tel:%2B1%20626%20354%209367" value="+16263549367" target="_blank">+1 626 354 9367</a> <tel:%2B1%20626%20354%209367> P.O. Box 90933<br>
phone: <a href="tel:%2B1%20626%20204%200527" value="+16262040527" target="_blank">+1 626 204 0527</a> <tel:%2B1%20626%20204%200527> Pasadena,<br>
CA 91109-0933<br>
<br>
<br>
<br><span class="HOEnZb"><font color="#888888">
<br>
--<br>
Thomas C. Bitsky Jr.<br>
Lead Developer and Application Engineer<br>
ADC | <a href="http://automateddesign.com" target="_blank">automateddesign.com</a> <<a href="http://automateddesign.com" target="_blank">http://automateddesign.com</a>><br>
P: <a href="tel:630-783-1150" value="+16307831150" target="_blank">630-783-1150</a> F: <a href="tel:630-783-1159" value="+16307831159" target="_blank">630-783-1159</a> M: <a href="tel:630-632-6679" value="+16306326679" target="_blank">630-632-6679</a><br>
<br>
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
-- <br>
Matthieu Bec GMTO Corp.<br>
cell: <a href="tel:%2B1%20626%20354%209367" value="+16263549367" target="_blank">+1 626 354 9367</a> P.O. Box 90933<br>
phone: <a href="tel:%2B1%20626%20204%200527" value="+16262040527" target="_blank">+1 626 204 0527</a> Pasadena, CA 91109-0933<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Thomas C. Bitsky Jr.<div>Lead Developer and Application Engineer</div><div><font color="#660000">ADC | <a href="http://automateddesign.com" target="_blank">automateddesign.com</a></font></div>
<div>P: 630-783-1150 F: 630-783-1159 M: 630-632-6679</div><br>
</div>