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++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

lwip raw api -> tcp_connect

Altera_Forum
Honored Contributor II
1,276 Views

hi,  

 

I use the standalone lwip example from the download area here, it works fine with the webserver example. Now i am writing my own application and i need to do an active open (tcp_connect) to a server. 

When my application sends the "SYN" flag, the Server answeres very fast with "SYN ACK" flag (thats normal)  

 

-> now my application needs exactly 2,5 seconds to answere with a "ACK" flag and i don' know why it takes soooooo long. i i can't find the error. 

 

Heres my code : 

 

 

void test_init(void) 

 

struct ip_addr ipa; 

struct tcp_pcb *pcb2; 

u16_t port; 

err_t error; 

 

port = 21; 

IP4_ADDR( &ipa, 192, 168, 1, 50 ); 

pcb2 = tcp_new(); 

tcp_bind(pcb2, IP_ADDR_ANY, 1362); 

 

 

error = tcp_connect(pcb2,&ipa,port,ftp_connect);  

 

 

P.S. i didn't changed the lwip_web_server.c . i just replaced the httpd_init() call with the test_init() call 

 

 

Thx for your help
0 Kudos
0 Replies
Reply