lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Help with PPP connection - modem disconnects for no obv


From: Sylvain Rochet
Subject: Re: [lwip-users] Help with PPP connection - modem disconnects for no obvious reason...
Date: Wed, 20 Mar 2019 23:13:10 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

Hi Freddie,

On Wed, Mar 20, 2019 at 07:29:31PM +0100, Freddie Chopin wrote:
> On Wed, 2019-03-20 at 18:22 +0100, Sylvain Rochet wrote:
> > The DiscReq LCP packet does not seem to be related at all to the PPP 
> > exchange, but rather just timed after the PPP session is started no 
> > matter what, right ? Could you try aggressively slowing down the
> > serial 
> > tx routine to check that ?
> 
> This modem is connected with USB, so I could try adding a `sleep()`
> inside the functions that read/write to the device. Would that be what
> you have in mind? Previously I've tried to make sure this is not a case
> of "modem disconnects X seconds after `ATD*99#`" so I've added a long
> sleep (up to 60 seconds) between last AT command and starting lwip, but
> this also did not change anything.

So it always disconnect after the first IPCP packet. That's all what I 
wanted to know :)


> > Your setup allows you to check using pppd instead of lwIP, maybe 
> > that's worth trying it to get another set of traces.
> 
> Generally I think that using pppd is possible here, but the funny thing
> is that the first thing I tried was to use this modem as a network card
> with Linux - using NetworkManager, ModemManader, pppd and so on. And it
> _DID_ connect to the network, got an IP address, DNS servers, etc.,
> but... did not work at all (;
> 
> https://bbs.archlinux.org/viewtopic.php?id=244862

That is bad news… if it does not work with plain pppd there is no way it 
could work with lwIP.


> That's why I then tried in Windows and in there - after a couple of 
> tricks and hacks - it worked correctly. My plan was therefore to try 
> using Wireshark to capture USB traffic to this modem to see what's 
> going on, maybe this will me some hints (assuming I'll manage to do 
> that)...

Having a dump of the working trace would be very helpful. I doubt there 
is an issue on PPP itself because the dumped PPP trace is perfectly sane 
until the modem stop at first IPCP packet received. But we have no clue 
about modem initialization and I'm confident this is where it might be 
different and significant.


> I'll try to use pppd with your suggestions too.
> 
> But generally - is it possible for the modem to misbehave like this
> because of some lwip settings or maybe whatever I would set in lwip it
> should not result in the modem just disconnecting? I'm not 100% sure
> about any part of this code really, so don't know where to focus.

It should not result in the modem just disconnecting… especially by 
sending a "NO CARRIER" raw frame in the middle of a PPP session 
bypassing HDLC encoding. This is just never allowed once the modem 
entered DATA mode, it should not send garbage in the middle of an HDLC 
stream this way… the proper way for the modem to end the PPP session is 
to send a LCP TermReq request.


Sylvain

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]