Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

stand-alone lwip ARP problem

Honored Contributor II

Dear all ! 


I have downloaded stand-alone lwip from our forum "Test IP" .My design is to build a simple udp-client that sending data to PC with stand-alone lwip .But this version seems too old (version 0.7.1,developped on 2005 ,now the lastest version is 1.3.0)I guess MAYBE there is a bug in ARP modle ,here is the problem i hit: 


If i run my application, it does not send any UDP packets ( see that in Ethereal ). 

However ,after runing anther application udp_echo (data send and return ) ,stop it and run my application ,my app runs very well .I 'm very confused ! 


So i guess MAYBE there is a bug in our stand-alone lwip .Here is my reason.  

when i run the UDP_ECHO app, PC send a udp packet to board ,so our board konw the IP address and MAC addess of PC ,and update it to ARP cache . Then run my app ,the app konws the destination host ' IP address and MAC addess (PC),so it works well. If i run my app only ,it does not konw the PC 's MAC addess , therefore it work fail.Though PC send gratuitous arps ,but the lwip can't update it to the ARP cache . 


Am i right ? And how to resolve it ?  

Is there someone work similar with me ? or could send a simple udp-client example (stand-alone lwip version) to me ! 

Thank you ! My MSN and my email is 

----------my app------------- 



P4_ADDR(&udpDestIpAddr, 10, 1 ,1, 52); 

p = pbuf_alloc(PBUF_TRANSPORT,sizeof(Test),PBUF_RAM); 

memcpy(p->payload, Test, sizeof(Test)); 

pcb = udp_new();  

udp_bind(pcb, IP_ADDR_ANY, 60000);  

udp_connect(pcb, &udpDestIpAddr, 60000);  










--------udp_echo app------------ 


void udp_echo_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *addr, u16_t port)  

{ struct ip_addr ipaddr; 


if (p != NULL) 



udp_send(pcb, p);  







void udp_echo_init(void)  


struct udp_pcb * pcb;  

pcb = udp_new();  

udp_bind(pcb, IP_ADDR_ANY, 60000) ; 

udp_recv(pcb, udp_echo_recv, NULL);  





Best regards  



0 Kudos
1 Reply


I too want to implement the lwip with DE2-115 FPGA , But I am facing difficulty in  spoc builder component connections.As I am new Altera I tried  with basic Ethernet design based on below link.

When I adding these component and additional peripheral as suggest in message , I unable connect these.

I am confuse what should  the component, its value and how to connect with others.Please guide little

0 Kudos