EC25-E lwIP PPP internet access problem

Hi,

I’m using the EC25-E module through UART on a custom STM32H7 board with the lwIP stack.
I can set up the PPP connection according to the EC2xEG9xEM05_PPP_Application_Note_V1.0.pdf.
I can successfully set up the PPPoS connection with the lwIP stack.

Everything looks perfect to this point, but when I try to connect to a remote server through this netif, never got any answer.
The data mode is not interrupted, URC not reported, the APN and auth setting are correct, the signal strength is good, the PPP frames are valid.
The NET_STATUS flicker quickly (data transfer is ongoing) when I send a TCP packet.

I can send SMS with this module, I can use the AT+QPING successfully also. So, it seems to be the network and the internet is reachable.
I can monitor the UART with a logic analyzer and the packet shown on the PCAP log image are reaching the module, but no answer received.
The PPP keepalive packets still indicating a live connection.

I’m stuck here. What I’m missing? How can I debug further? Why the module not reporting any response or problem?

Thanks!

AT+CPIN?
+CPIN: READY
OK

AT+CREG?
+CREG: 0,1
OK

AT+CGREG?
+CGREG: 0,1
OK

AT+QNWINFO
+QNWINFO: “FDD LTE”,“21630”,“LTE BAND 20”,6350
OK

AT+CSQ
+CSQ: 17,99
OK

AT+CGDCONT=1,“IP”,“internet.telekom”
OK

AT+CGACT?
+CGACT: 1,1
OK

ATD*99#
CONNECT 150000000

ppp phase changed[1]: phase=0
ppp_connect[1]: holdoff=0
ppp phase changed[1]: phase=3
pppos_connect: unit 1: connecting
ppp_start[1]
ppp phase changed[1]: phase=6
pppos_send_config[1]: out_accm=FF FF FF FF
ppp_send_config[1]
pppos_recv_config[1]: in_accm=FF FF FF FF
ppp_recv_config[1]
ppp: auth protocols: PAP=1 CHAP=0 CHAP_MD5=0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x2886b041>]
pppos_write[1]: len=20
ppp_start[1]: finished
pppos_input[1]: got 92 bytes
rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <magic 0xd3aa1227> ]
sent [LCP ConfRej id=0x0 ]
pppos_write[1]: len=12
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x2886b041>]
pppos_input[1]: got 46 bytes
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xd3aa1227>]
sent [LCP ConfNak id=0x1 ]
pppos_write[1]: len=12
pppos_input[1]: got 44 bytes
rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xd3aa1227>]
sent [LCP ConfAck id=0x2 <asyncmap 0x0> <magic 0xd3aa1227>]
pppos_write[1]: len=24
netif_set_mtu[1]: mtu=1500
pppos_send_config[1]: out_accm=0 0 0 0
ppp_send_config[1]
pppos_recv_config[1]: in_accm=0 0 0 0
ppp_recv_config[1]
sent [LCP EchoReq id=0x0 magic=0x2886b041]
pppos_write[1]: len=12
ppp phase changed[1]: phase=7
sent [PAP AuthReq id=0x1 user="" password=""]
pppos_write[1]: len=10
pppos_input[1]: got 22 bytes
rcvd [LCP DiscReq id=0x3 magic=0xd3aa1227]
pppos_input[1]: got 26 bytes
rcvd [LCP EchoRep id=0x0 magic=0xd3aa1227 28 86 b0 41]
pppos_input[1]: got 13 bytes
rcvd [PAP AuthAck id=0x1 “”]
PAP authentication succeeded
ppp phase changed[1]: phase=9
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
pppos_write[1]: len=26
pppos_input[1]: got 42 bytes
rcvd [IPCP ConfReq id=0x0]
sent [IPCP ConfNak id=0x0 <addr 0.0.0.0>]
pppos_write[1]: len=14
rcvd [IPCP ConfNak id=0x1 <addr 100.117.152.29> <ms-dns1 84.2.46.1> <ms-dns2 84.2.44.1>]
sent [IPCP ConfReq id=0x2 <addr 100.117.152.29> <ms-dns1 84.2.46.1> <ms-dns2 84.2.44.1>]
pppos_write[1]: len=26
pppos_input[1]: got 12 bytes
rcvd [IPCP ConfReq id=0x1]
sent [IPCP ConfAck id=0x1]
pppos_write[1]: len=8
pppos_input[1]: got 30 bytes
rcvd [IPCP ConfAck id=0x2 <addr 100.117.152.29> <ms-dns1 84.2.46.1> <ms-dns2 84.2.44.1>]
Could not determine remote IP address: defaulting to 10.64.64.64
PPPNETIF: pp1 is UP
IPV4: Host at 100.117.152.29 mask 255.255.255.255 gateway 10.64.64.64
sifup[1]: err_code=0
PPP status: Connected
IP address = 100.117.152.29
Gateway = 10.64.64.64
Netmask = 255.255.255.255
local IP address 100.117.152.29
remote IP address 10.64.64.64
primary DNS address 84.2.46.1
secondary DNS address 84.2.44.1
ppp phase changed[1]: phase=10

HI
Judging from the log, your operation is no problem. You can ping through the host computer after ppp dialing.
Or what is your module and specific version? Can send you the latest firmware for testing

Hi,

In the meantime I’ve solved the problem. The only problem was that the checksum generation for outgoing IP packets wasn’t enabled in lwIP.
It seems that the mobile network drop all IP packets without proper checksum.

Thank you!

Hi
Thank you for your feedback, I will continue to serve you.

Can you help me how can I use data captured in logic analyzer convert to PCAP format

Hi,

Yeah, that sentence a bit misleading, I’m not capturing the PCAP with the logic analizer. I’m just stated, that the packets in the PCAP capture matching with the logic analizer capture.

In my system there is a USB drive, so I can create a PCAP capture file. Before you feed the lwIP with the raw UART data with the pppos_input() function, and when the lwIP calls the pppos_output_cb_fn callback function, you can save the PPP packet to file.

Before you save the PPP packet, you have to convert escaped data and strip the leading, trailing frame flag (0x7E) and FCS. Wireshark can’t decode escaped PPP packet, and packet starting with the leading flag.
One burts of data from the module can contain multiple PPP frames. You have to handle that also.

This is a good start to write PCAP files:
https://wiki.wireshark.org/Development/LibpcapFileFormat

can you send the code as soon as possible

Hi,
What code do you need?