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

NRF9160 DNS resolution issue

Hi,
We were trying with a new n/w carrier in Canada ( Maxim ). nrf9160 is able to connect to the network, but it is not able to resolve our server URL ipv4 address. Below error is coming when 'getaddrinfo()' function is called.

getaddrinfo failed, ERR: EAI_SYSTEM

The network carrier team confirmed that they have support for ipv4 address. Also the server URL is valid and ip resolving is working with another network.

We tried sending AT+CGDCONT? and AT+CGCONTRDP=0. Below is the response of each.
AT+CGDCONT?
+CGDCONT: 0,"IP","M2MXNBIOT2","10.247.128.244",0,0
OK

AT+CGCONTRDP=0
+CGCONTRDP: 0,,"M2MXNBIOT2","",""
OK

Can you please help in understanding this issue?
Is this because of any DNS server related issue?
Also we would like to know how we can set a custom DNS server?

Thanks

Aswin

Parents
  • Hi,

    Are you using LTE-M or NB-IoT?

    If you are using NB-IoT, you can try to disable ePCO either with the %XPCO AT command, or by setting CONFIG_LTE_LEGACY_PCO_MODE=y in prj.conf (if you are building with SES, you must re-open the project or use 'Project->Run CMake...' for the change to take effect).

    That has solved some DNS related issues in other networks.

    If that does not help, can you print the value of errno?

    But, to debug this properly, I would probably end up needing a modem trace. Can you capture one showing the error?

    You can set the DNS server with nrf_setdnsaddr in NCS v1.2.0 and newer.

    Best regards,

    Didrik

Reply
  • Hi,

    Are you using LTE-M or NB-IoT?

    If you are using NB-IoT, you can try to disable ePCO either with the %XPCO AT command, or by setting CONFIG_LTE_LEGACY_PCO_MODE=y in prj.conf (if you are building with SES, you must re-open the project or use 'Project->Run CMake...' for the change to take effect).

    That has solved some DNS related issues in other networks.

    If that does not help, can you print the value of errno?

    But, to debug this properly, I would probably end up needing a modem trace. Can you capture one showing the error?

    You can set the DNS server with nrf_setdnsaddr in NCS v1.2.0 and newer.

    Best regards,

    Didrik

Children
Related