nRF9160 getaddrinfo returns error -2 with https_client with Telenor SIM

Dear Sir/Madam,

Why do I get the error -2 on command "getaddrinfo" with the "https_client" with a "Telenor" SIM?
Below you find a modem trace of the failure and screenshot of wireshark capture.

The "https_client" example returns error -2 on command "getaddrinfo" with the  "Telenor" SIM
When changing the example to use a static IP the connect fails with error 116

The "https_client" example runs without errors with the "Ibasis" SIM
The "udp" example runs without errors with the "Telenor" SIM

4010.trace-2023-02-23T16-52-46.209Z.bin

With best regards,

Willem Jongsma

Parents Reply Children
  • Hello Øyvind,

    The Telenor SIM is a nano SIM with APN “wlapn.com”.
    The UDP example is using the de example defaults (static IP 8.8.8.8)
    The HTTPS_client example is modified to use host name "test.websensys.eu" with TLS peer verification "NONE", the rest of the settings are default

    In the mean time I tried the functions "nrf_getaddrinfo" and "nrf_setdnsaddr"
    With the "Telenor" SIM both the functions "getaddrinfo" and "nrf_getaddrinfo" give the following result:
    ERROR: getaddrinfo failed error:-2, errno: 0 (-2=DNS_EAI_NONAME)
    When i set 8.8.8.8 as secondairy dns with "nrf_setdnsaddr" I get:
    ERROR: getaddrinfo failed error:-11, errno: 116 (-11=DNS_EAI_SYSTEM, 116=ETIMEDOUT)

    What illegal argument did the modem return?

    nRF9160DK PCA10090 1.1.0
    Modem firmware: mfw_nrf9160_1.3.4.zip
    NRF Connect SDK V2.2.0

    With best regards,

    Willem

  • Hello Øyvind,

    After setting the Telenor APN the DNS resolve with getaddrinfo works.

    I've set the APN by putting the following lines in the "prj.conf" file:
    CONFIG_PDN=y
    CONFIG_PDN_DEFAULTS_OVERRIDE=y
    CONFIG_PDN_DEFAULT_APN="wlapn.com"

    This case can be closed.

    With best regards,

    Willem

Related