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

nRF9160: not retrieving DNS servers with IPV6

I am currently working on a project with a nRF9160 and in the very early stages of evaluation.

I have a few, hope not too many questions that I hope can be answered here, if it is not too much trouble.
I am starting fresh with the nRF9120SK, but do have prior experience with the nRF51 and nRF52 chips, though it was several years ago, the development environments were quite different, especially with the added Zephyr libraries.  Ultimately this project might be implemented as a serial_lte_modem using another MCU that handles the main logic of the device.

I have been searching on these forums and internet search engines today and yesterday quite a bit and have a few unresolved questions.

Using a macOS Big Sur development environment, I can go into specifics but it is not related to the current question.
I am currently using the example at
/opt/nordic/ncs/v1.4.1/nrf/applications/serial_lte_modem

Built with the command
west build -b nrf9160_pca10090ns

Is there a difference between these two commands?  Does it result in the same build?
west build -b nrf9160_pca10090ns
west build -b nrf9160dk_nrf9160ns

I am using the SDK version v1.4.1, modem software version 1.2.3 (I had some trouble updating it, it was in a very early 0.6.x.x-alpha state when I received the PCB).
Following this guide
https://devzone.nordicsemi.com/f/nordic-q-a/53208/updating-nrf9160-modem-firmware-through-the-command-line
I was able to bring it up to date after a few hours of frustration.

If anyone is interested in how I brought this up to date I can share the procedure, but I had to use the python nrfjprog wrapper to do it.

I have a nRF9160DK and am using a MVNO SIM operating in Japan with KDDI by au.

I am going to provide the output of some commands so you can see the results.

It appears that this SIM only supports IPV6, is there such a thing?

Here is the output of some of the network information.

+CGPADDR: 0,"0000:0000:0000:0000:0000:004A:XXXX:9801" (removed some information for privacy)
+CGCONTRDP: 0,,"ims","","",,,,,,,1500

I have another SIM here (I have to manually set the APN) that retrieves an IPV4 address and DNS servers with the following output.

I have the following output with that SIM card, I have to use AT+CGDCONT=0,"IP","iijmio.jp" to set the APN before enabling the modem.

If you would like to add this SIM card to the list of automatically configured APNs please let me know, I am more than happy to provide details.

+CGDCONT: 0,"IP","iijmio.jp","XXX.XXX.123.XXX",0,0 (removed some information for privacy)
+CGCONTRDP: 0,,"iijmio.jp","","","202.232.2.2","202.232.2.3",,,,,1500

I am using this guide at 

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.1/nrf/applications/serial_lte_modem/doc/slm_description.html

to test a connection to google.com.  I can connect fine with the second listed SIM card that retrieves an IPV4 address.

I can not connect with the first SIM that retrieves an IPV6 address, it has no DNS servers.

I found information that I can manually specify DNS servers, but I don't know how to do this with AT commands.

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

  • aldras said:
    There is a v1.4.99-dev1 version, but because of the word "dev" it appears it is not yet stable and in development.

     The dev tag is better tested than other commits on the master branch, but not as much as a "proper" release.

    This dev tag is primarily for the nRF5340, and I don't think there are any changes that are relevant for us in this case.

     

    aldras said:
    I would like to see what is going on inside the modem, is there a way to see a debug output of the modem during the connection process?  I found a "trace collector" but I can't make sense of is captured, it appears a binary dump of sorts

     Unfortunately, that is not possible at the moment. We are working on a tool for our customers to gain some insight on what is happening on the modem side, but I cannot comment on when that will be available.

    For now, you will have to send the traces to us for analysis.

     

    aldras said:
    Is it possible that the APN is incorrect?

     The network usually provides the APN, so I assume that it is correct. However, you could try to contact your network provider (those you got the SIM from), and ask.


    As you weren't able to connect using the HTTP commands either, it doesn't seem to be just a IPv4 vs IPv6 problem.

    Can you send me the modem trace you took?

    That should tell us where it went wrong in both the DNS lookup, and the direct IP address cases.

  • Hi Didrik,

    I am uploading a modem trace, it is with the 1.4.99-dev1 version of the SDK, serial_lte_modem application.  This is the IPv6 SIM that does not retrieve DNS servers.

    I hope this trace helps provide some insight.

    Ah I can't find a way to upload a file, I will host it on my VPS server, it would be better if I could upload it so it is always available on these forms for alter use, did I just miss the upload feature?

  • Ah, I didn't attempt to connect in the first trace, here is another one where I attempted to connect with both the hostname and then with a direct IP, it froze after the direct IP attempt connect, hope the modem trace shows why.

  • Hi,

    I've tried to decode both of your traces, but neither of them contains any information.

    A valid trace is typically several hundred kilobytes large.

    Did you enable modem traces in the application with CONFIG_BSD_LIBRARY_TRACE_ENABLED=y in your prj.conf (if you are building the application with SES, you must re-open the project or use Project->Run CMake for the changes to take effect).

    In addition, you must use AT%XMODEMTRACE=1,2 to enable modem traces in the modem. You can then store the setting with AT+CFUN=0, so that the modem will output traces also after reboots. The %XMODEMTRACE AT command can only be used when the modem is offline (CFUN=0 or 4).

  • Ah, ok I am going to try again, here is another attempt with the above options enabled.

    I deleted the entire build folder and rebuilt with "west build -b nrf9160dk_nrf9160ns"

Related