This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Date-Time with IPv6

Hi,

OS: Windows 10
Editor: SEGGER Embedded Studio for ARM (Nordic Edition) V5.10d (64-bit)
nrfjprog version: 10.12.1
JLinkARM.dll version: 6.88a
nRF Connect SDK version: 1.4.2
nRF9160 modem firmware version: 1.2.3

I have enabled IPv6 in my firmware and also APN is set to use IPv6. That's making the Date-Time library not working when getting time from NTP servers. The getaddrinfo() is failing there.

Is there any existing way to make the Date-Time library work with IPv6?

Regards,
Tero

Parents
  • I did these changes to make it work temporarily:

    nrf/lib/date_time/Kconfig

    config DATE_TIME_IPV6
    	bool "Use IPv6"
    	default n

    nrf/lib/date_time/date_time.c

    	hints.ai_family = AF_INET;    // REPLACED THIS WITH BELOW
    
    	if (IS_ENABLED(CONFIG_DATE_TIME_IPV6)) {
    		hints.ai_family = AF_INET6;
    	} else {
    		hints.ai_family = AF_INET;
    	}

    And then enabled that IPv6 for Date-Time library with CONFIG_DATE_TIME_IPV6=y in application.

Reply
  • I did these changes to make it work temporarily:

    nrf/lib/date_time/Kconfig

    config DATE_TIME_IPV6
    	bool "Use IPv6"
    	default n

    nrf/lib/date_time/date_time.c

    	hints.ai_family = AF_INET;    // REPLACED THIS WITH BELOW
    
    	if (IS_ENABLED(CONFIG_DATE_TIME_IPV6)) {
    		hints.ai_family = AF_INET6;
    	} else {
    		hints.ai_family = AF_INET;
    	}

    And then enabled that IPv6 for Date-Time library with CONFIG_DATE_TIME_IPV6=y in application.

Children
Related