serial_lte_modem DNS resolution issues

Hey all,

So I have been having inconsistent issues connecting to different domains, and after getting the debugger working it appears to be a DNS resolution issue and it never even tries to connect

All I really want is to change the DNS server the modem is using because whatever the carrier or software is deciding to use is just too unreliable.

A few relevant posts, but with out of date data:

https://devzone.nordicsemi.com/f/nordic-q-a/44294/using-getaddrinfo-for-dns-lookups-nrf9160-dk/177777#177777

https://devzone.nordicsemi.com/f/nordic-q-a/50029/nrf9160-modem-firmware-v1-0-0-setting-custom-dns-server/235139#235139

But neither of these point to anything usable with the serial_lte_modem or seemingly commands that no longer exist.

It is really hard to come up with a test case for you to use on your end since it seems to be tied to my local carrier. But it has been quite frustrating where the modem will work fine for hours, and then I reboot it or something and then it can no longer resolve many domains.

I tried adding this to prj.conf:

CONFIG_NET_NATIVE=y
CONFIG_DNS_RESOLVER=y
CONFIG_DNS_SERVER_IP_ADDRESSES=y
CONFIG_DNS_SERVER1="8.8.8.8"
CONFIG_DNS_SERVER2="1.1.1.1"

But it had no affect.

Thanks,

Kyle

Parents
  • Hi Kyle, 

    The DNS server is normally assigned by the local network directly, and it is optimized by your network operator to get fast DNS resolution. We did not see similar complaints before, so the AT commands do not even provide the option for self-assigned DNS now.

    There are three reasons that may cause the FTP connection error:

    1. Please check your device has internet access after “AT+CFUN=1”, it may take time to connect with PDN even you have an LTE connection.

    2. If your domain is newly set up, it may take time to let it be informed by root DNS servers. 

    3. You may be on the edge of the cellular network, the signal quality is poor, so the internet connection is bad.

    With the following commands, your can get your PDN information including DNS address then you can test on your computer to see if they can resolve your target domain. Here is the result from my device:

    +CFUN: 1
    OK
    AT+CGPADDR
    
    +CGPADDR: 0,"10.160.225.xxx"
    OK
    AT+CGCONTRDP=0
    
    +CGCONTRDP: 0,,"ibasis.iot","","","62.93.146.xxx","216.168.184.xxx",,,,,1430
    OK

    Best regards,

    Charlie

  • Guess it isn't the DNS server then, responds quickly with a nslookup with no errors ever. So maybe its on the nRF9160 things on going wrong.

    So the specific error that ends up happening is "Failed to parse remote host" for ftp. I assume it is a similar issue going on with the HTTP lib though, because I can connect to most servers, but then I don't get any data back.

    Is there some way I can provide an example to test with but not be publicly visible?

    Mostly, the HTTP client can connect to almost any server no problem and I can request "/" just fine over 99% of the time. But if I request anything else, even "/test.txt" I don't get anything back, just a  #XHTTPCCON: 1 and #XHTTPCRSP:0,1

    Both of these issues started at the same time, everything was working fine in SDK 1.7.1, but even flashing back to that version no longer works.

  • Mr.Newlove said:
    Is there some way I can provide an example to test with but not be publicly visible?

    You can create a private ticket to share confidential content.

    Mr.Newlove said:
    Both of these issues started at the same time, everything was working fine in SDK 1.7.1, but even flashing back to that version no longer works.

    I have three suggestions to help you debug this issue:

    1. You a different Hardware as a comparison. The official nRF9160DK can be a good choice. You should have at least 2 boards for comparison testing.

    2. Try to use Cellular IoT service from a different opearer.

    3. Check if your MFW is updated. It is always encouraged to develop with the latest MFW + NCS.

    Best regards,

    Charlie

  • 1. I have been comparing my board and the nRF9160 DK and I am thinking maybe my problems are related to signal strength?

    Both the DK and my board are getting: RSRQ: -12.50db RSRP: -109.00db

    But my LTE phone right beside the modem is getting -108 dB 33 asu

    Connection feel unstable sometimes, taking 3s-8s to get a network lock sometimes and sometimes sits there for longer than 120s and still returning +CEREG: 0,4

    I bought a cell booster, now my cellphone is reading -78 dBm 62 asu

    And the DK and my board reading: RSRQ: -10.50db RSRP: -63.00db

    Its slightly more reliable but still not great.

    2. I tried 3 completely different providers and the one I am using right now is by far the most reliable. I live in a city of ~200k in Canada and I don't really have coverage issues with my phone on the same network.

    3. I am not sure what you mean by MFW, but I am compiling the serial_lte_modem example with 1 modification made to my overlay file to change serial port/output pins. Right now that is v1.8.0

    But yea, is there any way to tell the modem it can use more power to get a stable connection?

Reply
  • 1. I have been comparing my board and the nRF9160 DK and I am thinking maybe my problems are related to signal strength?

    Both the DK and my board are getting: RSRQ: -12.50db RSRP: -109.00db

    But my LTE phone right beside the modem is getting -108 dB 33 asu

    Connection feel unstable sometimes, taking 3s-8s to get a network lock sometimes and sometimes sits there for longer than 120s and still returning +CEREG: 0,4

    I bought a cell booster, now my cellphone is reading -78 dBm 62 asu

    And the DK and my board reading: RSRQ: -10.50db RSRP: -63.00db

    Its slightly more reliable but still not great.

    2. I tried 3 completely different providers and the one I am using right now is by far the most reliable. I live in a city of ~200k in Canada and I don't really have coverage issues with my phone on the same network.

    3. I am not sure what you mean by MFW, but I am compiling the serial_lte_modem example with 1 modification made to my overlay file to change serial port/output pins. Right now that is v1.8.0

    But yea, is there any way to tell the modem it can use more power to get a stable connection?

Children
  • Ok, let's move our discussion to another ticket. Before this, I can answer some of your confusion.

    1)The LTE-4G/5G used by mobile phone is different from LTE-M/NB-IoT(they are also different), one area may be covered by the mobile network, but not LTE-M/NB-IoT, so the signal strength cannot be used as a reference for each other.

    2) MFW= Modem Firmware, the least is mfw_nrf9160_1.3.1 and can be downloaded from nRF9160 SiP modem firmware.

    3)

    Mr.Newlove said:
    is there any way to tell the modem it can use more power to get a stable connection?

    No, generally speaking, the cell station decides the power.

    Best regards,

    Charlie

Related