Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP-IDF v5.2.1 LWIP PPP driver didn't work with IPv6 (IDFGH-12730) #13713

Closed
3 tasks done
kanjiviroja1991 opened this issue Apr 29, 2024 · 38 comments
Closed
3 tasks done
Assignees
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally

Comments

@kanjiviroja1991
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

pbuf_remove_header: old 0x3ffb9e68 new 0x3ffb9e76 (14)
pbuf_remove_header: old 0x3ffb9e76 new 0x3ffb9e78 (2)
netif_ip6_addr_set: netif address being changed
netif: IPv6 address 0 of interface pp set to FE80::8136:98F9:5863:5798/0x00
netif_ip6_addr_set_state: netif address state being changed
I (60493) pppos_example: PPP IP event! 3
I (60503) pppos_example: GOT IPv6 event!
I (60503) pppos_example: Got IPv6 address fe80:0000:0000:0000:8136:98f9:5863:5798
netif: IPv6 address 0 of interface pp set to FE80::8136:98F9:5863:5798/0x30
I (60523) esp-netif_lwip-ppp: Connected
pbuf_free(0x3ffb9e58)
pbuf_free: deallocating 0x3ffb9e58
pbuf_free(0x3ffb7c18)
pbuf_free: deallocating 0x3ffb7c18
I (60533) PING: PPP Interface key 4:

I (60543) PING: ppp: 0.0.0.0

I (60543) PING: STA Interface key 3:

I (60543) PING: sta: 0.0.0.0

I (60553) PING: ETH Interface key 2:

I (60553) PING: eth: 0.0.0.0

I (60563) PING: Done listing network interfaces
pbuf_alloc(length=22)
pbuf_alloc(length=22) == 0x3ffb8afc
pbuf_alloc(length=14)
pbuf_alloc(length=14) == 0x3ffb9e58
pbuf_remove_header: old 0x3ffb9e68 new 0x3ffb9e76 (14)
pbuf_remove_header: old 0x3ffb9e76 new 0x3ffb9e78 (2)
pbuf_alloc(length=8)
pbuf_alloc(length=8) == 0x3ffba458
pbuf_alloc(length=0)
pbuf_alloc(length=0) == 0x3ffebb2c
pbuf_free(0x3ffebb2c)
pbuf_free: deallocating 0x3ffebb2c
pbuf_free(0x3ffba458)
pbuf_free: deallocating 0x3ffba458
pbuf_free(0x3ffb9e58)
pbuf_free: deallocating 0x3ffb9e58
pbuf_free(0x3ffb8afc)
pbuf_free: deallocating 0x3ffb8afc
pbuf_alloc(length=12)
pbuf_alloc(length=12) == 0x3ffb8afc
pbuf_alloc(length=14)
pbuf_alloc(length=14) == 0x3ffb9e58
pbuf_remove_header: old 0x3ffb9e68 new 0x3ffb9e76 (14)
pbuf_remove_header: old 0x3ffb9e76 new 0x3ffb9e78 (2)
pbuf_alloc(length=44)
pbuf_alloc(length=44) == 0x3ffba458
pbuf_alloc(length=0)
pbuf_alloc(length=0) == 0x3ffebb2c
pbuf_free(0x3ffebb2c)
pbuf_free: deallocating 0x3ffebb2c
pbuf_free(0x3ffba458)
pbuf_free: deallocating 0x3ffba458
pbuf_free(0x3ffb9e58)
pbuf_free: deallocating 0x3ffb9e58
pbuf_free(0x3ffb8afc)
pbuf_free: deallocating 0x3ffb8afc
etharp_timer
dhcp_coarse_tmr()
E (61313) main: Server Connection lost.....8 Second
I (61313) PING: PPP Interface key 4:

I (61313) PING: ppp: 0.0.0.0

I (61313) PING: STA Interface key 3:

I (61313) PING: sta: 0.0.0.0

I (61323) PING: ETH Interface key 2:

I (61323) PING: eth: 0.0.0.0

