nrf_modem_at_printf() fails in GNSS demo code

I am running a modified GNSS demo code for our board. At initialization, there is some traffic going between the MCU and the GNSS chip, but when the demo code calls nrf_modem_at_printf(), it returns an error.

The call stack is:
main() -->  gnss_init_and_start() --> lte_lc_func_mode_set() --> cfun_mode_set() --> nrf_modem_at_printf().
Digging into the NCS v2.8.8 source code, I see that nrf_modem_at_printf() is actually defined away in  nrf/applications/serial_lte_modem/src/slm_trap_macros.h:
#define nrf_modem_at_printf(...) function_disallowed_use_slm_util_printf_alternative(__VA_ARGS__) 
The comments in slm_trap_macros.h explicitly tell us that the "...functions are disallowed for the modem AT command...", but it's not clear how to use the "
Alternatives to these functions are available in slm_util.h."  Further, it's the example code, so I would expect that the libraries would work together.
Any ideas on how to get this to work?
Thank you
Parents
  • Hi,

    I am running a modified GNSS demo code for our board. At initialization, there is some traffic going between the MCU and the GNSS chip, but when the demo code calls nrf_modem_at_printf(), it returns an error.

    Can you provide full log file which shows the error? Can you provide some additional information with regard to modifications to the GNSS sample?

    Digging into the NCS v2.8.8 source code

    There is no NCS v2.8.8. Do you maybe refer to NCS v2.8.0 instead?

    Best regards,
    Dejan

Reply
  • Hi,

    I am running a modified GNSS demo code for our board. At initialization, there is some traffic going between the MCU and the GNSS chip, but when the demo code calls nrf_modem_at_printf(), it returns an error.

    Can you provide full log file which shows the error? Can you provide some additional information with regard to modifications to the GNSS sample?

    Digging into the NCS v2.8.8 source code

    There is no NCS v2.8.8. Do you maybe refer to NCS v2.8.0 instead?

    Best regards,
    Dejan

Children
No Data
Related