Thanks a lot for your explication.
The data which i transfered to pppInProc was identical to the data sent
by the modem.
The problem was coming from the new thread pppMain in the function:
pppOverSerialOpen()
==> sys_thread_new(PPP_THREAD_NAME, pppMain, (void*)pd,
PPP_THREAD_STACKSIZE, PPP_THREAD_PRIO);
pd=0 when i call this function. But when i am in pppMain(void *arg) :
(void *arg) is NOT equal to 0.
So, i didn't use the right "ppp interface control block" and i haven't
access to the right "inACCM[15]=0x60".
I verify it by adding line "pd=0" in pppMain, and pppInProc accept the
ppp packet.
Is it possible there is a bug in the creation of task with passing
argument in FreeRTOS? ... I don't know but it's dangerous.
Nicolas Dioli
Le 30/03/2010 03:30, David Empson a écrit :
"Nicolas
Dioli" <address@hidden> wrote:
Hello, i am using lwip 1.3.2 + PPP with
FreeRTOS.
I have a question about pppInProc.
When i receive a ppp packet which start by 0x7E, when the function is
testing the fcs: he found an invalid fcs and drop the packet.
I don't understand why ( i have already read rfc but i'm lost).
perhaps, the packet is wrong: my sio_read return only the packet
between 2 flags 0x7E.
Is the FCS error happening on the first PPP frame received, or after a
few frames have been received?
In order to determine what is going wrong, you probably need to look at
the raw data as received at your serial port, and compare it to the
data delivered to pppInProc. The bytes from the opening 0x7E to the
closing 0x7E must be identical (and you must deliver the 0x7E bytes to
pppInProc). If there is any difference in the receive data (including
insertion, deletion, transformation or reordering of bytes) then have a
close look at your serial driver.
If the received data and data delivered to pppInProc are identical, and
you are still getting an FCS error, then either the FCS calculation has
a bug (seems unlikely), or your modem is not delivering the same data
that the transmitting PPP device sent. In this case you probably need
to know exactly what data was transmitted to be able to get an idea
about what happened to it.
An didn't return "CONNECT 115200" from the
modem GPRS.
That doesn't matter. It isn't part of PPP and would be ignored by
pppInProc if it was received before the first PPP frame.
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users
Ce message entrant est certifié sans virus connu.
Analyse effectuée par AVG - www.avg.fr
Version: 9.0.791 / Base de données virale: 271.1.1/2777 - Date: 03/29/10 08:32:00
--
Nicolas Dioli
Etudiant ingénieur
AXUN SAS
Tél : +33 (0)6 78 18 53 12
|