[ECOS] LWIP-PPP and GPRS
Sebastian Block
SebastianBlock@gmx.net
Mon Dec 20 10:55:00 GMT 2004
> 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
More information about the Ecos-discuss
mailing list