Sorry, you need to enable JavaScript to visit this website.

TCP Client application using LWIP raw API

Unsolved
2 posts / 0 new
Darpandamani93's picture
Darpandamani93
Junior(0)
TCP Client application using LWIP raw API

Hello,
I am trying to develop a TCP Client application on zedboard using lwip raw api.
I have read XAPP1026 document, and I am able to succesfully test the TCP echo server example.
But my TCP Client code application is not working, I sm monitoring the packets on wireshark on my host computer, but zedboard doesnt initiate or send SYN packet.
Can anyone suggest me where I am going wrong
Thanks
Code:

struct tcp_pcb *pcb;

pcb = tcp_new();

 

tcp_bind(pcb, IP_ADDR_ANY, 20000);

xil_printf("Bind error: %d", err);

 

struct tcp_pcb *tpcb;

tpcb = tcp_new();

struct ip_addr ipaddr;

IP4_ADDR(&ipaddr, 192, 168,   1, 10);

tcp_connect(tpcb, &ipaddr, 20000, txperf_connected_callback);

xil_printf("connect error: %d", err);

xemacif_input(netif);

tcp_write(tpcb, databuffer, 4,TCP_WRITE_FLAG_COPY);

tcp_output(tpcb);

JFoster's picture
JFoster
Moderator(48)
Hello Darpandamani93,

Hello Darpandamani93,

Please ask your question over at Digilent as they are the main point of contact for educational support.

https://forum.digilentinc.com/

Thank you,

Josh