I (61323) PING: Done listing network interfaces
I (61333) PING: DNS lookup success
I (61333) PING: target_addr.type=46
I (61343) PING: target_addr=8.8.8.8
lwip_socket(UNKNOWN, SOCK_RAW, 58) = 54
netif_find: found pp
lwip_setsockopt(54, IPPROTO_IP, IP_TOS, ..)-> 0
I (61353) PING: initialize_ping success for GSM
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (61363) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
etharp_timer
dhcp_coarse_tmr()
pbuf_alloc(length=16)
pbuf_alloc(length=16) == 0x3ffebc80
pbuf_add_header: old 0x3ffebcc8 new 0x3ffebca0 (40)
ip6_output_if: pp3
IPv6 header:
+-------------------------------+
| 6 | 0 | 0 | (ver, class, flow)
+-------------------------------+
| 16 | 58 | 255 | (plen, nexth, hopl)
+-------------------------------+
| fe80 | 0 | 0 | 0 | (src)
| 8136 | 98f9 | 5863 | 5798 |
+-------------------------------+
| ff02 | 0 | 0 | 0 | (dest)
| 0 | 0 | 0 | 2 |
+-------------------------------+
netif->output_ip6()
pbuf_alloc(length=0)
pbuf_alloc(length=0) == 0x3ffebcdc
pbuf_free(0x3ffebcdc)
pbuf_free: deallocating 0x3ffebcdc
pbuf_free(0x3ffebc80)
pbuf_free: deallocating 0x3ffebc80
pbuf_alloc(length=12)
pbuf_alloc(length=12) == 0x3ffbaee0
pbuf_alloc(length=14)
pbuf_alloc(length=14) == 0x3ffebc80
pbuf_remove_header: old 0x3ffebc90 new 0x3ffebc9e (14)
pbuf_remove_header: old 0x3ffebc9e new 0x3ffebca0 (2)
pbuf_free(0x3ffebc80)
pbuf_free: deallocating 0x3ffebc80
pbuf_free(0x3ffbaee0)
pbuf_free: deallocating 0x3ffbaee0
dns_enqueue: "csms.arconaconsultancy.com": use DNS entry 0
udp_bind(ipaddr = 0.0.0.0, port = 5519)
udp_bind: bound to 0.0.0.0, port 5519)
dns_enqueue: "csms.arconaconsultancy.com": use DNS pcb 0
dns_send: dns_servers[2] "csms.arconaconsultancy.com": request
pbuf_alloc(length=44)
pbuf_alloc(length=44) == 0x3ffebcd4
sending DNS request ID 7472 for name "csms.arconaconsultancy.com" to server 2
udp_send
ip4_route: No route to 114.114.114.114
udp_send: No route to 114.114.114.114
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
dns_send returned error: Routing problem.
pbuf_alloc(length=92)
pbuf_alloc(length=92) == 0x3ffebcd4
pbuf_alloc(length=14)
pbuf_alloc(length=14) == 0x3ffebd44
pbuf_remove_header: old 0x3ffebd54 new 0x3ffebd62 (14)
pbuf_remove_header: old 0x3ffebd62 new 0x3ffebd64 (2)
ip6_input: packet accepted on interface pp
pbuf_remove_header: old 0x3ffebd64 new 0x3ffebd8c (40)
ip6_input:
IPv6 header:
+-------------------------------+
| 8 | 96 | 2243 | (ver, class, flow)
+-------------------------------+
| 64 | 255 | 255 | (plen, nexth, hopl)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
| 304 | 4040 | ffff | ffff |
+-------------------------------+
| ffff | ffff | 0 | 0 | (dest)
| 2401 | 4900 | 16a6 | e273 |
+-------------------------------+
ip6_input: p->len 48 p->tot_len 48
pbuf_add_header: old 0x3ffebd8c new 0x3ffebd64 (40)
pbuf_alloc(length=88)
pbuf_alloc(length=88) == 0x3ffec344
pbuf_copy(0x3ffec344, 0x3ffebd44)
pbuf_copy_partial_pbuf(0x3ffec344, 0x3ffebd44, 88, 0)
pbuf_copy_partial_pbuf: copy complete.
pbuf_remove_header: old 0x3ffebd64 new 0x3ffebd8c (40)
pbuf_alloc(length=32)
pbuf_alloc(length=32) == 0x3ffec3d8
pbuf_add_header: old 0x3ffec420 new 0x3ffec3f8 (40)
ip6_output_if: pp3
IPv6 header:
+-------------------------------+
| 6 | 0 | 0 | (ver, class, flow)
+-------------------------------+
| 32 | 58 | 255 | (plen, nexth, hopl)
+-------------------------------+
| fe80 | 0 | 0 | 0 | (src)
| 8136 | 98f9 | 5863 | 5798 |
+-------------------------------+
| ff02 | 0 | 0 | 0 | (dest)
| 0 | 1 | ff00 | 5 |
+-------------------------------+
netif->output_ip6()
pbuf_alloc(length=0)
pbuf_alloc(length=0) == 0x3ffec444
pbuf_free(0x3ffec444)
pbuf_free: deallocating 0x3ffec444
pbuf_free(0x3ffec3d8)
pbuf_free: deallocating 0x3ffec3d8
pbuf_free(0x3ffebd44)
pbuf_free: deallocating 0x3ffebd44
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
netconn_recv_data: received 0x3ffec3b0, len=88
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=0, netbuf=0x3ffec3b0
lwip_recvfrom_udp_raw: buflen=88
lwip_recvfrom_udp_raw(54): addr=fe80:0:0:0:0:0:0:5 port=58 len=64
pbuf_free(0x3ffec344)
pbuf_free: deallocating 0x3ffec344
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
pbuf_alloc(length=77)
pbuf_alloc(length=77) == 0x3ffebcd4
pbuf_alloc(length=14)
pbuf_alloc(length=14) == 0x3ffebd38
pbuf_remove_header: old 0x3ffebd48 new 0x3ffebd56 (14)
pbuf_remove_header: old 0x3ffebd56 new 0x3ffebd58 (2)
ip6_input: packet accepted on interface pp
pbuf_remove_header: old 0x3ffebd58 new 0x3ffebd80 (40)
ip6_input:
IPv6 header:
+-------------------------------+
| 8 | 128 | 2028 | (ver, class, flow)
+-------------------------------+
| 49152 | 0 | 0 | (plen, nexth, hopl)
+-------------------------------+
| fe80 | 0 | 0 | 0 | (src)
| 0 | 0 | 0 | 5 |
+-------------------------------+
| 201 | fefd | e900 | 0 | (dest)
| 70bb | 0 | bcc0 | fe3f |
+-------------------------------+
ip6_input: p->len 32 p->tot_len 32
pbuf_add_header: old 0x3ffebd80 new 0x3ffebd58 (40)
pbuf_alloc(length=72)
pbuf_alloc(length=72) == 0x3ffec338
pbuf_copy(0x3ffec338, 0x3ffebd38)
pbuf_copy_partial_pbuf(0x3ffec338, 0x3ffebd38, 72, 0)
pbuf_copy_partial_pbuf: copy complete.
pbuf_remove_header: old 0x3ffebd58 new 0x3ffebd80 (40)
pbuf_free(0x3ffebd38)
pbuf_free: deallocating 0x3ffebd38
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
netconn_recv_data: received 0x3ffec394, len=72
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=0, netbuf=0x3ffec394
lwip_recvfrom_udp_raw: buflen=72
lwip_recvfrom_udp_raw(54): addr=fe80:0:0:0:0:0:0:5 port=58 len=64
pbuf_free(0x3ffec338)
pbuf_free: deallocating 0x3ffec338
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
pbuf_alloc(length=49)
pbuf_alloc(length=49) == 0x3ffebcd4
pbuf_alloc(length=14)
pbuf_alloc(length=14) == 0x3ffebd1c
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
pbuf_alloc(length=44)
pbuf_alloc(length=44) == 0x3ffebcd4
pbuf_remove_header: old 0x3ffebd2c new 0x3ffebd3a (14)
pbuf_remove_header: old 0x3ffebd3a new 0x3ffebd3c (2)
pbuf_remove_header: old 0x3ffebd3c new 0x3ffebd64 (40)
ip6_input:
IPv6 header:
+-------------------------------+
| 8 | 96 | 53867 | (ver, class, flow)
+-------------------------------+
| 64 | 255 | 255 | (plen, nexth, hopl)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
| 304 | 4040 | ffff | ffff |
+-------------------------------+
| ffff | ffff | 0 | 0 | (dest)
| 2401 | 4900 | 16a6 | e273 |
+-------------------------------+
ip6_input: p->len 48 p->tot_len 48
pbuf_add_header: old 0x3ffebd64 new 0x3ffebd3c (40)
pbuf_alloc(length=88)
pbuf_alloc(length=88) == 0x3ffec31c
pbuf_copy(0x3ffec31c, 0x3ffebd1c)
pbuf_copy_partial_pbuf(0x3ffec31c, 0x3ffebd1c, 88, 0)
pbuf_copy_partial_pbuf: copy complete.
pbuf_remove_header: old 0x3ffebd3c new 0x3ffebd64 (40)
pbuf_free(0x3ffebd1c)
pbuf_free: deallocating 0x3ffebd1c
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
netconn_recv_data: received 0x3ffec388, len=88
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=0, netbuf=0x3ffec388
lwip_recvfrom_udp_raw: buflen=88
lwip_recvfrom_udp_raw(54): addr=fe80:0:0:0:0:0:0:5 port=58 len=64
pbuf_free(0x3ffec31c)
pbuf_free: deallocating 0x3ffec31c
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
E (62363) main: Server Connection lost.....9 Second
I (62373) PING: PPP Interface key 4:

I (62383) PING: ppp: 0.0.0.0

I (62383) PING: STA Interface key 3:

I (62393) PING: sta: 0.0.0.0

I (62393) PING: ETH Interface key 2:

I (62393) PING: eth: 0.0.0.0

I (62403) PING: Done listing network interfaces
I (62403) PING: DNS lookup success
I (62413) PING: target_addr.type=46
I (62413) PING: target_addr=8.8.8.8
I (62423) PING: initialize_ping success for GSM
etharp_timer
dhcp_coarse_tmr()
dns_tmr: dns_check_entries
dns_send: dns_servers[2] "csms.arconaconsultancy.com": request
pbuf_alloc(length=44)
pbuf_alloc(length=44) == 0x3ffebcd4
sending DNS request ID 7472 for name "csms.arconaconsultancy.com" to server 2
udp_send
ip4_route: No route to 114.114.114.114
udp_send: No route to 114.114.114.114
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
dns_send returned error: Routing problem.
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (63373) PING: From 254.128.0.0 PPP Interface icmp_seq=1 timeout
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (63383) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
E (63423) main: Server Connection lost.....10 Second
I (63423) PING: PPP Interface key 4:

I (63423) PING: ppp: 0.0.0.0

I (63423) PING: STA Interface key 3:

I (63423) PING: sta: 0.0.0.0

I (63433) PING: ETH Interface key 2:

I (63433) PING: eth: 0.0.0.0

