Custom board: using location services fails to configure GNSS

Hi,

We have a custom board with a nRF9151. We're still sorting out LTE connectivity issues but I wanted to try out the location services with GNSS only for now. I modified the location sample and integrated it into our application but I'm seeing the following error:

```

*** Booting nRF Connect SDK v2.8.0-a2386bfc8401 ***
*** Using Zephyr OS v3.7.99-0bc3393fb112 ***
[00:00:00.526,763] <err> lte_lc: nrf_modem_at_printf failed, reported error: 65536
[00:00:00.526,794] <err> lte_lc: Failed to configure PSM, err -14
nrf_modem_lib_init success
[00:00:00.527,526] <err> location: Cannot subscribe to modem sleep notifications, error: 65536
Requesting high accuracy GNSS location...
loc_init success
[00:00:00.534,637] <err> nrf_modem: Modem has crashed, reason 0xfff, PC: 0x0
[00:00:00.534,667] <err> location: Failed to configure GNSS
[00:00:00.534,698] <err> location: Location acquisition failed and fallbacks are also done
MAB loc_event_handler -- got event

```

These are the relevant snippets of the initialization code:

```

int err = nrf_modem_lib_init();
if (err) {
    printk("Failed to init modem lib\n");
    return -1;
}
printk("nrf_modem_lib_init success\n");

if (location_init(loc_event_handler) != 0) {
    printk("Failed to initialize location\n");
    return -1;
}

struct location_config config;
enum location_method methods[] = {LOCATION_METHOD_GNSS};

location_config_defaults_set(&config, ARRAY_SIZE(methods), methods);
config.methods[0].gnss.accuracy = LOCATION_ACCURACY_HIGH;

printk("Requesting high accuracy GNSS location...\n");

if (location_request(&config) != 0) {
    printk("Failed to request location\n");
    return -1;
}

printk("%s success\n", __func__);

```

This is our prj.conf:
```

CONFIG_PRINTK=y
CONFIG_SHELL=y
CONFIG_LOG=y
CONFIG_LOG_CMDS=y
CONFIG_INIT_STACKS=y
CONFIG_THREAD_STACK_INFO=y
CONFIG_KERNEL_SHELL=y
CONFIG_THREAD_MONITOR=y
CONFIG_BOOT_BANNER=n
CONFIG_THREAD_NAME=y
CONFIG_DEVICE_SHELL=y
CONFIG_POSIX_API=y
CONFIG_POSIX_TIMERS=y
CONFIG_DATE_SHELL=y
CONFIG_THREAD_RUNTIME_STATS=y
CONFIG_THREAD_RUNTIME_STATS_USE_TIMING_FUNCTIONS=y
CONFIG_STATS=y
CONFIG_STATS_SHELL=y

CONFIG_MODEM_JWT=y
CONFIG_NRF_MODEM_LIB=y
CONFIG_LTE_LINK_CONTROL=y
#CONFIG_LTE_LC_EDRX_MODULE=y
#CONFIG_LTE_EDRX_REQ=y
#CONFIG_LTE_LC_PSM_MODULE=y
# Request PSM active time of 8 seconds.
#CONFIG_LTE_PSM_REQ_RAT="00000100"
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536
CONFIG_HEAP_MEM_POOL_SIZE=2048
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_LOCATION=y
CONFIG_LOCATION_METHOD_GNSS=y
CONFIG_LOCATION_METHOD_CELLULAR=n

```

Can you tell me what I'm doing wrong that is causing that error?

Related