This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to set APN in SDK v1.9.1 "https_client" sample project on nrf9160.

Hi all,

In my SIM, I need to set the APN name, username and password. They are not written to the SIM, so I need to set them.

With the at_client App provided by Nordic, I have already been able to connect to LTE using AT commands.

I think I can connect to LTE if I can set it correctly in the code, but I don't know where to set the APN information in sample project.

1,

I referred to the following thread.

devzone.nordicsemi.com/.../343313

And I added the following to the prj.conf file, but it failed with LTE connect.

# PDN library

CONFIG_PDN=y

CONFIG_PDN_DEFAULTS_OVERRIDE=y

CONFIG_PDN_SYS_INIT=y

CONFIG_PDN_DEFAULT_FAM_IPV4V6=y

CONFIG_PDN_DEFAULT_APN=”APN name

CONFIG_PDN_DEFAULT_USERNAME=”user name

CONFIG_PDN_DEFAULT_PASSWORD=”password

Am I missing something? Or do I need additional Including within the main?

2,(Another way)

I referred to the thread below and thought I could use AT commands in my code.

https://devzone.nordicsemi.com/f/nordic-q-a/70961/set-apn

Do I need to write additional code to use AT commands?

Seems like I need to include <modem/at_cmd.h>.  but can't find <modem/at_cmd.h> .

Is my guess correct that there are two different approaches to setting the APN?

Which is the best way? Is there another way?

My HW : nRF9160DK

MFW : v1.3.1

SDK : v1.9.1

Best regards,

Yukio Oyama