Custom DNS Set on SDK 3.1

Hi, 

We have a client using one of our products, and their local NB-IoT network was giving us some issues, I travelled over to try and work out what was going on, and it was to do with the network not have DNS server, so it couldn't resolve server IP addresses. It is now working fine using the suggested answer in this thread.

 nRF9160 Modem Firmware v1.0.0: Setting custom DNS server 

However, our product is still using SDK1.6.1, and modem FW 1.3.1, I am currently in the middle of trying to port across our firmware to the latest SDK. The fix in the above was to use the function
 

struct nrf_in_addr dns;
dns.s_addr = 134744072; // Google DNS, 8.8.8.8
const int err = nrf_setdnsaddr(2, &dns);

But I cant find this function, or an equivalent in SDK 3.1. Can you point me in the right direction?

Thanks, 

Damien 

Parents Reply
  • Hi Michal, 

    Whilst searching for something else I stumbled across these Config options

    CONFIG_LTE_LC_DNS_FALLBACK_MODULE=y
    CONFIG_LTE_LC_DNS_FALLBACK_ADDRESS="8.8.8.8"

    If I look at the LTC_LC Debug, I see

    <dbg> lte_lc: dns_fallback_set: Fallback DNS address successfully set to 8.8.8.8


    So I am assuming it works in the same way as the old fix. 

    However, as it's a fallback I cannot test whether this does fix the problem with certain networks, and I don't think I'll be able to convince my boss to give me a free holiday again. 
    I will try and get a test board sent over to our customer over there and see if they can test it for us. 

    Thanks, 

    Damien

Children
Related