Hi,
I'm using lwIP 1.4.0 on a bare metal AM3358 platform. So for lwIP there is
no system (NO_SYS is set) and there are no timers (LWIP_TIMERS is not set),
this is summarised by NO_SYS_NO_TIMERS being set.
On that system a server-implementation is working fine, means clients can
connect to that server and are working properly, which itself means
tcp_accept(), tcp_recv(), tcp_sent() and related callbacks are working like
a charm. Due to the missing timers, transmission of data is actively pushed
by calling tcp_output().
Now I tried to establish an outgoing connection from that system with the
following code:
client_pcb0 = tcp_new();
if (client_pcb0 != NULL)
{
client_pcb0->so_options |= SOF_KEEPALIVE;
client_pcb0->keep_idle = 20000; // this is possibly without any
effect due to the missing timers
client_pcb0->keep_intvl = 4000;
client_pcb0->keep_cnt = 4;
tcp_arg(client_pcb0, NULL);
tcp_recv(client_pcb0, tcp_recv0_callback);
tcp_err(client_pcb0, tcp_recv0_err);
const err_t err=tcp_connect(client_pcb0,
&globalConfig.node0,23,NULL);
if (err!=ERR_OK)
close_pcb(&client_pcb0, &connected0);
else
tcp_output(client_pcb0);
Unfortunately this does not work. On the server side I can't see any
connection attempt (not an incoming connection on the server and not even a
connection attempt on TCP-level) and when I check the connection state with
if (client_pcb0->state==ESTABLISHED)
connected0=1;
I can see that client_pcb0->state never leaves the state SYN_SENT. So I
guess, there is something missing here which lets lwIP really open the
connection (means some active polling call such as tcp_output() which is
there for testing purposes but did not work either).
So...any ideas what could be wrong/missing here?
Thanks!
--
Kind regards
Marc van der Meer
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users