Hi, I'm using the code supplied by freescale for using the Ethernet interface on the MCF52235. I've ported the OpenTCP stack from the MC9S12NE64 to the MCF52235 and it work fine except for one problem. When i use the eth_stub_send() function the message is always sent twice! But I'm sure the function is only called once. I noticed that a few other people on the forum had the same problem. Does anyone know what might be causing this?
TCP is an ack/nak protocol. Meaning that all packets must be acknowledged in a certain time. I'm sure all stacks have a setting for this timeout and perhaps if you are using any stack release by me (I will not advertise which company work for) these setting might be too small. (i have seen this too, but only on my home wireless)
Also try turning off encryption on your net (wep). This might also cause delayed responses and hence the second transmission.
I wish I had more time to investigate this, so pls try and post your findings.
Hi, thanks for your suggestions. But I have implemented the OpenTCP port on top of the MAC-layer code that freescale provides. And i put a breakpoint on eth_stub_send function (which is a MAC-layer function) and it only gets called once from the stack. But still the ethernet controller sends dual messages. So the problem must be at the MAC-layer.
Hi, apparently this problem occurs if you only have one send buffer in n-buf. If you increase the number two to ore more the problem goes away. This is also advisable for the receive buffer. I haven't tried this myself since though, so let me know how it goes.