lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Advise on PPPoS implementation


From: Raivis
Subject: [lwip-users] Advise on PPPoS implementation
Date: Wed, 25 Oct 2017 21:27:12 +0100

Hi,


I've been trying to implement a PPPoS on STM32 micro-controller for the last couple weeks. I think I've reached a point where I'm stuck and due to lack of my experience in this field I don't know how to proceed.


Project background:
1. I'm using GPRS/GSM modem A6
2. It is done on Nucleo F207ZG board
3. I'm using the cubemx version of lwip, with PPPoS enabled
4. I also use FreeRTOS


Progress so far:
1. I've managed to implement the PPPoS modem interface up to the point where I successfully connect to the APN and get an IP address
2. Finally got the debugging working as well, even though it's not big of a help for myself
3. I've managed to make netconn TCP connection to my server and send TCP data via the Ethernet interface, but not through PPP.



Basically, where I'm stuck at the moment is, the netconn TCP client doesn't work through PPP. I can see with my scope or logic analyzer that data has been transmitted to the modem, but there is no response at all.  Any advice on the issue, or what to look for would be greatly appreciated!

The problem is I have no experience with the PPP protocol and I'm not sure what I should be expecting.

I've also noticed that the primary and secondary DNS are 0.0.0.0. I tried manually setting them, didn't help, still can't connect.


In any case here is my log up to the point, where it starts to re-transmit the TCP packet over and over again:



AT RESPONSE: [..OK..AT+CGATT=1...+CGATT:1....OK..]
AT COMMAND: AT+CGDCONT=1,"IP","mobile.o2.co.uk"
: 37
AT RESPONSE: [AT+CGDCONT=1,"IP","mobile.o2.co.uk"....OK..]
AT COMMAND: ATD*99***1#
: 13
AT RESPONSE: [ATD*99***1#....CONNECT..]
GSM initialised.
netif: IP address of interface  set to 0.0.0.0
netif: netmask of interface  set to 255.255.255.255
netif: GW address of interface  set to 0.0.0.0
netif: added interface pp IP addr 0.0.0.0 netmask 255.255.255.255 gw 0.0.0.0
ppp phase changed[0]: phase=0
netif: setting default interface pp
netif: setting default interface pp
ppp_connect[0]: holdoff=0
ppp phase changed[0]: phase=3
pppos_connect: unit 0: connecting
ppp_start[0]
ppp phase changed[0]: phase=6
pppos_send_config[0]: out_accm=FF FF FF FF
ppp_send_config[0]
pppos_recv_config[0]: in_accm=FF FF FF FF
ppp_recv_config[0]
ppp: auth protocols: PAP=1
pppos_write[0]: len=24
ppp_start[0]: finished
tcpip_thread: PACKET 0x20006454
pppos_input[0]: got 94 bytes
pppos_write[0]: len=24
netif_set_mtu[0]: mtu=1500
pppos_send_config[0]: out_accm=0 0 0 0
ppp_send_config[0]
pppos_recv_config[0]: in_accm=0 0 0 0
ppp_recv_config[0]
ppp phase changed[0]: phase=7
ppp phase changed[0]: phase=9
pppos_write[0]: len=20
tcpip_thread: PACKET 0x20006454
pppos_input[0]: got 1 bytes
pppos_write[0]: len=20
tcpip_thread: PACKET 0x20006454
pppos_input[0]: got 18 bytes
pppos_input[0]: Dropping incomplete packet 5
pppos_write[0]: len=14
tcpip_thread: PACKET 0x20006454
pppos_input[0]: got 19 bytes
pppos_write[0]: len=14
tcpip_thread: PACKET 0x20006454
pppos_input[0]: got 36 bytes
pppos_write[0]: len=14
sifvjcomp[0]: VJ compress enable=0 slot=0 max slot=0
netif: netmask of interface pp set to 255.255.255.255
netif: GW address of interface pp set to 192.200.1.21
netif_set_ipaddr: netif address being changed
netif: IP address of interface pp set to 10.160.53.166
sifup[0]: err_code=0
status_cb: Connected
  ipaddr    = 10.160.53.166
  gateway   = 192.200.1.21
  netmask   = 255.255.255.255
  dns1        = 0.0.0.0
  dns2        = 0.0.0.0
local  IP address 10.160.53.166
remote IP address 192.200.1.21
ppp phase changed[0]: phase=10
PPPoS initialised.
Starting TCP client...
I think it is up
Looked up addr: 0.0.2.32   [-16]
Dest addr: 80.233.190.7
tcp_bind: bind to port 49153
tcp_connect to port 2020
ip4_output_if: pp0
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |        44     | (v, hl, tos, len)
+-------------------------------+
|        0      |000|       0   | (id, flags, offset)
+-------------------------------+
|  255  |    6  |    0x0000     | (ttl, proto, chksum)
+-------------------------------+
|   10  |  160  |   53  |  166  | (src)
+-------------------------------+
|   80  |  233  |  190  |    7  | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
pppos_netif_output[0]: proto=0x21, len = 44
tcpip_thread: PACKET 0x20006454
pppos_input[0]: got 1 bytes
tcp_slowtmr: processing active pcb
tcp_slowtmr: processing active pcb
tcp_slowtmr: polling application
tcp_slowtmr: processing active pcb
tcp_slowtmr: processing active pcb
tcp_slowtmr: polling application
tcp_slowtmr: processing active pcb
tcp_slowtmr: processing active pcb
ip4_output_if: pp0
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |        44     | (v, hl, tos, len)
+-------------------------------+
|        1      |000|       0   | (id, flags, offset)
+-------------------------------+
|  255  |    6  |    0x0000     | (ttl, proto, chksum)
+-------------------------------+
|   10  |  160  |   53  |  166  | (src)
+-------------------------------+
|   80  |  233  |  190  |    7  | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
pppos_netif_output[0]: proto=0x21, len = 44
tcp_slowtmr: polling application
tcp_slowtmr: processing active pcb
tcp_slowtmr: processing active pcb
tcp_slowtmr: polling application
tcp_slowtmr: processing active pcb
tcp_slowtmr: processing active pcb
tcp_slowtmr: polling application
tcp_slowtmr: processing active pcb
tcp_slowtmr: processing active pcb
ip4_output_if: pp0
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |        44     | (v, hl, tos, len)
+-------------------------------+
|        2      |000|       0   | (id, flags, offset)
+-------------------------------+
|  255  |    6  |    0x0000     | (ttl, proto, chksum)
+-------------------------------+
|   10  |  160  |   53  |  166  | (src)
+-------------------------------+
|   80  |  233  |  190  |    7  | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
pppos_netif_output[0]: proto=0x21, len = 44
tcp_slowtmr: polling application
tcp_slowtmr: processing active pcb
tcp_slowtmr: processing active pcb
tcp_slowtmr: polling application
tcp_slowtmr: processing active pcb
tcp_slowtmr: processing active pcb
tcp_slowtmr: polling application
tcp_slowtmr: processing active pcb
tcp_slowtmr: processing active pcb
ip4_output_if: pp0





Best Regards.

Raivis Strogonovs

reply via email to

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