Unable to resolve Host address via DNS on nRF9151DK

After looking over numerous other devzone tickets and google hits... I cannot get host name to IP address resolution to function on the nRF9151DK. The original source code being adapted from is the Nordic HTTPS client sample (nrf/samples/net/https). I am using an Onomondo SIM card that came with the DK from Nordic. Onomondo openly indicates that they do not provide DNS services and that users should instead rely on Google (8.8.8.8), Cloudflare (1.1.1.1) or OpenDNS. This combination creates quite a dilemma.

Goliath has posted several detailed accounts of the problem.  I need to find a viable, reliable work around for resolving host addresses. Manual lookup and injecting an IP address into application source code is not it. https://blog.golioth.io/the-miserable-state-of-modems-and-mobile-network-operators/ has a detailed explanation.

I have tried the code snippet below, that seems to have worked for most of those experiencing this problem. However I have yet to get it too work at all, much 

   
    struct nrf_in_addr dns;
    // dns.s_addr = 134744072;                                 // Google DNS, 8.8.8.8 in u32 rapresentation
    dns.s_addr = 16843009;                                  // Cloudflare DNS, 1.1.1.1
    err = nrf_setdnsaddr(NRF_AF_INET, &dns, sizeof(dns));
    if (err ==0) {
      printk("DNS correctly set\n");
    } else {
      printk("Error %d, DNS not set %d\n", err, errno);
    }


Should I... 

  • Force a PDN behavior for PCO or ePCO?
  • Disable socket offloading, at least long enough to resolve host addresses?
  • Use the very complex Zephyr DNS resolver implementation?
  • Not use Onomondo?

Does Nordic have any reliable workaround to prescribe?

Thank you,

Greg

Related