This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: LWIP-PPP and GPRS
- From: Sebastian Block <SebastianBlock at gmx dot net>
- To: Кондратенко Антон Александров <kondratenko at tecon dot ru>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Mon, 20 Dec 2004 11:55:03 +0100
- Subject: Re: [ECOS] LWIP-PPP and GPRS
- References: <C140E1FA25E4904BB0E9A42338B62F8C226DAE@mail.teconpc.local>
> I have GPRS via LWIP working OK, but after really many changes in
> original lwip code.
> For example how do you think ppp_sio_read, determines the end of incoming
> packet ? ( if there's no hw flow control )
>
> I have to do this:
>
> int ppp_sio_read(void *fd, char *buf, int len)
> {
> int recvd=0;
> u8_t state=0;
> while(1){
> signed int res;
> res = (signed int)sio_recv(fd);
> if(res==(-1)) return -1;
> buf[recvd]=res;
> recvd++;
> if(res==0x7E && state==0) state=1;
> if(res==0x7E && state==1) return recvd;
> if(recvd>=len) return recvd;
> }
> return -1;
> }
There is already a port of lwip in the ecos-cvs-version.
And I thought it gets an end of an package throught software flow control.
It use non-blocking reading of the cyg_io_read and -write-function.
And the process gets auth-packages and if going to the next step (ICIP) it
just hang, while waiting (or sending) a ICIP-package (Stage 6).
Thank you your try.
Did you change something on the ppp implementation of lwip, too !?
Regards
Sebastian
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss