Hi Ivan, You need to explicitly send a router solicitation to the network in other to get the full IPv6 Address. The function to call is nd6_send_rs() in n6.c . However, this is a static function and you may have to create a wrapper to call it. As of yesterday, LWIP 2.1.3 was released and they now send RS automatically for IPv6. Hope this helps as I had the same issue 9 months ago.
Edman From: lwip-users <lwip-users-bounces+edmangzayzay=eaton....@nongnu.org> On Behalf Of Jiang Peng Sent: Wednesday, November 10, 2021 6:40 PM To: lwip-users@nongnu.org Subject: [EXTERNAL] [lwip-users] lwip IPV6 PPP only get link local address and cannot connect to server Hi everyone, I have a project that is running LwIP V2.1.2. The stack is LwIP on top of BG96 cellular modem. It works fine for IPV4, but when I enable IPV6, I only get IPV6 link local address, and cannot get real IPV6 address, therefore, I cannot connect to my server. The LwIP comes from ST cellular expansion package. I enable the log, and it got local and remote LL address, but after that never got any real address, and cannot connect to my server. thanks a lot for any hints or suggestions. thanks Ivan ////////////////////////////////////////////////////////////////////////////logs ////////////////////////////////////////////////////////////////////// 05.535 atcmd BG96:Activate PDN (user cid = 1, modem cid = 1) 05.542 atcmd BG96:MODEM SWITCHES TO DATA MODE 05.542 atcmd ATCore:<<< DATA MODE SELECTED >>> ppposif_client_confignetif: netmask of interface set to 255.255.255.255 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 client ppp_notify_phase_cb: PPP_PHASE_DEADppposif_client_dead: DC_SERVICE_OFF 06.035 iot_cell =====>CST_notif_callback (Data Cache event=0) ppp_connect[0]: holdoff=0 ppp phase changed[0]: phase=3 client ppp_notify_phase_cb: PPP_PHASE_INITIALIZEpppos_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=0 pppos_write[0]: len=24 ppp_start[0]: finished pppos_input[0]: got 61 bytes pbuf_remove_header: old 0x24016058 new 0x2401605a (2) No auth is possible lcp_reqci: returning CONFREJ.pppos_write[0]: len=13 tcpip_inpkt: PACKET 0x24016258/0x2400eae8 pppos_input[0]: got 7 bytes pbuf_remove_header: old 0x24016058 new 0x2401605a (2) tcpip_inpkt: PACKET 0x24016258/0x2400eae8 pppos_input[0]: got 1 bytes tcpip_inpkt: PACKET 0x24016258/0x2400eae8 pppos_input[0]: got 44 bytes pbuf_remove_header: old 0x24016058 new 0x2401605a (2) lcp_reqci: returning CONFACK.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 07.031 iot_cell =====>CST_notif_callback (Data Cache event=2) 07.128 iot_cell =====>CST_notif_callback (Data Cache event=0) 07.128 iot_cell =====>CST_notif_callback (Data Cache event=1) 07.128 iot_cell -----> New State: CST_PPP_CONFIG_ON_GOING_STATE <----- 07.128 iot_cell ============ CST_cellular_service_task : autom_event = no event mtd_init.c +301 StartIoTTask Modem state is 18, ST Safe found ppp phase changed[0]: phase=9 pppos_input[0]: got 21 bytes ipv6cp: received interface identifier (fe80::1525:f2b1:ebca:3352) (ACK) ipv6cp: returning Configure-ACKpppos_write[0]: len=18 tcpip_inpkt: PACKET 0x24016258/0x2400eae8 pppos_input[0]: got 20 bytes pbuf_remove_header: old 0x24016058 new 0x2401605a (2) local LL address fe80::d823:7001:beb5:b051pppos_write[0]: len=18 tcpip_inpkt: PACKET 0x24016258/0x2400eae8 pppos_input[0]: got 1 bytes tcpip_inpkt: PACKET 0x24016258/0x2400eae8 pppos_input[0]: got 19 bytes pbuf_remove_header: old 0x24016058 new 0x2401605a (2) ipv6cp: upnetif_ip6_addr_set: netif address being changed netif: IPv6 address 0 of interface pp set to FE80::D823:7001:BEB5:B051/0x0hx netif_ip6_addr_set_state: netif address state being changed netif: IPv6 address 0 of interface pp set to FE80::D823:7001:BEB5:B051/0x0hx sif6up[0]: err_code=0 our_ipaddr = 0.0.0.0 his_ipaddr = 0.0.0.0 netmask = 255.255.255.255 dns1 = 8.8.8.8 dns2 = 8.8.4.4 our6_ipaddr = FE80::D823:7001:BEB5:B051 local LL address fe80::d823:7001:beb5:b051 remote LL address fe80::1525:f2b1:ebca:3352 ppp phase changed[0]: phase=10 -- Jiang Peng
_______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users