Re: [lwip-users] LwIP and ISR

2018-06-04 Thread Sergio R. Caprile
Well, that is usually a "don't!". However, if you actually do know what you are doing and properly handle the blocking, I guess you might get away with that. I personally don't know how, wait for one of the top guys like Simon. However, I find it easier to run everything under the same context.

Re: [lwip-users] tcp_connection (no SYN packet on server side)

2018-06-04 Thread Sarp Daltaban
What if we are using FreeRTOS? I mean, what if NO_SYS = 0, we cannot call sys_check_timeouts(), what should we do then? 2018-06-04 15:59 GMT+03:00 Sergio R. Caprile : > No need to bind(), you are a client, you connect(). > What is the value returned by tcp_connect() ? It should be ERR_OK > What

Re: [lwip-users] tcp_connection (no SYN packet on server side)

2018-06-04 Thread Sergio R. Caprile
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

Re: [lwip-users] tcp_connection (no SYN packet on server side)

2018-06-04 Thread Sergio R. Caprile
That may or may not work depending on what your _magic function_ "delay_ms" does. If it is blocking, you are busted. A main loop is a main loop, you need to rx and you need to check timeouts. Your accept callback will be called after the SYN is SYNACKed and the SYNACK is ACKed back. For that, you

Re: [lwip-users] tcp_connection (no SYN packet on server side)

2018-06-04 Thread Inderjit Singh
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

Re: [lwip-users] tcp_connection (no SYN packet on server side)

2018-06-04 Thread Sarp Daltaban
Do not delay, or make it lower as 3-5 ms. 2018-06-04 16:50 GMT+03:00 Inderjit Singh : > 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

Re: [lwip-users] tcp_connection (no SYN packet on server side)

2018-06-04 Thread Sergio R. Caprile
OK, so it seems you are correctly calling lwIP in the loop, and your networking parameters look good. However, I failed to ask how do you setup your netif. You don't tell. You should do something like this before actually calling tcp_connect(): IP4_ADDR(, 192,168,100,1); IP4_ADDR(,

Re: [lwip-users] tcp_connection (no SYN packet on server side)

2018-06-04 Thread Inderjit Singh
delay_ms is used throughout our bare metal implementation I can guarantee it's not blocking. tcp_cb_called is called to the registered callback function yes. And sure, main loop as you suggest is functional as well yes. However I fail see why LWIP layer marks SYN_SENT state in pcb but I cannot

Re: [lwip-users] tcp_connection (no SYN packet on server side)

2018-06-04 Thread Inderjit Singh
OK. i'll try that. .. 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: