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

Parents
  • Hello Øyvind-sann,

    I was able to connect to LTE using #1.

    I mistakenly used some symbolic-character double-byte characters in the string. This is the reason why #1 was not possible. Japanese letter is a double-byte character, but symbolic-character are often mistaken for single-byte characters. Sorry.

    In #2, an error occurs in the "at_cmd_write()" command. Is #2 method impossible?

    Is there a reference manual that describes the information that can be set in the prj.conf file? I couldn't find it.

    The AT command is described in detail. So I think it more effective to use AT commands inline.


    I'm already connected to the LTE network, can the SIM information help me with my questions?

    Thank you.

    Yukio Oyama

Reply
  • Hello Øyvind-sann,

    I was able to connect to LTE using #1.

    I mistakenly used some symbolic-character double-byte characters in the string. This is the reason why #1 was not possible. Japanese letter is a double-byte character, but symbolic-character are often mistaken for single-byte characters. Sorry.

    In #2, an error occurs in the "at_cmd_write()" command. Is #2 method impossible?

    Is there a reference manual that describes the information that can be set in the prj.conf file? I couldn't find it.

    The AT command is described in detail. So I think it more effective to use AT commands inline.


    I'm already connected to the LTE network, can the SIM information help me with my questions?

    Thank you.

    Yukio Oyama

Children
No Data
Related