PPPoS TCP Connection Reject

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

PPPoS TCP Connection Reject

gzayzay
Hello All-

I am working with FreeRTOS + LWIP on a project using PPPoS. I have been able
to successfully connect to the network and obtain an IP address after the
PPP negotiation using a modem that we have on our embedded device.

Once PPP negotiation completes, on our embedded device, I start my server
application to listen for incoming connection on a particular port. Every
time I attempt to connect to the server application from a client, I am
getting a "Connection reject".

I can successfully ping the device and get a ping response. The interesting
part is, whenever I set a breakpoint in the code where I except data/traffic
to be taken out of the UART to be passed to the lwip stack for processing, I
do not hit this breakpoint.

I have placed a logic analyzer on the UART line and I do not see data when a
PPP session has been established. However, during the ppp negatation
process, this path is the only way data gets to the LWIP stack and it is
responding. My hypothesis is that the modem is receiving the traffic and
processing it internally instead of passing it through to the UART so that
the lwip stack can do the processing.

In view of the above, is there an option in LWIP that needs to be set for
PPP so that the modem passes data transparently? Are there some
configuration for LWIP that I need to set?

On linux, I see these settings in the chat scripts. Are there some kind of
lwip equivalent that needs to be set?

asyncmap 0
noauth
defaultroute
usepeerdns
local
debug
updetach


`Edman




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

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: PPPoS TCP Connection Reject

Patrick Klos-2
On 8/1/2018 11:00 AM, gzayzay wrote:
> Hello All-
>
> I am working with FreeRTOS + LWIP on a project using PPPoS. I have been able
> to successfully connect to the network and obtain an IP address after the
> PPP negotiation using a modem that we have on our embedded device.

If the PPP negotiation completes, then clearly the UART and serial line
are working and passing data, and so is PPPoS.

> Once PPP negotiation completes, on our embedded device, I start my server
> application to listen for incoming connection on a particular port. Every
> time I attempt to connect to the server application from a client, I am
> getting a "Connection reject".

As far as the "Connection reject" on the TCP connection, you'll need to
check your "accept" routine that handles the incoming new connection(s)
- make sure it returns ERR_OK (or equivalent based on the API you're using).

> I can successfully ping the device and get a ping response. The interesting
> part is, whenever I set a breakpoint in the code where I except data/traffic
> to be taken out of the UART to be passed to the lwip stack for processing, I
> do not hit this breakpoint.

Workings pings gives further proof that the serial link is up and
running properly.

> I have placed a logic analyzer on the UART line and I do not see data when a
> PPP session has been established. However, during the ppp negatation
> process, this path is the only way data gets to the LWIP stack and it is
> responding. My hypothesis is that the modem is receiving the traffic and
> processing it internally instead of passing it through to the UART so that
> the lwip stack can do the processing.

If you place a logic analyzer and don't see anything, I would guess
you're not actually connecting the logic analyzer to either of the UART
signals (or maybe the wrong UART?).

> In view of the above, is there an option in LWIP that needs to be set for
> PPP so that the modem passes data transparently? Are there some
> configuration for LWIP that I need to set?

PPPoS is logically a different module from LwIP.  The PPPoS module
packetizes the serial stream, presenting the LwIP interface with
packets.  There is no such thing as passing data transparently from the
modem to LwIP.

Patrick Klos
Klos Technologies, Inc.


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: PPPoS TCP Connection Reject

gzayzay
Hello Patrick,

Thanks for the feed back. Per your input, there are few issues that I did
like to clarify.
1. I have a single UART and I don't believe that I could be tapping the
wrong line. During PPP negotiations, I do see the data on the logic
analyzer. Once IP address has been received, I no longer see incoming data
on the logic analyzer/

2. I am also convince that the incoming data never gets on the UART after
connection for the LWIP stack to handle it.

3. When I halt the microcontroller and send ping to the IP address, the
device is still responding to the pings which levels me to believe that the
modem is responding instead of the LWIP stack since the micro is not
running.

4. By transparent passing, I meant, the data should not be process
internally by the modem but instead sent over the UART channel and allow the
LWIP stack to handle all processing.



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

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: PPPoS TCP Connection Reject

Patrick Klos-2
On 8/1/2018 3:18 PM, gzayzay wrote:

> Hello Patrick,
>
> Thanks for the feed back. Per your input, there are few issues that I did
> like to clarify.
> 1. I have a single UART and I don't believe that I could be tapping the
> wrong line. During PPP negotiations, I do see the data on the logic
> analyzer. Once IP address has been received, I no longer see incoming data
> on the logic analyzer/
>
> 2. I am also convince that the incoming data never gets on the UART after
> connection for the LWIP stack to handle it.
>
> 3. When I halt the microcontroller and send ping to the IP address, the
> device is still responding to the pings which levels me to believe that the
> modem is responding instead of the LWIP stack since the micro is not
> running.

Very important piece of information there.  That's good to know!

> 4. By transparent passing, I meant, the data should not be process
> internally by the modem but instead sent over the UART channel and allow the
> LWIP stack to handle all processing.

If that is the case, then you'll need to figure out how to get the modem
to stop intercepting the data and/or packets.  That has nothing to do
with PPPoS or LwIP - that sounds like a modem specific behavior you
would need to disable in the modem.  What modem are you using?

Patrick Klos
Klos Technologies, Inc.


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: PPPoS TCP Connection Reject

gzayzay
Hello Patrick,

I am using the Telit ME910C1-NV modem. I tested the modem on a Linux box and
all communication are going fine. I was able to SSH into the Linux box.
However, when I put the same modem on the embedded device with LWIP+PPPoS,
this is when I encounter this problem.

I am as confused as to why it is working fine on Linux and not with LWIP.
This is why I thought it was a configuration issue with LWIP that I am
missing.

Very strange problem



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

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: PPPoS TCP Connection Reject

Sergey A. Borshch
On 08/01/2018 11:22 PM, gzayzay wrote:
> Hello Patrick,
>
> I am using the Telit ME910C1-NV modem. I tested the modem on a Linux box and
> all communication are going fine. I was able to SSH into the Linux box.
> However, when I put the same modem on the embedded device with LWIP+PPPoS,
> this is when I encounter this problem.
Is your micro an STM32 one? If so, check that CHECKSUM_BY_HARDWARE not defined
in your lwipopts.h. Using PPPoS data do not flows throw STM32 MAC and checksums
must be calculated by lwIP software.

--
Regards,
   Sergey A. Borshch            mailto: [hidden email]
     SB ELDI ltd. Riga, Latvia

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: PPPoS TCP Connection Reject

gzayzay
Hi Sergey,

I'd verify that  CHECKSUM_BY_HARDWARE is not defined. From my debug logs, I
see that the devices seems to negotiate a PPP session successfully.

LTE PPP: Device IP address: 166.X.Y.Z -->( *IP address masked by me* )

LTE PPP: Gateway:     10.64.64.64

LTE PPP: Primary DNS: 198.224.152.119

LTE PPP: Secondary DNS:   198.224.154.135



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

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: PPPoS TCP Connection Reject

Sergey A. Borshch
On 08/02/2018 06:56 PM, gzayzay wrote:
> Hi Sergey,
>
> I'd verify that  CHECKSUM_BY_HARDWARE is not defined. From my debug logs, I
> see that the devices seems to negotiate a PPP session successfully.

Actually CHECKSUM_BY_HARDWARE set 0 to CHECKSUM_GEN_xxx and CHECKSUM_CHECK_xxx.
Check that all of them are set to 1 in your project.
I had similar issue three weeks ago - correct connection establishment and no
responses from GSM modem after that. The problem was missed checksum in network
frames. Also see https://lists.gnu.org/archive/html/lwip-users/2017-11/msg00072.html
Hope that helps.

--
Regards,
   Sergey A. Borshch            mailto: [hidden email]
     SB ELDI ltd. Riga, Latvia

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: PPPoS TCP Connection Reject

gzayzay
I just verified all that all CHECKSUM_GEN_xxx and CHECKSUM_CHECK_xxx in my
opt.h file are set to 1.

I did not have CHECKSUM_BY_HARDWARE defined in any part of the project and I
just define it in my lwipopts.h to be #define CHECKSUM_BY_HARDWARE  0

This didn't solve the problem either. FYI, I am using LWIP 2.0.3 if that
helps for what its worth.



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

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users