Re: [lwip-users] PPP CHAT failed

2018-04-12 Thread vinimac
Sylvain Rochet wrote
> As well, it seems your UART tx routine does not work properly, there are 
> way too much LCP retries, as if the remote end never get most packets.

I was thinking about what you said and makes sense. These are the LCP
ConfReq sent by Lwip
and the possible replies from PPP server:

/sent [LCP ConfReq id=0x1   
]
rcvd [LCP DiscReq id=0x12 magic=0xf68ac785]

sent [LCP ConfReq id=0x1]
rcvd [LCP DiscReq id=0x14 magic=0xf68adef1]

sent [LCP ConfReq id=0x1]
... no reply?

sent [LCP ConfReq id=0x1]
rcvd [LCP ConfAck id=0x1]
netif_set_mtu[0]: mtu=296

rcvd [LCP DiscReq id=0x1b magic=0xf68af65e]
(maybe reply from third LCP ConfReq)?/

Looks like the PPP server is receiving wrong bytes like id and magic number.
Because the reply does not match the request. I will check this carefully.



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


Re: [lwip-users] PPP CHAT failed

2018-04-12 Thread vinimac
Sylvain Rochet wrote
> It looks like there is an issue in your low level UART driver, there are 
> quite a lot of dropped frames due to bad FCS/ACCM drop, it can happen of 
> course from time to time, very unlikely though for a given try, and 
> never that much !
> 
> As well, it seems your UART tx routine does not work properly, there are 
> way too much LCP retries, as if the remote end never get most packets.
> 
> Sylvain

I really had a hard time calling pppos_input() or pppos_input_tcpip()
passing data byte after byte.
Every time I got bad FCS. So I had to handle the UART input and delivery
the whole PPP frame with 0xFE .. 0xFE to pppos_input. After that something
started to work. 

But that is really weird because the AT commands work very well, even with 
ECHO on. 

Log with UART TX
ppp_02.log   



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


Re: [lwip-users] PPP CHAT failed

2018-04-12 Thread Sylvain Rochet
Hi,

On Wed, Apr 11, 2018 at 06:23:47PM -0700, vinimac wrote:
> Hi,
> 
> I am using Lwip 2.0.3+FreeRTOS 10 and PPPoS with CHAP MD5 authentication.
> The PPP negociation proceeds until stop in CHAP Challenge/CHAP Response. I
> am using the same name/secret on Linux and works!
> 
> Log attached. 
> ppp.log   

It looks like there is an issue in your low level UART driver, there are 
quite a lot of dropped frames due to bad FCS/ACCM drop, it can happen of 
course from time to time, very unlikely though for a given try, and 
never that much !

As well, it seems your UART tx routine does not work properly, there are 
way too much LCP retries, as if the remote end never get most packets.

Before checking anything else, you should check that frames on wire are 
exactly what the PPP stack wanted to send, and check that all bytes on 
wire are actually processed into the PPP input function.

Sylvain


signature.asc
Description: Digital signature
___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

[lwip-users] PPP CHAT failed

2018-04-11 Thread vinimac
Hi,

I am using Lwip 2.0.3+FreeRTOS 10 and PPPoS with CHAP MD5 authentication.
The PPP negociation proceeds until stop in CHAP Challenge/CHAP Response. I
am using the same name/secret on Linux and works!

Log attached. 
ppp.log   



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users