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

nRF9160 Modem Firmware v1.0.0: Setting custom DNS server

Hello,

The release-notes of the Modem Firmware v1.0.0 for the nRF9160 state that there is now "Support for DNS server address setting by application.". However, I cannot find how to actually use this feature anywhere.

Is there perhaps an AT-command that is not documented yet? I'm looking at the AT Command Reference v1.0.

Can someone please help me out?

Parents
  • Hi, and apologies for the slow response, but with summer vacations here in Norway it has been hard to find someone able to answer this question.

    Sadly, while the modem supports setting of custom DNS server address, there is no support for this on the application side.

    Best regards,

    Didrik

  • Hi, this is also quite important for us.

    Any update on this one?

    All currently available Release Notes state that it IS possible (even with 'Support for 4 DNS server addresses.')
    (Versions 1.0.0 through 1.1.1)

    I tried command AT+CDNSCFG but it does not seem to be supported, I get an error back.
    AT+CGCONTRDP also return empty strings for DNS addresses.

    It is really vital for our project, our electrical engineers chose NRF91 because of quite impressive low power charactersistics, but we really need to get DNS resolving working!

    Thank you!

  • Hi.

    With NCS v1.2.0 setting a custom DNS server address should now be possible.

    Take a look at the release notes and bsdlib documentation:

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/bsdlib/doc/CHANGELOG.html

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/bsdlib/doc/api.html#_CPPv414nrf_setdnsaddriPKv

    Best regards,

    Didrik

  • Hi, thank for you for a quick reply! 


    Is there any info on using that?

    nrfxlib/bsdlib/include/nrf_socket.h states that the first argument is IP family, which is according to 
    https://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml
    should be 1 for IP4, but then the funciton gives back error 22 (invalid parameter).

    With 2 it gives back 0 error code, but then AT+CGCONTRDP=0 still shows that DNS is not set, and getaddrinfo results in error 60 (timeout).

    I am trying to use OpenDNS (208.67.222.222 and 208.67.222.220), obviously converted to uint32, as the function requires.

    So, any example (even small code snippet) on how to set OpenDNS addresses would be HIGHLY APPRECIATED. Ideally both (primary and secondary), but this function states that it sets only secondary... But at least something to get DNS working.

    Thank you so much!

    P.S. Source code of this function is not open source, or? Then we could look into implementation/used AT command and not bother you.

    But it looks like controlling the modem happens not just via AT commands.

Reply
  • Hi, thank for you for a quick reply! 


    Is there any info on using that?

    nrfxlib/bsdlib/include/nrf_socket.h states that the first argument is IP family, which is according to 
    https://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml
    should be 1 for IP4, but then the funciton gives back error 22 (invalid parameter).

    With 2 it gives back 0 error code, but then AT+CGCONTRDP=0 still shows that DNS is not set, and getaddrinfo results in error 60 (timeout).

    I am trying to use OpenDNS (208.67.222.222 and 208.67.222.220), obviously converted to uint32, as the function requires.

    So, any example (even small code snippet) on how to set OpenDNS addresses would be HIGHLY APPRECIATED. Ideally both (primary and secondary), but this function states that it sets only secondary... But at least something to get DNS working.

    Thank you so much!

    P.S. Source code of this function is not open source, or? Then we could look into implementation/used AT command and not bother you.

    But it looks like controlling the modem happens not just via AT commands.

Children
No Data