I have made the driver for enc28j60 for LPC1788 and I'm trying to send UDP message to LPC via wifi enabled device (iOS, windows over wifi). But transmission fails. Wifi device sends the ARP request. LPC sends the response, but it doesn't arrive. I have checked the ARP cache on windows machine and it stayed empty. When I do the same with cable connected machine, it arrives correctly, ARP cache is populated. That concludes that ARP response is sent and it is correctly built.
I have tried ping as well and same thing, every device that comes via router failed to get ARP response, but devices that are connected by cable receives the ARP response.
But, same enc28 board is working fine with Arduino. Arduino implementation of driver and ethernet was not done by me.
That means that it is somehow related to the driver. I have either forgot to switch some option of enc28 chip or ...
I have looked at Arduino driver but I could not find any obvious error in my implementation.
Any idea what could be wrong?
UPDATE:
I now have Wifi router with tcpdump installed on it. I have run it and sniff the packets from Wifi to Arduino (everything is fine there. ARP request, ARP response and Ping echo/reply can be seen in trace). When i start Wifi to LPC i only see ARP requests. Although it says that few packets are received by the filter, but i cant see those packets in dump file. Is there any option on tcpdump to see raw data ?
What I can see when use tcpdump with "-i any" option, is my lost arp response. But it looks fine to me.
ARDUINO
ARP Request
0004 0001 0006 d89e 3f87 3ad5 0000 0806
0001 0800 0604 0001 d89e 3f87 3ad5 c0a8
0564 7069 692d 3031 c0a8 0508
ARP Response
0003 0001 0006 7069 692d 3031 0000 0806
0001 0800 0604 0002 7069 692d 3031 c0a8
0508 d89e 3f87 3ad5 c0a8 0564 0000 0000
0000 0000 0000 0000 0000 0000 0000
LPC
ARP Request
0001 0001 0006 d89e 3f87 3ad5 0000 0806
0001 0800 0604 0001 d89e 3f87 3ad5 c0a8
0564 0000 0000 0000 c0a8 0507
ARP Response
0003 0001 0006 891d dc9f da6e 0000 0806
0001 0800 0604 0002 891d dc9f da6e c0a8
0507 d89e 3f87 3ad5 c0a8 0564 0000 0000
0000 0000 0000 0000 0000 0000 0000
I dont see any differences in the response from LPC (which doesnt work) and one from Arduino (which works).