Hello i am a new user of lwIP. I am using lwIP-1.2 and porting to AVR
ATMega64. Everything is works well when i compiled the example (http
server). But when I am starting to make a clien application using lwIP a
problem occured. I can not connect the server but when I checked the
response everything is fine (tcp_new,tcp_bind,tcp_connect) . I also have
checked using Ethereal but there is no data to be sent and tes function is
never been called. here is my source code. is there I miss somethong or
something wrong in my code ?
err_t tes(void *arg, struct tcp_pcb *newpcb, err_t err)
{
puts("OK\r\n");
}
void ClientInit(void)
{
struct tcp_pcb* tcp_pcb_connect;
IP4_ADDR(&server_ipaddr_data, 192, 168, 0, 1);
tcp_pcb_connect = tcp_new();
if (tcp_pcb_connect!=NULL)
{
if (tcp_bind(tcp_pcb_connect, IP_ADDR_ANY, 7500)==ERR_OK)
{
if (tcp_connect(tcp_pcb_connect, &server_ipaddr_data, 7500,
tes)==ERR_OK)
puts("CONNECT\r\n");
else puts("CAN'T CONNECT\r\n");
}
else puts("CAN'T BIND\r\n");
}
else puts("CAN'T ALLOCATE\r\n");
}
thank you for your information.
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users