I (63433) PING: Done listing network interfaces
I (63443) PING: DNS lookup success
I (63443) PING: target_addr.type=46
I (63453) PING: target_addr=8.8.8.8
I (63453) PING: initialize_ping success for GSM
E (63473) main: ********* [HEAP MEMORY REMAINING]: 90640 *********
W (63473) main: *********************** NETWORK INFO ***********************
W (63473) main: Ethernet Status: Not Detected
W (63483) main: Internet Status: Disconnected
W (63483) main: Server Status: Disconnected
W (63493) main: ************************************************************
etharp_timer
dhcp_coarse_tmr()
dns_tmr: dns_check_entries
dns_send: dns_servers[2] "csms.arconaconsultancy.com": request
pbuf_alloc(length=44)
pbuf_alloc(length=44) == 0x3ffebcd4
sending DNS request ID 7472 for name "csms.arconaconsultancy.com" to server 2
udp_send
ip4_route: No route to 114.114.114.114
udp_send: No route to 114.114.114.114
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
dns_send returned error: Routing problem.
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (64393) PING: From 254.128.0.0 PPP Interface icmp_seq=2 timeout
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (64403) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
E (64493) main: Server Connection lost.....11 Second
I (64493) PING: PPP Interface key 4:

I (64493) PING: ppp: 0.0.0.0

I (64493) PING: STA Interface key 3:

I (64493) PING: sta: 0.0.0.0

I (64503) PING: ETH Interface key 2:

I (64503) PING: eth: 0.0.0.0

I (64503) PING: Done listing network interfaces
I (64513) PING: DNS lookup success
I (64513) PING: target_addr.type=46
I (64523) PING: target_addr=8.8.8.8
I (64523) PING: initialize_ping success for GSM
etharp_timer
dhcp_coarse_tmr()
dns_tmr: dns_check_entries
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (65413) PING: From 254.128.0.0 PPP Interface icmp_seq=3 timeout
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (65423) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
pbuf_alloc(length=26)
pbuf_alloc(length=26) == 0x3ffebcd4
pbuf_alloc(length=14)
pbuf_alloc(length=14) == 0x3ffebd04
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
pbuf_alloc(length=67)
pbuf_alloc(length=67) == 0x3ffec304
pbuf_remove_header: old 0x3ffebd14 new 0x3ffebd22 (14)
pbuf_remove_header: old 0x3ffebd22 new 0x3ffebd24 (2)
pbuf_remove_header: old 0x3ffebd24 new 0x3ffebd4c (40)
ip6_input:
IPv6 header:
+-------------------------------+
| 8 | 96 | 53867 | (ver, class, flow)
+-------------------------------+
| 64 | 255 | 255 | (plen, nexth, hopl)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
| 304 | 4040 | ffff | ffff |
+-------------------------------+
| ffff | ffff | 0 | 0 | (dest)
| 2401 | 4900 | 16a6 | e273 |
+-------------------------------+
ip6_input: p->len 48 p->tot_len 48
pbuf_add_header: old 0x3ffebd4c new 0x3ffebd24 (40)
pbuf_alloc(length=88)
pbuf_alloc(length=88) == 0x3ffec35c
pbuf_copy(0x3ffec35c, 0x3ffebd04)
pbuf_copy_partial_pbuf(0x3ffec35c, 0x3ffebd04, 88, 0)
pbuf_copy_partial_pbuf: copy complete.
pbuf_remove_header: old 0x3ffebd24 new 0x3ffebd4c (40)
pbuf_free(0x3ffebd04)
pbuf_free: deallocating 0x3ffebd04
pbuf_free(0x3ffec304)
pbuf_free: deallocating 0x3ffec304
E (65553) main: Server Connection lost.....12 Second
netconn_recv_data: received 0x3ffebcd4, len=88
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=0, netbuf=0x3ffebcd4
lwip_recvfrom_udp_raw: buflen=88
lwip_recvfrom_udp_raw(54): addr=fe80:0:0:0:0:0:0:5 port=58 len=64
pbuf_free(0x3ffec35c)
pbuf_free: deallocating 0x3ffec35c
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
I (65563) PING: PPP Interface key 4:

I (65593) PING: ppp: 0.0.0.0

I (65593) PING: STA Interface key 3:

I (65603) PING: sta: 0.0.0.0

I (65603) PING: ETH Interface key 2:

I (65613) PING: eth: 0.0.0.0

I (65613) PING: Done listing network interfaces
I (65623) PING: DNS lookup success
I (65623) PING: target_addr.type=46
I (65623) PING: target_addr=8.8.8.8
I (65633) PING: initialize_ping success for GSM
etharp_timer
dhcp_coarse_tmr()
dns_tmr: dns_check_entries
dns_send: dns_servers[2] "csms.arconaconsultancy.com": request
pbuf_alloc(length=44)
pbuf_alloc(length=44) == 0x3ffebcd4
sending DNS request ID 7472 for name "csms.arconaconsultancy.com" to server 2
udp_send
ip4_route: No route to 114.114.114.114
udp_send: No route to 114.114.114.114
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
dns_send returned error: Routing problem.
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (66583) PING: From 254.128.0.0 PPP Interface icmp_seq=4 timeout
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (66593) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
E (66633) main: Server Connection lost.....13 Second
I (66633) PING: PPP Interface key 4:

I (66633) PING: ppp: 0.0.0.0

I (66633) PING: STA Interface key 3:

I (66633) PING: sta: 0.0.0.0

etharp_timer
dhcp_coarse_tmr()
I (66643) PING: ETH Interface key 2:

I (66643) PING: eth: 0.0.0.0

I (66653) PING: Done listing network interfaces
I (66653) PING: DNS lookup success
I (66663) PING: target_addr.type=46
I (66663) PING: target_addr=8.8.8.8
I (66673) PING: initialize_ping success for GSM
dns_tmr: dns_check_entries
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (67603) PING: From 254.128.0.0 PPP Interface icmp_seq=5 timeout
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (67613) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
etharp_timer
dhcp_coarse_tmr()
E (67673) main: Server Connection lost.....14 Second
I (67673) PING: PPP Interface key 4:

I (67673) PING: ppp: 0.0.0.0

I (67673) PING: STA Interface key 3:

I (67673) PING: sta: 0.0.0.0

I (67683) PING: ETH Interface key 2:

I (67683) PING: eth: 0.0.0.0

I (67683) PING: Done listing network interfaces
I (67693) PING: DNS lookup success
I (67693) PING: target_addr.type=46
I (67703) PING: target_addr=8.8.8.8
I (67703) PING: initialize_ping success for GSM
dns_tmr: dns_check_entries
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (68633) PING: From 254.128.0.0 PPP Interface icmp_seq=6 timeout
etharp_timer
dhcp_coarse_tmr()
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (68653) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
pbuf_alloc(length=10)
pbuf_alloc(length=10) == 0x3ffebcd4
pbuf_alloc(length=14)
pbuf_alloc(length=14) == 0x3ffebcf4
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
pbuf_alloc(length=83)
pbuf_alloc(length=83) == 0x3ffec2f4
pbuf_remove_header: old 0x3ffebd04 new 0x3ffebd12 (14)
pbuf_remove_header: old 0x3ffebd12 new 0x3ffebd14 (2)
ip6_input: packet accepted on interface XX
ip6_input: packet not for us.
ip6_forward: not forwarding link-local address.
pbuf_free(0x3ffebcf4)
pbuf_free: deallocating 0x3ffebcf4
pbuf_free(0x3ffec2f4)
pbuf_free: deallocating 0x3ffec2f4
E (68713) main: Server Connection lost.....15 Second
I (68713) PING: PPP Interface key 4:

I (68723) PING: ppp: 0.0.0.0

I (68723) PING: STA Interface key 3:

I (68723) PING: sta: 0.0.0.0

I (68743) PING: ETH Interface key 2:

I (68743) PING: eth: 0.0.0.0

I (68743) PING: Done listing network interfaces
I (68743) PING: DNS lookup success
I (68753) PING: target_addr.type=46
I (68753) PING: target_addr=8.8.8.8
I (68753) PING: initialize_ping success for GSM
dns_tmr: dns_check_entries
dns_check_entry: "csms.arconaconsultancy.com": timeout
E (68843) esp-tls: couldn't get hostname for :csms.arconaconsultancy.com: getaddrinfo() returns 202, addrinfo=0x0
E (68843) transport_base: Failed to open a new connection: 32769
E (68853) transport_ws: Error connecting to host csms.arconaconsultancy.com:8888
I (68863) ocpp-client: WEBSOCKET_EVENT_DISCONNECTED
etharp_timer
dhcp_coarse_tmr()
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (69653) PING: From 254.128.0.0 PPP Interface icmp_seq=7 timeout
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (69663) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
E (69763) main: Server Connection lost.....16 Second
I (69763) PING: PPP Interface key 4:

I (69763) PING: ppp: 0.0.0.0

I (69763) PING: STA Interface key 3:

I (69763) PING: sta: 0.0.0.0

I (69773) PING: ETH Interface key 2:

I (69773) PING: eth: 0.0.0.0

I (69773) PING: Done listing network interfaces
I (69783) PING: DNS lookup success
I (69783) PING: target_addr.type=46
I (69793) PING: target_addr=8.8.8.8
I (69793) PING: initialize_ping success for GSM
dns_enqueue: "csms.arconaconsultancy.com": use DNS entry 0
udp_bind(ipaddr = 0.0.0.0, port = 15280)
udp_bind: bound to 0.0.0.0, port 15280)
dns_enqueue: "csms.arconaconsultancy.com": use DNS pcb 0
dns_send: dns_servers[2] "csms.arconaconsultancy.com": request
pbuf_alloc(length=44)
pbuf_alloc(length=44) == 0x3ffebcd4
sending DNS request ID 60576 for name "csms.arconaconsultancy.com" to server 2
udp_send
ip4_route: No route to 114.114.114.114
udp_send: No route to 114.114.114.114
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
dns_send returned error: Routing problem.
etharp_timer
dhcp_coarse_tmr()
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (70673) PING: From 254.128.0.0 PPP Interface icmp_seq=8 timeout
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (70683) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
E (70803) main: Server Connection lost.....17 Second
I (70803) PING: PPP Interface key 4:

I (70803) PING: ppp: 0.0.0.0

I (70803) PING: STA Interface key 3:

I (70803) PING: sta: 0.0.0.0

I (70823) PING: ETH Interface key 2:

I (70823) PING: eth: 0.0.0.0

I (70823) PING: Done listing network interfaces
I (70823) PING: DNS lookup success
I (70833) PING: target_addr.type=46
I (70833) PING: target_addr=8.8.8.8
I (70833) PING: initialize_ping success for GSM
dns_tmr: dns_check_entries
dns_send: dns_servers[2] "csms.arconaconsultancy.com": request
pbuf_alloc(length=44)
pbuf_alloc(length=44) == 0x3ffebcd4
sending DNS request ID 60576 for name "csms.arconaconsultancy.com" to server 2
udp_send
ip4_route: No route to 114.114.114.114
udp_send: No route to 114.114.114.114
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
dns_send returned error: Routing problem.
etharp_timer
dhcp_coarse_tmr()
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (71693) PING: From 254.128.0.0 PPP Interface icmp_seq=9 timeout
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (71703) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
E (71843) main: Server Connection lost.....18 Second
I (71843) PING: PPP Interface key 4:

I (71843) PING: ppp: 0.0.0.0

I (71843) PING: STA Interface key 3:

I (71843) PING: sta: 0.0.0.0

I (71853) PING: ETH Interface key 2:

I (71853) PING: eth: 0.0.0.0

I (71853) PING: Done listing network interfaces
I (71863) PING: DNS lookup success
I (71863) PING: target_addr.type=46
I (71873) PING: target_addr=8.8.8.8
I (71873) PING: initialize_ping success for GSM
dns_tmr: dns_check_entries
dns_send: dns_servers[2] "csms.arconaconsultancy.com": request
pbuf_alloc(length=44)
pbuf_alloc(length=44) == 0x3ffebcd4
sending DNS request ID 60576 for name "csms.arconaconsultancy.com" to server 2
udp_send
ip4_route: No route to 114.114.114.114
udp_send: No route to 114.114.114.114
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
dns_send returned error: Routing problem.
etharp_timer
dhcp_coarse_tmr()
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (72713) PING: From 254.128.0.0 PPP Interface icmp_seq=10 timeout
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (72723) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
E (72883) main: Server Connection lost.....19 Second
I (72883) PING: PPP Interface key 4:

I (72883) PING: ppp: 0.0.0.0

I (72883) PING: STA Interface key 3:

I (72883) PING: sta: 0.0.0.0

I (72893) PING: ETH Interface key 2:

I (72893) PING: eth: 0.0.0.0

I (72893) PING: Done listing network interfaces
I (72903) PING: DNS lookup success
I (72903) PING: target_addr.type=46
I (72913) PING: target_addr=8.8.8.8
I (72913) PING: initialize_ping success for GSM
dns_tmr: dns_check_entries
etharp_timer
dhcp_coarse_tmr()
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (73733) PING: From 254.128.0.0 PPP Interface icmp_seq=11 timeout
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (73743) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
E (73923) main: Server Connection lost.....20 Second
I (73923) PING: PPP Interface key 4:

I (73923) PING: ppp: 0.0.0.0

I (73923) PING: STA Interface key 3:

I (73923) PING: sta: 0.0.0.0

I (73933) PING: ETH Interface key 2:

I (73933) PING: eth: 0.0.0.0

I (73933) PING: Done listing network interfaces
I (73943) PING: DNS lookup success
I (73943) PING: target_addr.type=46
I (73953) PING: target_addr=8.8.8.8
I (73953) PING: initialize_ping success for GSM
dns_tmr: dns_check_entries
dns_send: dns_servers[2] "csms.arconaconsultancy.com": request
pbuf_alloc(length=44)
pbuf_alloc(length=44) == 0x3ffebcd4
sending DNS request ID 60576 for name "csms.arconaconsultancy.com" to server 2
udp_send
ip4_route: No route to 114.114.114.114
udp_send: No route to 114.114.114.114
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
dns_send returned error: Routing problem.
etharp_timer
dhcp_coarse_tmr()
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (74763) PING: From 254.128.0.0 PPP Interface icmp_seq=12 timeout
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (74773) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
I (74923) uart_events: **************** CONNECTOR ID: 0 *****************
W (74923) app_database: ************************************************************
W (74923) app_database: SOC : 0 %, VRMS : 0 V, IRMS : 0 A, Power : 0.00 W
W (74933) app_database: Current L1 : 0.00 A, L2 : 0.00 A, L3 : 0.00 A
W (74933) app_database: Voltage L1 : 0.00 V, L2 : 0.00 V, L3 : 0.00 V
W (74943) app_database: AC Energy : 0.00 Wh
W (74953) app_database: RSSI GSM : 25 , WiFi : -91
W (74953) app_database: RFID Status : 0
W (74963) app_database: Fault : 0
W (74963) app_database: OCPP Fault : 314420
W (74973) app_database: EV Mac addr : 0
W (74973) app_database: Gun Temperature 0.00 C
W (74983) app_database: EV demand current : 0
W (74983) app_database: EV demand voltage 0
W (74993) app_database: ************************************************************
I (74993) uart_events: **************** CONNECTOR ID: 1 *****************
W (75003) app_database: ************************************************************
W (75013) app_database: SOC : 0 %, VRMS : 0 V, IRMS : 0 A, Power : 0.00 W
W (75023) app_database: Current L1 : 0.00 A, L2 : 0.00 A, L3 : 0.00 A
W (75023) app_database: Voltage L1 : 0.00 V, L2 : 0.00 V, L3 : 0.00 V
W (75033) app_database: AC Energy : 0.00 Wh
W (75043) app_database: RSSI GSM : 25 , WiFi : -91
W (75043) app_database: RFID Status : 0
W (75053) app_database: Fault : 5
W (75053) app_database: OCPP Fault : 8002
W (75053) app_database: EV Mac addr : 0
W (75063) app_database: Gun Temperature 595.85 C
W (75063) app_database: EV demand current : 0
W (75073) app_database: EV demand voltage 0
E (74963) main: Server Connection lost.....21 Second
W (75083) app_database: ************************************************************
I (75093) uart_events: **************** CONNECTOR ID: 2 *****************
W (75103) app_database: ************************************************************
W (75103) app_database: SOC : 0 %, VRMS : 0 V, IRMS : 0 A, Power : 0.00 W
W (75113) app_database: Current L1 : 0.00 A, L2 : 0.00 A, L3 : 0.00 A
W (75123) app_database: Voltage L1 : 0.00 V, L2 : 0.00 V, L3 : 0.00 V
W (75133) app_database: AC Energy : 0.00 Wh
W (75133) app_database: RSSI GSM : 25 , WiFi : -91
W (75143) app_database: RFID Status : 0
W (75143) app_database: Fault : 5
W (75153) app_database: OCPP Fault : 8002
W (75153) app_database: EV Mac addr : 0
W (75153) app_database: Gun Temperature 595.85 C
W (75163) app_database: EV demand current : 0
W (75173) app_database: EV demand voltage 0
W (75173) app_database: ************************************************************
I (75093) PING: PPP Interface key 4:

I (75183) PING: ppp: 0.0.0.0

I (75203) PING: STA Interface key 3:

I (75203) PING: sta: 0.0.0.0

I (75203) PING: ETH Interface key 2:

I (75203) PING: eth: 0.0.0.0

I (75213) PING: Done listing network interfaces
I (75213) PING: DNS lookup success
I (75213) PING: target_addr.type=46
I (75223) PING: target_addr=8.8.8.8
I (75223) PING: initialize_ping success for GSM
E (75233) main: ********* [HEAP MEMORY REMAINING]: 90640 *********
W (75243) main: *********************** NETWORK INFO ***********************
W (75243) main: Ethernet Status: Not Detected
W (75253) main: Internet Status: Disconnected
W (75253) main: Server Status: Disconnected
W (75263) main: ************************************************************
dns_tmr: dns_check_entries
etharp_timer
dhcp_coarse_tmr()
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (75783) PING: From 254.128.0.0 PPP Interface icmp_seq=13 timeout
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (75793) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
E (76273) main: Server Connection lost.....22 Second
I (76273) PING: PPP Interface key 4:

I (76273) PING: ppp: 0.0.0.0

I (76273) PING: STA Interface key 3:

I (76273) PING: sta: 0.0.0.0

I (76283) PING: ETH Interface key 2:

I (76283) PING: eth: 0.0.0.0

I (76283) PING: Done listing network interfaces
I (76293) PING: DNS lookup success
I (76293) PING: target_addr.type=46
I (76313) PING: target_addr=8.8.8.8
I (76313) PING: initialize_ping success for GSM
dns_tmr: dns_check_entries
etharp_timer
dhcp_coarse_tmr()
pbuf_alloc(length=49)
pbuf_alloc(length=49) == 0x3ffebcd4
pbuf_alloc(length=14)
pbuf_alloc(length=14) == 0x3ffebd1c
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
pbuf_alloc(length=44)
pbuf_alloc(length=44) == 0x3ffebcd4
pbuf_remove_header: old 0x3ffebd2c new 0x3ffebd3a (14)
pbuf_remove_header: old 0x3ffebd3a new 0x3ffebd3c (2)
ip6_input: packet accepted on interface XX
ip6_input: packet not for us.
ip6_forward: not forwarding link-local address.
pbuf_free(0x3ffebd1c)
pbuf_free: deallocating 0x3ffebd1c
pbuf_free(0x3ffebcd4)
pbuf_free: deallocating 0x3ffebcd4
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (76803) PING: From 254.128.0.0 PPP Interface icmp_seq=14 timeout
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (76813) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0
E (77313) main: Server Connection lost.....23 Second
I (77313) PING: PPP Interface key 4:

I (77313) PING: ppp: 0.0.0.0

I (77313) PING: STA Interface key 3:

I (77313) PING: sta: 0.0.0.0

I (77323) PING: ETH Interface key 2:

I (77323) PING: eth: 0.0.0.0

I (77323) PING: Done listing network interfaces
I (77333) PING: DNS lookup success
I (77333) PING: target_addr.type=46
I (77343) PING: target_addr=8.8.8.8
I (77343) PING: initialize_ping success for GSM
dns_tmr: dns_check_entries
dns_check_entry: "csms.arconaconsultancy.com": timeout
E (77463) esp-tls: couldn't get hostname for :csms.arconaconsultancy.com: getaddrinfo() returns 202, addrinfo=0x0
E (77463) transport_base: Failed to open a new connection: 32769
E (77483) transport_ws: Error connecting to host csms.arconaconsultancy.com:8888
I (77483) ocpp-client: WEBSOCKET_EVENT_DISCONNECTED
etharp_timer
dhcp_coarse_tmr()
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=0x0
lwip_recvfromUDP/RAW: buf == NULL, error is "Timeout."!
W (77823) PING: From 254.128.0.0 PPP Interface icmp_seq=15 timeout
lwip_sendto: invalid addresslwip_getsockopt(54, SOL_SOCKET, SO_ERROR) = 0
E (77833) ping_sock: send error=0
lwip_recvfrom(54, 0x3ffbad20, 64, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=0x0

@espressif-bot espressif-bot added the Status: Opened Issue is new label Apr 29, 2024
@github-actions github-actions bot changed the title ESP-IDF v5.2.1 LWIP PPP driver didn't work with IPv6 ESP-IDF v5.2.1 LWIP PPP driver didn't work with IPv6 (IDFGH-12730) Apr 29, 2024
@kanjiviroja1991
Copy link
Author

I have already enabled local link for ipv6:

        **modem_netif_adapter = esp_modem_netif_setup(dte);
        if ((NULL != esp_netif) && (NULL != modem_netif_adapter))
        {
            esp_modem_netif_set_default_handlers(modem_netif_adapter, esp_netif);
            /* attach the modem to the network interface */
            err = esp_netif_attach(esp_netif, modem_netif_adapter);
            ESP_LOGE(TAG,"esp_netif_attach, err: %x ",(int)err);
            esp_netif_create_ip6_linklocal(esp_netif);
        }**

SDK CONFIG:

CONFIG_LWIP_AUTOIP is not set

CONFIG_LWIP_IPV4=y
CONFIG_LWIP_IPV6=y
CONFIG_LWIP_IPV6_AUTOCONFIG=y
CONFIG_LWIP_IPV6_NUM_ADDRESSES=3
CONFIG_LWIP_IPV6_FORWARD=y
CONFIG_LWIP_IPV6_RDNSS_MAX_DNS_SERVERS=0
CONFIG_LWIP_IPV6_DHCP6=y
CONFIG_LWIP_NETIF_STATUS_CALLBACK=y
CONFIG_LWIP_NETIF_LOOPBACK=y
CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8

PPP CONFIG:
CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072
CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y

CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set

CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF
CONFIG_LWIP_PPP_SUPPORT=y
CONFIG_LWIP_PPP_ENABLE_IPV6=y
CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3
CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=3
CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT=y
CONFIG_LWIP_PPP_PAP_SUPPORT=y

CONFIG_LWIP_PPP_CHAP_SUPPORT is not set

CONFIG_LWIP_PPP_MSCHAP_SUPPORT is not set

CONFIG_LWIP_PPP_MPPE_SUPPORT is not set

CONFIG_LWIP_ENABLE_LCP_ECHO is not set

CONFIG_LWIP_PPP_DEBUG_ON is not set

CONFIG_LWIP_SLIP_SUPPORT is not set

@kanjiviroja1991
Copy link
Author

@espressif-bot , Is there any news on this matter? Simply use IPV6 while connecting over PPP to replicate the issue; following that, we receive an IPV6 address, but the internet remains inaccessible.

@kanjiviroja1991
Copy link
Author

@espressif-abhikroy , please find my sdkconfig file that might can help you to debug this issue.
Uploading sdkconfig - Copy.txt…

@espressif-abhikroy
Copy link
Collaborator

@kanjiviroja1991 Can you please provide an example code with which we can reproduce the issue?

@kanjiviroja1991
Copy link
Author

@espressif-abhikroy , Yes, I will provide example code for testing. Do you have GSM module?

@espressif-abhikroy
Copy link
Collaborator

@kanjiviroja1991 Yes I do.

@kanjiviroja1991
Copy link
Author

PPP_CodeBase.zip

Please configure as per below list of thing:

  1. Configure UART for GSM Modem using menuconfig
  2. Modem code (AT command some of modified based on N58 NEOWAY module)
  3. Set appropriate APN using this object gsm_config_gw gsm_config;
  4. Use PDP context with IPV6 only.

@kanjiviroja1991
Copy link
Author

@espressif-abhikroy , Can you reproduce the issue at your end? If you need any help then please ping me.

@kanjiviroja1991
Copy link
Author

@espressif-abhikroy sir, Do we have any update on this issue?, A lot of complaints have been made recently about some SIM cards not working since the SIM service provides IPV6 but driver unable creating an internet gateway bridge, which is a major problem for our product development.

@AxelLin
Copy link
Contributor

AxelLin commented May 22, 2024

@kanjiviroja1991 Which SIM card/carrier has this issue?

@kanjiviroja1991
Copy link
Author

@AxelLin , It functions properly if the SIM service offers IPV4. However, certain SIM service providers—like JIO in India—only permit IPV6. To replicate this problem on all SIM services, simply attempt to establish a PPP link that uses IPV6 exclusively while in a PDP context.

@kanjiviroja1991
Copy link
Author

@david-cermak @espressif-bot , Do we have any update on this issue?

@david-cermak
Copy link
Collaborator

Hi @kanjiviroja1991

If I understand the problem correctly, you're correctly getting the LL address after the IP6CP negotiation, but are not able to access internet, as that address is not routable?

Could you please just enable CONFIG_LWIP_PPP_DEBUG_ON and share the log after getting the link local addresses?
After that point, it's probably up to your provider, how you can obtain routable IPv6 address, that could be either SLAAC, DHCPv6 stateless (in race races maybe even stateful). Could you please check with your operator which one is is?

Note that what you've been doing in #13713 (comment) won't help, as you've already gotten one LL address and this API won't work for Point to point netifs.

I think I'm able to reproduce the problem, or a similar one (with O2 in CZ); I'm getting supposedly corrupted RA/solicitation packets which are just dropped in lwip. Interestingly the local link communication works seamlessly. Could you please share the logs, just before the IP6CP protocol negotiation, with IPV6-DEBUG enabled, so I could tell if you're hit by the same issue?

To reduce some noise you can also try to disable PPP_IPV4_SUPPORT (directly in ppp_opts.h)

@kanjiviroja1991
Copy link
Author

kanjiviroja1991 commented Jun 2, 2024

Hi @david-cermak , Of course, I will share the logs in accordance with the recommended debug log requirements for debugging.

According to what we have seen, this problem occurred when connecting using IPV6 with all SIM providers. The inability to determine the proper path for data routing through incoming/outgoing message handling may be the cause of several routing-related issues along with DNS issue. This is designed specifically for IPV4 and automatically assigns a gateway address and DNS so that users can access the internet.

@kanjiviroja1991
Copy link
Author

Hi @david-cermak ,

If we disabled PPP_IPV4_SUPPORT direct in ppp_opts.h that generate error due to this api belongs to V4 context => ppp_set_usepeerdns(ppp_obj->ppp, 1);

Here you go debug log file:
teraterm-ipv6-issue_A.log

Please ping me if you require any further logs or anything else.

Thanks & Regards,
Kanji.

@david-cermak
Copy link
Collaborator

Thanks for sharing the log, looks like the same issue on my end, also seeing this weird packet on PPP netif:

[2024-06-03 12:38:54.148] ip6_input: packet accepted on interface pp
[2024-06-03 12:38:54.148] pbuf_remove_header: old 0x3ffb9e6a new 0x3ffb9e92 (40)
[2024-06-03 12:38:54.148] ip6_input: 
[2024-06-03 12:38:54.148] IPv6 header:
[2024-06-03 12:38:54.148] +-------------------------------+
[2024-06-03 12:38:54.163] |  8 |   96  |        49073     | (ver, class, flow)
[2024-06-03 12:38:54.163] +-------------------------------+
[2024-06-03 12:38:54.163] |     16448     |   85  |   80  | (plen, nexth, hopl)
[2024-06-03 12:38:54.163] +-------------------------------+
[2024-06-03 12:38:54.163] |     0 |     0 |     0 |     0 | (src)
[2024-06-03 12:38:54.179] |   501 |     0 |     0 |   640 |
[2024-06-03 12:38:54.179] +-------------------------------+
[2024-06-03 12:38:54.179] |   304 |  4040 |  ffff |  ffff | (dest)
[2024-06-03 12:38:54.179] |  ffff |  ffff |     0 |     0 |
[2024-06-03 12:38:54.195] +-------------------------------+

If we disabled PPP_IPV4_SUPPORT direct in ppp_opts.h that generate error due to this api belongs to V4 context => ppp_set_usepeerdns(ppp_obj->ppp, 1);

oh, sorry, need to comment this out. I'll prepare a patch, I think it' would be useful to disable IPv4 (at least on PPP level)

Please ping me if you require any further logs or anything else.

As mentioned above, I'd like to know how are you supposed to acquire a routable address from your provider (probably something like DHCPv6 relay), but I think you need to check with your operator.

@kanjiviroja1991
Copy link
Author

@david-cermak , Since I have already tested a number of methods, including using the same modem to connect to a laptop and browse the internet to retrieve IPV6, I can say with certainty that the SIM service is operating as intended. Other than this, there isn't a problem. The modem technical team has already given me a lot more support for the same problem.

I used a Vodafone SIM/JIO SIM/AIRTEL SIM card, which offers service everywhere, I don't think there was a problem on their end.

**Here you can see PPP link with N58 using JIO SIM in my laptop, I am able to access internet service without any issues:
PPP adapter N58_RJIO:

Connection-specific DNS Suffix . :
IPv6 Address. . . . . . . . . . . : 2409:40c1:1b:271b:8496:3d47:b1f0:7e5c
Link-local IPv6 Address . . . . . : fe80::8496:3d47:b1f0:7e5c%50
Default Gateway . . . . . . . . . : fe80::8ae9:a4ff:fe13:48a4%50**

@david-cermak
Copy link
Collaborator

Yes, there's very likely (at least) one problem on the ESP side, but I just like to know which method your operator use. Is it SLAAC only or DHCPv6 (stateless or statefull)? Or, if it's running on your laptop, are you using radvd with dhcp6c or without it?

The reason I'm asking is that, in case of DHCPv6 stateless configuration (the most common method IMO), you do have to start the client explicitly with dhcp6_enable_stateless() (it's not enough to enable it in menuconfig)

https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/lwip.html#dhcpv6

@kanjiviroja1991
Copy link
Author

Here you go of some output on windows prompt:
C:\Users\admin>sc query dhcp

SERVICE_NAME: dhcp
TYPE : 30 WIN32
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

C:\Users\admin>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : DESKTOP-4VT06RD
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : iballbatonwifi.com

Ethernet adapter Ethernet:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek PCIe GbE Family Controller
Physical Address. . . . . . . . . : 30-D0-42-1D-C2-CB
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Local Area Connection* 10:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #2
Physical Address. . . . . . . . . : 76-12-B3-94-BB-B5
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Local Area Connection* 12:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #3
Physical Address. . . . . . . . . : 86-12-B3-94-BB-B5
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Wi-Fi:

Connection-specific DNS Suffix . : iballbatonwifi.com
Description . . . . . . . . . . . : Qualcomm QCA9377 802.11ac Wireless Adapter
Physical Address. . . . . . . . . : 76-12-16-94-D8-19
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::c94a:4554:e4cb:8049%4(Preferred)
IPv4 Address. . . . . . . . . . . : 192.169.0.203(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : 03 June 2024 06:03:42 PM
Lease Expires . . . . . . . . . . : 05 June 2024 11:18:54 AM
Default Gateway . . . . . . . . . : 192.169.0.1
DHCP Server . . . . . . . . . . . : 192.169.0.1
DHCPv6 IAID . . . . . . . . . . . : 74846742
DHCPv6 Client DUID. . . . . . . . : 00-03-00-01-76-12-16-94-D8-19
DNS Servers . . . . . . . . . . . : 192.169.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled

C:\Users\admin>

@kanjiviroja1991
Copy link
Author

@david-cermak , I am using windows system.

Windows and DHCP:
On a Windows system, the equivalent service for handling IPv6 DHCP client functionality is still managed by the DHCP Client service. Windows does not use radvd and dhcp6c; instead, it integrates the necessary IPv6 functionality into its own DHCP Client service.

The reason I'm asking is that, in case of DHCPv6 stateless configuration (the most common method IMO), you do have to start the client explicitly with dhcp6_enable_stateless() (it's not enough to enable it in menuconfig)
==> I have already tested this thing in past it didn't work at all. I have explicity enabled using this api dhcp6_enable_stateless().

@david-cermak
Copy link
Collaborator

okay, let's assume it's a stateless DHCPv6.

Found one bug with ip6 autoconfig, it's not correctly set to true for point to point interfaces if CONFIG_LWIP_IPV6_AUTOCONFIG=y.
I'll create a patch to fix it. Workaround is to set it manually after staring the netif

  netif.ip6_autoconfig_enabled = 1;  // this is lwip netif structure

@kanjiviroja1991
Copy link
Author

@david-cermak , You're correct—there was a problem with the IPv6 autoconfig flag on the P2P interface. I tested the aforementioned changes, and I was able to receive global IPV6 and correctly ping.

In order to obtain appropriate resolution for modem functioning with IPv6, it would be preferable if this bug fixes were included in the next esp idf release.

Many thanks for the prompt resolution and update, @david-cermak .

Best Regards,
Kanji.

@david-cermak
Copy link
Collaborator

Here's the patch fixing the PPP autoconfig. After applying it you should be able to receive a global IPv6 address and access the internet. DNS servers should be provided via DHCPv6 or directly within RA.
fix-esp_netif-Fix-missing-IPv6-autoconfig-for-PPP.txt

I'll probably also add one Kconfig option to disable IPCP in PPP for users of IPv6 only networks.

There's still one cosmetic bug in lwip, incorrectly displaying the IPv6 headers from PPP netifs, as noted before:

[2024-06-03 12:38:54.148] IPv6 header:
[2024-06-03 12:38:54.148] +-------------------------------+
[2024-06-03 12:38:54.163] |  8 |   96  |        49073     | (ver, class, flow)
[2024-06-03 12:38:54.163] +-------------------------------+
[2024-06-03 12:38:54.163] |     16448     |   85  |   80  | (plen, nexth, hopl)
[2024-06-03 12:38:54.163] +-------------------------------+
[2024-06-03 12:38:54.163] |     0 |     0 |     0 |     0 | (src)
[2024-06-03 12:38:54.179] |   501 |     0 |     0 |   640 |
[2024-06-03 12:38:54.179] +-------------------------------+
[2024-06-03 12:38:54.179] |   304 |  4040 |  ffff |  ffff | (dest)
[2024-06-03 12:38:54.179] |  ffff |  ffff |     0 |     0 |
[2024-06-03 12:38:54.195] +-------------------------------+

@kanjiviroja1991
Copy link
Author

@david-cermak , As you have created patch with specific location didn't work.

I'll probably also add one Kconfig option to disable IPCP in PPP for users of IPv6 only networks.
=> PPP called with IPV4V6 so that case it might doesn't work if you disabled IPCP.

@david-cermak
Copy link
Collaborator

@kanjiviroja1991 Are you saying that the patch posted #13713 (comment) doesn't work? Like you're not getting the global address after applying it?

Or, that the patch doesn't work in IPv4+IPv6 scenario? or without IPCP?

@kanjiviroja1991
Copy link
Author

@david-cermak ,I tested your fix, and it functioned as intended. Prior to that, it wasn't working because of my code-mixing modifications.

I'm still not sure if ND6 needs to be set in flag or not(check this config -> ESP_NETIF_INHERENT_DEFAULT_PPP())
netif->flags |= NETIF_FLAG_MLD6; //For PPP default config doesn't enable this flag

@david-cermak
Copy link
Collaborator

Thanks for double checking!

I'm still not sure if ND6 needs to be set in flag or not(check this config -> ESP_NETIF_INHERENT_DEFAULT_PPP())

No need to set any other flags; Note that ESP_NETIF_INHERENT_DEFAULT_PPP() belongs to esp_netif (IDF convenient wrapper around lwip), which only has these values:

typedef enum esp_netif_flags {
ESP_NETIF_DHCP_CLIENT = 1 << 0,
ESP_NETIF_DHCP_SERVER = 1 << 1,
ESP_NETIF_FLAG_AUTOUP = 1 << 2,
ESP_NETIF_FLAG_GARP = 1 << 3,
ESP_NETIF_FLAG_EVENT_IP_MODIFIED = 1 << 4,
ESP_NETIF_FLAG_IS_PPP = 1 << 5,
ESP_NETIF_FLAG_IS_BRIDGE = 1 << 6,
ESP_NETIF_FLAG_MLDV6_REPORT = 1 << 7,
} esp_netif_flags_t;

(so when using the default IDF configs, the flags of lwip netifs are set accordingly)

