Do not delay, or make it lower as 3-5 ms.

2018-06-04 16:50 GMT+03:00 Inderjit Singh <inderjit.si...@evidente.se>:

> Hi Sergio, thanks for the reply!
>
> Bind I can remove, fair enough.
>
> IP addressing is client (this development side):
>    ip: 192.168.100.120
>    netmask: 255.255.255.0
>    gw: 192.168.100.1
>
> The server (raspberry pi without any implementation, just monitoring
> packets)
>    ip: 192.168.100.155
>    netmask: 255.255.255.0
>    gw: 192.168.100.1
>
> Setting goes trough without any error (I have put assert after every
> setting)
>
> The main loop is this:
>
> while (1) {
>
> udp_cb_called = tcp_cb_called = false;
>
> IP4_ADDR(&ip, ETH_CONF_IPADDR0, ETH_CONF_IPADDR1, ETH_CONF_IPADDR2, 155);
> err = tcp_connect(pcb_tcp, &ip, ETH_TCP_PORT_REM, tcp_connected_cb);
> if (err != 0) {
>     LWIP_ASSERT("err != 0", 0);
> }
>
> while(udp_cb_called == false && tcp_cb_called == false) {
>     ethernetif_input(&dev_netif);
>     sys_check_timeouts();
>     delay_ms(100);
> }
>
> }
>
> Once the callback is called, I set the flags to true to redo the connect.
> Note, this is just for testing not for any other purpose. Once I can see
> SYN packet then I know I can start implementing properly...
>
> ............................................................
> ..............................
> Inderjit Singh Senior Embedded Engineer, MSc
>
> Evidente ES East AB
> Warfvinges väg 34 SE-112 51 Stockholm Sweden
>
> Mobile: +46 (0)70 912 42 69
> E-mail: inderjit.si...@evidente.se
>
> www.evidente.se
>
> ________________________________________
> From: lwip-users [lwip-users-bounces+inderjit.singh=evidente...@nongnu.org]
> on behalf of Sergio R. Caprile [scapr...@gmail.com]
> Sent: 04 June 2018 14:59
> To: lwip-users@nongnu.org
> Subject: Re: [lwip-users] tcp_connection (no SYN packet on server side)
>
>
> No need to bind(), you are a client, you connect().
> What is the value returned by tcp_connect() ? It should be ERR_OK
> What do you do after that ? Do you properly call sys_check_timeouts() on
> the main loop or you just sit waiting things to magically happen ?
> TCP is a state machine, you just instructed it to start a several steps
> process.
>
> PS: I assume your IP addressing is fine...
>
>
> _______________________________________________
> lwip-users mailing list
> lwip-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/lwip-users
>
> _______________________________________________
> lwip-users mailing list
> lwip-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/lwip-users
>
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to