This is the mail archive of the ecos-bugs@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1000717] lwIP TCP/IP drops incoming IP packets on SLIPinterface


http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000717





--- Comment #3 from Sergei Gavrikov <sergei.gavrikov@gmail.com>  2009-03-14 14:31:30 ---
Created an attachment (id=674)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=674)
To up lwIP SLIP on eCos serial device are configured for a non-blocking mode

I forgot to mention that lwip's ecos/sio.c is broken. It open a serial device
in non-blocking mode. Well, it's a good idea. But, unfortunately, sio_write(),
sio_read(), sio_send() and sio_recv() are implemented to work in the blocking
mode only. U.T.S.L. All functions do not care about EAGAIN. All routines are
just the producers of a garbage. SLIP interface does not/will not work.

I tweaked those sio functions to make them work in the non-blocking mode (see a
patch).

I tested SLIP on Ubuntu with olpce2294 using 'slattach' at 115200 bps. eCos
tests: 'tcpecho' and 'httpd' are built using 'lwip_template' work smoothly over
serial interface. I not used RTSCTS flow control (stty -crtscts ...).

The below is just a demo from GNU screen session ('echo' and 'pinging' are
invoked simultaneously at sl0).

~$ while [ 1 ];do echo `date +%s`|socat - tcp4:192.168.1.222:7;sleep 1;done
1237039723
1237039724
1237039725
1237039726
1237039727
1237039728
1237039729
----------------------------------------------------------
~$ ping -A 192.168.1.222
PING 192.168.1.222 (192.168.1.222) 56(84) bytes of data.
64 bytes from 192.168.1.222: icmp_seq=1 ttl=64 time=68.6 ms
64 bytes from 192.168.1.222: icmp_seq=2 ttl=64 time=35.9 ms
64 bytes from 192.168.1.222: icmp_seq=3 ttl=64 time=35.9 ms
64 bytes from 192.168.1.222: icmp_seq=4 ttl=64 time=39.9 ms
64 bytes from 192.168.1.222: icmp_seq=5 ttl=64 time=35.9 ms
64 bytes from 192.168.1.222: icmp_seq=6 ttl=64 time=35.9 ms

Sergei


-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]