Hi
I'm trying to load a custom board with nrf9160 with the Serial LTE Modem, and route the AT commands to the UART from a coprocessor (ESP32C3)
I have followed the guide on using an external MCU: https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/nrf/applications/serial_lte_modem/doc/slm_description.html
But its not clear as to whether I need the 52840 chip on my custom board for this to work.
The closest I have got to this working after several nights of modifying overlays is access to the shell over my HW Serial port, but none of the AT commands are available.
Here's a rough breakdown of the steps I've taken:
Background:
I’m using the Nordic nRF9160 DK with the Serial LTE Modem (SLM) sample from NCS v3.0.1. My goal is to route the AT-command interface (UART1?) to Arduino header pins P0.05 (RX) and P0.06 (TX), then get the SLM shell working over that serial port.
1. Pin-mux & Overlay
-
By default, UART1 was mapped to P0.14/P0.15. I created a custom DTS overlay (
nrf9160dk_nrf9160_ns.overlay
) to remapuart1_default
to pins 5/6. -
Confirmed via the graphical devicetree viewer that the pins changed and, after rebuilding, saw “UART test: Hello from P0.05/P0.06!” on the serial console.
2. Shell vs. Console Confusion
-
I tried driving AT commands and shell commands directly over UART1, but:
-
In “console” mode I got
AT: command not found
. -
In “shell” mode I got a Zephyr shell prompt but none of the SLM AT commands (e.g.
AT+CFUN?
) were recognized.
-
-
Turns out SLM uses its own AT parser/backend, not the stock Zephyr shell, so I needed to disable the Zephyr shell and enable the AT console backend.
3. prj.conf
Tweaks & Kconfig Errors
I modified prj.conf
heavily, enabling/disabling for:
-
CONFIG_SHELL
,CONFIG_SHELL_BACKEND_SERIAL
-
CONFIG_UART_CONSOLE
vs.CONFIG_RTT_CONSOLE
-
CONFIG_AT_CMD_CUSTOM
,CONFIG_NRFX_TIMER2
, etc. -
Enabled downloader, FOTA, MQTT, TF-M lazy stacking, etc.
But that introduced a flood of build errors:
-
Undefined symbols:
AT_CMD
,AT_HOST
,TFM_ENABLE_FP
,TFM_LAZY_STACKING
-
Missing
nrf_cloud_agnss_schema_v1.h
,cJSON.h
-
Missing downloader sizes:
CONFIG_DOWNLOADER_MAX_HOSTNAME_SIZE
, etc. -
MQTT config undefined (
CONFIG_MQTT_CLEAN_SESSION
) -
Dependency loops in TF-M config: “INVALID CONFIG… AND CONFIG_TFM_LAZY_STACKING”
-
Errors in
slm_at_nrfcloud.c
,slm_at_fota.c
,slm_at_gnss.c
,main.c
, etc., due to missing headers and undefined Kconfig symbols.
4. Root Cause & Recovery Plan
I’d (re)discover that:
-
SLM has its own AT backends—you don’t use
CONFIG_SHELL
but rather the AT console (CONFIG_AT_CMD_CUSTOM
,CONFIG_LOG_BACKEND_UART
, etc.). -
Only pull in the exact downloader/MQTT/Kconfig symbols you need—don’t blanket-enable unsupported features.
-
Revert to a known-good commit and then incrementally re-apply each config line, rebuilding after each to catch exactly which setting breaks the build.
Next Steps:
-
Forum Request: Anyone who’s successfully routed UART1 → P0.05/P0.06 for SLM, could you share your minimal
prj.conf
and overlay snippets? -
DT Overlay Example: What exact lines did you use in
boards/nrf9160dk_nrf9160_ns.overlay
to get Zephyr’suart1
working on Arduino pins 5/6? -
Kconfig Tips: Best practices for including downloader/FOTA/MQTT symbols in SLM without pulling in every network feature and blowing up TF-M?
Many thanks in advance for reading this query and any insightful responses!
Tom