At_commands application

Hello, I want to write an applicatin that gets at_coammnds from the terminal via uart, sends the command to the modem and then sends the respond back via uart.
I have two option to achieve this:
1. adding the functionality to an already existing uart application that I have.
2. using the at_client application.

in both cases,right now I run in the same problem, the code doesn't compile because the nrf_modem.h file isn't found by the compiler.
I see that this file is located at nrfxlib\nrf_modem\include\nrf_modem.h
so it seems that Mr application doesn't compile nrfxlib, but I cant fins what configuration files I need to add to my prjconf file in order for it to compile.
thanks in advance,

shlomo

Parents Reply Children
  • ok I figured something out, It seems the build fails only if my target is nrf9160dk_nrf9160.
    if I build to nrf9160dk_nrf9160_ns the build doesn't fail.
    why would it fail if I build to nrf9160dk_nrf9160?

  • Yes, the modem is only available through the non-secure core of nrf9160dk_nrf9160_ns. See developing with nrf91-series for more information

  • ok I will take a look, but for some reason when I try to build for the the _ns target with my overlay, I get this error:

    this is my overlay:

    /* Overlay for TWI/IC2 Zephyr NCS implementation with nRFx TWIM Driver */
    /* Line references are used in the blog post and twim_node.txt */


    / {
        chosen {
            zephyr,console = &uart1;
            zephyr,shell-uart = &uart0;
            zephyr,uart-mcumgr = &uart0;
        };
    };

    // &uart0 {
    //     status = "disabled";
    // };


    &uart2 {
        status = "okay";
        current-speed = <115200>;
    };

    // &spi2 {
    //  status = "disabled";
    // };

    &i2c2 {
        status = "disabled";
    };




    &pinctrl {
        uart2_default: uart2_default {
            group1 {
                psels = <NRF_PSEL(UART_TX, 0, 10)>,
                    <NRF_PSEL(UART_RX, 0, 11)>;
            };
        };

        uart2_sleep: uart2_sleep {
            group1 {
                psels = <NRF_PSEL(UART_TX, 0, 10)>,
                    <NRF_PSEL(UART_RX, 0, 11)>;
                low-power-enable;
            };
        };

    };

    my nrf9160 sits on a customboard with the uart pins already set. 
    what is the problem?
    does the non secure build use some of these uart controller by default?
Related