@espressif-bot espressif-bot added Status: In Progress Work is in progress and removed Status: Opened Issue is new labels Jun 6, 2024
@espressif-bot espressif-bot added Status: Reviewing Issue is being reviewed and removed Status: In Progress Work is in progress labels Jun 24, 2024
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Reviewing Issue is being reviewed labels Jul 4, 2024
@AxelLin
Copy link
Contributor

AxelLin commented Jul 31, 2024

@david-cermak v5.1, v5.2, and v5.3 branches still need fix.

@AxelLin
Copy link
Contributor

AxelLin commented Aug 26, 2024

Yes, there's very likely (at least) one problem on the ESP side, but I just like to know which method your operator use. Is it SLAAC only or DHCPv6 (stateless or statefull)? Or, if it's running on your laptop, are you using radvd with dhcp6c or without it?

The reason I'm asking is that, in case of DHCPv6 stateless configuration (the most common method IMO), you do have to start the client explicitly with dhcp6_enable_stateless() (it's not enough to enable it in menuconfig)

https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/lwip.html#dhcpv6

Hi @david-cermak
The dhcp6_enable_stateless() takes struct netif * as argument.
Most esp-idf application code uses esp_netif_t * as argement, and cannot access the struct netif *.
I'm wondering if it's necessary to provide an esp_netif API for dhcp6_enable_stateless()?
Also, is it safe to call dhcp6_enable_stateless() in non-tcpip tasks?

If possible, would you also update example code for IPV6 with SLAAC and DHCPv6 use cases?

@AxelLin
Copy link
Contributor

AxelLin commented Aug 26, 2024

I have already enabled local link for ipv6:

        **modem_netif_adapter = esp_modem_netif_setup(dte);
        if ((NULL != esp_netif) && (NULL != modem_netif_adapter))
        {
            esp_modem_netif_set_default_handlers(modem_netif_adapter, esp_netif);
            /* attach the modem to the network interface */
            err = esp_netif_attach(esp_netif, modem_netif_adapter);
            ESP_LOGE(TAG,"esp_netif_attach, err: %x ",(int)err);
            esp_netif_create_ip6_linklocal(esp_netif);
        }**

Hi @david-cermak
I reference the pppos_client example code: (which does not call esp_netif_create_ip6_linklocal())
I do NOT call esp_netif_create_ip6_linklocal() but I still got below if CONFIG_LWIP_PPP_ENABLE_IPV6=y:
Got IPv6 address: fe80:0000:0000:0000:7931:1004:a491:eca0, type: ESP_IP6_ADDR_IS_LINK_LOCAL.
So I'm confused if it's necessary to call esp_netif_create_ip6_linklocal() for PPP interface?

@david-cermak
Copy link
Collaborator

About IPv6 LL:

  • No need to call esp_netif_create_ip6_linklocal() for PPP interfaces. The address is acquired differently, during IPV6CP handshake (which is controlled by CONFIG_LWIP_PPP_ENABLE_IPV6)

About DHCPv6:

  • Yes, we're planning to create an IDF/esp_netif API to start the DHCPv6 server conveniently (and in a thread safe way, and update the example).

@AxelLin
Copy link
Contributor

AxelLin commented Aug 28, 2024

Hi @david-cermak

When I check CONFIG_ESP_NETIF_SET_DNS_PER_DEFAULT_NETIF changes
I found the ESPIP_TO_IP and IP_TO_ESPIP macros are useful for application code.
Would you consider move them to a header file so application code can use it?

@AxelLin
Copy link
Contributor

AxelLin commented Aug 28, 2024

About DHCPv6:

  • Yes, we're planning to create an IDF/esp_netif API to start the DHCPv6 server conveniently (and in a thread safe way, and update the example).

Current problem is I cannot call dhcp6_enable_stateless() from application code
because it needs "struct netif *" but I cannot access mynetif->lwip_netif:

error: invalid use of incomplete typedef 'esp_netif_t' {aka 'struct esp_netif_obj'}
1889 | dhcp6_enable_stateless(mynetif->lwip_netif);

I think this needs fix first.

@david-cermak
Copy link
Collaborator

About the dhcp server in lwip: a bit clumsy but still all public API:

#include "esp_netif_net_stack.h"
...
    struct netif* netif = esp_netif_get_netif_impl(esp_netif);
    dhcp6_enable_stateless(netif);

(and if you really want to play by the book you can run it in the lwip context using esp_netif_tcpip_exec() callbacks)


I found the ESPIP_TO_IP and IP_TO_ESPIP macros are useful for application code.

A very good point, thanks for suggesting! I was thinking of making them internal functions at least (instead of macros), but making them public makes more sense.

@AxelLin
Copy link
Contributor

AxelLin commented Aug 29, 2024

The reason I'm asking is that, in case of DHCPv6 stateless configuration (the most common method IMO), you do have to start the client explicitly with dhcp6_enable_stateless() (it's not enough to enable it in menuconfig)

https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/lwip.html#dhcpv6

Hi @david-cermak
Is it required to call dhcp6_enable_stateless(netif) for PPP interface?
esp_netif_get_netif_impl() returns NULL for PPP netif.

@david-cermak
Copy link
Collaborator

Is it required to call dhcp6_enable_stateless(netif) for PPP interface?

This depends on your cellular provider, how the DNS server info is communicated. For IPv6 it could be either via RA or using DHCPv6 (less common from what I hear).

esp_netif_get_netif_impl() returns NULL for PPP netif.

The restriction's been lifted in d707161

but point taken on needing a proper API to start it, will prioritize.

@AxelLin
Copy link
Contributor

AxelLin commented Nov 4, 2024

Hi @david-cermak

I'm testing PDP-type=IPV6 case, with below settings:
CONFIG_LWIP_IPV6_AUTOCONFIG=y
CONFIG_LWIP_IPV6_RDNSS_MAX_DNS_SERVERS=2
Testing with v5.2.3-262-g2b35c55820.

Once PPP connected and got IP6:
I got IP_EVENT_GOT_IP6 twice, one for link_local and one for global address.
esp_netif_get_all_ip6, shows
IPV6: fe80:0000:0000:0000:f0ff:1630:aab4:f587 (LINK_LOCAL)
IPV6: 2001:b400:e40e:8bd7:f0ff:1630:aab4:f587 (GLOBAL)
I can reach internet and ping 2001:4860:4860::8888 . (Seems work fine)

However, if I make the PPP disconnect and then reconnect.

I got IP_EVENT_GOT_IP6 twice, one for link_local and one for global address.
esp_netif_get_all_ip6, shows
IPV6: fe80:0000:0000:0000:a9c9:0445:adb7:5794 (LINK_LOCAL)
IPV6: 2001:b400:e40e:8bd7:f0ff:1630:aab4:f587 (GLOBAL)
IPV6: 2001:b400:e40e:9215:a9c9:0445:adb7:5794 (GLOBAL)

It's strange the previous global address is still returned by esp_netif_get_all_ip6.
The key issue is then I cannot reach internet.
i.e. ping 2001:4860:4860::8888 fails after disconnect and reconnect PPP.

PS. I also test PDP-type=IPV4V6 case
and I observe the same behavior for IPV6 (2 global address after disconect and reconnect).
I cannot ping 2001:4860:4860::8888 but ping IPv4 address 8.8.8.8 still works after reconnect PPP.

Do you have any idea about this issue?

@david-cermak
Copy link
Collaborator

Hi @AxelLin

Yes, this is an issue in IDF/lwip, we currently have no way of recycling/invalidating older IPv6 records. You can only workaround it by increasing number of IPv6 addresses or clean out the global IPv6 address on PPP disconnect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

5 participants