Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/test/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ tests:
serial_port_var: CI_NRF54L15_PROVISION_SERIAL_PORT
console_vcom: 1
device_id_var: CI_NRF54L15_PROVISION_DEVICE_ID
serial_modem:
segger_sn_var: CI_NRF54L15_PROVISION_SERIAL_MODEM_SEGGER_SN
nrf_cloud:
api_key_var: NRF_CLOUD_API_KEY
ca_cert_var: NRF_CLOUD_CA_CERT
Expand All @@ -36,8 +38,10 @@ tests:
hardware:
segger_sn_var: CI_NRF54LM20B_PROVISION_SEGGER_SN
serial_port_var: CI_NRF54LM20B_PROVISION_SERIAL_PORT
console_vcom: 1
console_vcom: 0
device_id_var: CI_NRF54LM20B_PROVISION_DEVICE_ID
serial_modem:
segger_sn_var: CI_NRF54LM20B_PROVISION_SERIAL_MODEM_SEGGER_SN
nrf_cloud:
api_key_var: NRF_CLOUD_API_KEY
ca_cert_var: NRF_CLOUD_CA_CERT
Expand Down Expand Up @@ -70,9 +74,10 @@ tests:
hardware:
segger_sn_var: CI_NRF54LM20B_PROVISION_SEGGER_SN
serial_port_var: CI_NRF54LM20B_PROVISION_SERIAL_PORT
# The nRF7002-EB2 shield moves the console to uart30, which is VCOM0.
console_vcom: 0
device_id_var: CI_NRF54LM20B_PROVISION_DEVICE_ID
serial_modem:
segger_sn_var: CI_NRF54LM20B_PROVISION_SERIAL_MODEM_SEGGER_SN
nrf_cloud:
api_key_var: NRF_CLOUD_API_KEY
ca_cert_var: NRF_CLOUD_CA_CERT
Expand Down Expand Up @@ -100,6 +105,8 @@ tests:
serial_port_var: CI_NRF54L15_SERIAL_PORT
console_vcom: 1
device_id_var: CI_NRF54L15_DEVICE_ID
serial_modem:
segger_sn_var: CI_NRF54L15_SERIAL_MODEM_SEGGER_SN
nrf_cloud:
api_key_var: NRF_CLOUD_API_KEY
ca_cert_var: NRF_CLOUD_CA_CERT
Expand Down Expand Up @@ -127,6 +134,8 @@ tests:
serial_port_var: CI_NRF54L15_SERIAL_PORT
console_vcom: 1
device_id_var: CI_NRF54L15_DEVICE_ID
serial_modem:
segger_sn_var: CI_NRF54L15_SERIAL_MODEM_SEGGER_SN
nrf_cloud:
api_key_var: NRF_CLOUD_API_KEY
ca_cert_var: NRF_CLOUD_CA_CERT
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
VERSION: ${{ inputs.version }}
run: |
set -eu
mkdir -p release-assets
mkdir -p release-assets release-staging

copy_release_file() {
local src="$1"
Expand All @@ -61,16 +61,32 @@ jobs:
board_type="${rest#*-}"
root="$artifact_dir"
zephyr="${root}/${app}/zephyr"
prefix="release-assets/${app}-${board_type}-v${VERSION}"
bundle_name="${app}-${board_type}-v${VERSION}"
bundle_dir="release-staging/${bundle_name}"
mkdir -p "$bundle_dir"

copy_release_file "${root}/merged.hex" "${prefix}.merged.hex"
copy_release_file "${zephyr}/zephyr.elf" "${prefix}.elf"
copy_release_file "${zephyr}/.config" "${prefix}.config"
copy_release_file "${root}/merged.hex" "${bundle_dir}/merged.hex"
copy_release_file "${zephyr}/zephyr.elf" "${bundle_dir}/zephyr.elf"
copy_release_file "${zephyr}/.config" "${bundle_dir}/.config"
if [ "$app" != "93m1_at" ]; then
copy_release_file "${zephyr}/zephyr.signed.bin" "${prefix}.signed.bin"
copy_release_file "${zephyr}/zephyr.signed.bin" "${bundle_dir}/zephyr.signed.bin"
fi

(
cd "$bundle_dir"
zip -r "../../release-assets/${bundle_name}.zip" .
)
done

pip install --quiet pyyaml
REPO_ROOT=$PWD PYTHONPATH=tests/on_target python3 <<'PY'
from pathlib import Path

from utils.serial_modem_firmware import download_serial_modem_release_bundle

download_serial_modem_release_bundle(Path("release-assets"), root=Path("."))
PY

ls -la release-assets/

- name: Create release
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,19 @@
#
# GitHub variables (DUT 1 — provisioning):
# CI_NRF54L15_PROVISION_SEGGER_SN
# CI_NRF54L15_PROVISION_SERIAL_MODEM_SEGGER_SN
# CI_NRF54L15_PROVISION_DEVICE_ID
# CI_NRF54L15_PROVISION_SERIAL_PORT (optional)
#
# GitHub variables (DUT 2 — FOTA + coredump, must be provisioned once out-of-band):
# CI_NRF54L15_SEGGER_SN
# CI_NRF54L15_SERIAL_MODEM_SEGGER_SN
# CI_NRF54L15_DEVICE_ID
# CI_NRF54L15_SERIAL_PORT (optional)
#
# GitHub variables (DUT 3 — provisioning + Wi-Fi location on nRF54LM20 DK):
# CI_NRF54LM20B_PROVISION_SEGGER_SN
# CI_NRF54LM20B_PROVISION_SERIAL_MODEM_SEGGER_SN
# CI_NRF54LM20B_PROVISION_DEVICE_ID
# CI_NRF54LM20B_PROVISION_SERIAL_PORT (optional)
#
Expand Down Expand Up @@ -144,6 +147,7 @@ jobs:
NRF_CLOUD_CA_CERT: ${{ secrets.NRF_CLOUD_CA_CERT }}
NRF_CLOUD_CA_KEY: ${{ secrets.NRF_CLOUD_CA_KEY }}
CI_NRF54L15_PROVISION_SEGGER_SN: ${{ vars.CI_NRF54L15_PROVISION_SEGGER_SN }}
CI_NRF54L15_PROVISION_SERIAL_MODEM_SEGGER_SN: ${{ vars.CI_NRF54L15_PROVISION_SERIAL_MODEM_SEGGER_SN }}
CI_NRF54L15_PROVISION_SERIAL_PORT: ${{ vars.CI_NRF54L15_PROVISION_SERIAL_PORT }}
CI_NRF54L15_PROVISION_DEVICE_ID: ${{ vars.CI_NRF54L15_PROVISION_DEVICE_ID }}
MEMFAULT_ORG_TOKEN: ${{ secrets.MEMFAULT_ORG_TOKEN }}
Expand Down Expand Up @@ -180,6 +184,7 @@ jobs:
NRF_CLOUD_CA_CERT: ${{ secrets.NRF_CLOUD_CA_CERT }}
NRF_CLOUD_CA_KEY: ${{ secrets.NRF_CLOUD_CA_KEY }}
CI_NRF54LM20B_PROVISION_SEGGER_SN: ${{ vars.CI_NRF54LM20B_PROVISION_SEGGER_SN }}
CI_NRF54LM20B_PROVISION_SERIAL_MODEM_SEGGER_SN: ${{ vars.CI_NRF54LM20B_PROVISION_SERIAL_MODEM_SEGGER_SN }}
CI_NRF54LM20B_PROVISION_SERIAL_PORT: ${{ vars.CI_NRF54LM20B_PROVISION_SERIAL_PORT }}
CI_NRF54LM20B_PROVISION_DEVICE_ID: ${{ vars.CI_NRF54LM20B_PROVISION_DEVICE_ID }}
MEMFAULT_ORG_TOKEN: ${{ secrets.MEMFAULT_ORG_TOKEN }}
Expand Down Expand Up @@ -216,6 +221,7 @@ jobs:
NRF_CLOUD_CA_CERT: ${{ secrets.NRF_CLOUD_CA_CERT }}
NRF_CLOUD_CA_KEY: ${{ secrets.NRF_CLOUD_CA_KEY }}
CI_NRF54LM20B_PROVISION_SEGGER_SN: ${{ vars.CI_NRF54LM20B_PROVISION_SEGGER_SN }}
CI_NRF54LM20B_PROVISION_SERIAL_MODEM_SEGGER_SN: ${{ vars.CI_NRF54LM20B_PROVISION_SERIAL_MODEM_SEGGER_SN }}
CI_NRF54LM20B_PROVISION_SERIAL_PORT: ${{ vars.CI_NRF54LM20B_PROVISION_SERIAL_PORT }}
CI_NRF54LM20B_PROVISION_DEVICE_ID: ${{ vars.CI_NRF54LM20B_PROVISION_DEVICE_ID }}
MEMFAULT_ORG_TOKEN: ${{ secrets.MEMFAULT_ORG_TOKEN }}
Expand Down Expand Up @@ -252,6 +258,7 @@ jobs:
NRF_CLOUD_CA_CERT: ${{ secrets.NRF_CLOUD_CA_CERT }}
NRF_CLOUD_CA_KEY: ${{ secrets.NRF_CLOUD_CA_KEY }}
CI_NRF54L15_SEGGER_SN: ${{ vars.CI_NRF54L15_SEGGER_SN }}
CI_NRF54L15_SERIAL_MODEM_SEGGER_SN: ${{ vars.CI_NRF54L15_SERIAL_MODEM_SEGGER_SN }}
CI_NRF54L15_SERIAL_PORT: ${{ vars.CI_NRF54L15_SERIAL_PORT }}
CI_NRF54L15_DEVICE_ID: ${{ vars.CI_NRF54L15_DEVICE_ID }}
MEMFAULT_ORG_TOKEN: ${{ secrets.MEMFAULT_ORG_TOKEN }}
Expand Down Expand Up @@ -288,6 +295,7 @@ jobs:
NRF_CLOUD_CA_CERT: ${{ secrets.NRF_CLOUD_CA_CERT }}
NRF_CLOUD_CA_KEY: ${{ secrets.NRF_CLOUD_CA_KEY }}
CI_NRF54L15_SEGGER_SN: ${{ vars.CI_NRF54L15_SEGGER_SN }}
CI_NRF54L15_SERIAL_MODEM_SEGGER_SN: ${{ vars.CI_NRF54L15_SERIAL_MODEM_SEGGER_SN }}
CI_NRF54L15_SERIAL_PORT: ${{ vars.CI_NRF54L15_SERIAL_PORT }}
CI_NRF54L15_DEVICE_ID: ${{ vars.CI_NRF54L15_DEVICE_ID }}
MEMFAULT_ORG_TOKEN: ${{ secrets.MEMFAULT_ORG_TOKEN }}
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ west update

The repository is now cloned into the `smha-workspace/project` folder, the west modules are downloaded, and you are ready to build an application.

Alternatively, download pre-built firmware from the [latest release](https://github.com/nrfconnect/ncs-serial-modem-host-applications/releases) and flash it directly. See [Release artifacts](doc/release-artifacts.md) for bundle names, file descriptions, and flash commands.

### Build and flash

Follow the application documentation for hardware setup, build, flash, and (where applicable) cloud provisioning:
Expand All @@ -73,7 +75,7 @@ Follow the application documentation for hardware setup, build, flash, and (wher

## Contributing

See [CI and contribution](doc/ci-and-contribution.md) for continuous integration, releases, and commit message guidelines.
See [CI and contribution](doc/ci-and-contribution.md) for continuous integration, releases, and commit message guidelines. Pre-built firmware bundles are described in [Release artifacts](doc/release-artifacts.md).

## License

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
# nRF54LM20B DK: console on uart20 (VCOM1), modem on uart21.
# nRF54LM20B DK: console on uart30 (VCOM0), modem on uart21.

CONFIG_UART_ASYNC_API=y
CONFIG_MODEM_BACKEND_UART_ASYNC_HWFC=y

# Shell/console on uart20 uses interrupt-driven UART; modem on uart21 is async-only.
# Shell/console on uart30 uses interrupt-driven UART; modem on uart21 is async-only.
CONFIG_UART_30_INTERRUPT_DRIVEN=y
CONFIG_UART_21_INTERRUPT_DRIVEN=n
CONFIG_UART_21_ASYNC=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@
* Default build (no shield):
* west build -b nrf54lm20dk/nrf54lm20b/cpuapp/ns -p
*
* Console uses the DK default (uart20 / VCOM1). Do not set zephyr,console here —
* the nRF7002-EB2 shield overlay must be able to reroute it to uart30.
* Console uses uart30 (VCOM0) so plain and nRF7002-EB2 builds share the same
* USB serial port. Modem stays on uart21 (P1).
*
* The Serial Modem link uses uart21 on P1.8–P1.9 (TX/RX) and P1.23–P1.24
* (RTS/CTS). DTR/RI/reset use P1.11/P1.12/P1.10 (conflict with DK default
* uart21 HWFC).
*
* With nRF7002-EB2 on P18 (Wi-Fi location), pass -DSHIELD=nrf7002eb2; the
* shield overlay moves the console to uart30 (VCOM0). Disable VCOM1 in Board
* Configurator when the shield is attached.
* With nRF7002-EB2 on P18 (Wi-Fi location), pass -DSHIELD=nrf7002eb2 and disable
* VCOM1 in Board Configurator (uart20 pins conflict with the shield).
*
* Set matching VDD on both DKs (typically 1.8 V).
*
Expand All @@ -30,6 +29,8 @@

/ {
chosen {
zephyr,console = &uart30;
zephyr,shell-uart = &uart30;
nordic,pm-ext-flash = &mx25r64;
};

Expand All @@ -38,6 +39,11 @@
};
};

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

&pinctrl {
uart21_default: uart21_default {
group1 {
Expand Down
4 changes: 2 additions & 2 deletions applications/91m1_ppp/doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The application connects to nRF Cloud over **CoAP/DTLS** from the host MCU (nRF5

## Getting started

1. **Wire up the development boards** — Connect the host DK (nRF54L15 or nRF54LM20B) to the nRF9151 DK (Serial Modem). Configure both DKs in the Board Configurator and flash Serial Modem firmware with PPP and CMUX enabled on the nRF9151. The host application is tested with Serial Modem commit [`e23c2bde`](https://github.com/nrfconnect/ncs-serial-modem/commit/e23c2bde08a83e8a2908f78ee19f2b2ff5c6e46e). See [Hardware setup](hardware-setup.md) for wiring, pin assignments, and [how to flash Serial Modem on the nRF91](https://docs.nordicsemi.com/bundle/addon-serial_modem-latest/page/gsg_guide.html#building_and_running).
1. **Wire up the development boards** — Connect the host DK (nRF54L15 or nRF54LM20B) to the nRF9151 DK (Serial Modem). Configure both DKs in the Board Configurator and flash Serial Modem firmware with PPP and CMUX enabled on the nRF9151. Use the pre-built [`serial_modem_v2.0.0-preview2_nrf9151dk_extmcu.zip`](https://github.com/nrfconnect/ncs-serial-modem/releases/download/v2.0.0-preview2/serial_modem_v2.0.0-preview2_nrf9151dk_extmcu.zip) bundle from [Serial Modem v2.0.0-preview2](https://github.com/nrfconnect/ncs-serial-modem/releases/tag/v2.0.0-preview2) (also attached to [SMHA releases](../../../doc/release-artifacts.md#serial-modem-firmware-nrf9151-dk)). See [Hardware setup](hardware-setup.md) for wiring, pin assignments, and how to flash the Serial Modem image.

2. **Build and flash 91m1_ppp on the host DK**

Expand Down Expand Up @@ -82,7 +82,7 @@ The application connects to nRF Cloud over **CoAP/DTLS** from the host MCU (nRF5
- `-s` saves generated PEM files (`<device_id>_crt.pem`, `<device_id>_prv.pem`, etc.) in the current directory.
- `-d` deletes any existing credentials in sec tag 16842753 before installing new ones.
- `--verify` confirms credentials were written correctly.
- `--port` selects the host console serial port (adjust for your OS; omit if auto-detection works). On nRF54LM20B, use **VCOM1** (secondary port); with the nRF7002-EB2 shield, use **VCOM0** instead.
- `--port` selects the host console serial port (adjust for your OS; omit if auto-detection works). On nRF54LM20B, use **VCOM0** (primary port) for both plain and nRF7002-EB2 builds.

On success you should see:

Expand Down
30 changes: 22 additions & 8 deletions applications/91m1_ppp/doc/hardware-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Open a serial terminal on **VCOM1** (uart20 — the secondary USB serial port on

Development setup: **nRF54LM20B DK** (host) wired to **nRF9151 DK** or **nRF9151 SMA DK** (Serial Modem).

On the nRF54LM20B DK, no Board Configurator changes are required — both VCOM ports stay enabled.
On the nRF54LM20B DK, no Board Configurator changes are required for the plain build — both VCOM ports may stay enabled. When the nRF7002-EB2 shield is attached, disable **VCOM1** (see [Wi-Fi location setup](#nrf54lm20b-dk--nrf7002-eb2-wi-fi-location)).

### Wiring

Expand Down Expand Up @@ -105,7 +105,7 @@ west build -b nrf54lm20dk/nrf54lm20b/cpuapp/ns -p

### Console

Open a serial terminal on **VCOM1** (uart20 — the secondary USB serial port on the nRF54LM20B DK).
Open a serial terminal on **VCOM0** (uart30 — the primary USB serial port on the nRF54LM20B DK).

Serial Modem logs appear on **VCOM1 of the nRF9151 / SMA DK** (uart1, P0.28/P0.29). Keep that terminal open alongside the host console when bringing up the link.

Expand All @@ -126,7 +126,7 @@ On the nRF54LM20B DK:

### Wiring

The shield moves the host console to **uart30** (VCOM0). Serial Modem wiring is the same as the [plain nRF54LM20B setup](#wiring-1) above (uart21 on P1).
The shield shares the same host console as the plain build (**uart30** / **VCOM0**). Serial Modem wiring is the same as the [plain nRF54LM20B setup](#wiring-1) above (uart21 on P1).

### Build

Expand All @@ -142,7 +142,7 @@ west build -b nrf54lm20dk/nrf54lm20b/cpuapp/ns -p -- \

[`boards/nrf54lm20dk_nrf54lm20b_cpuapp_ns.overlay`](../boards/nrf54lm20dk_nrf54lm20b_cpuapp_ns.overlay)

The Zephyr `nrf7002eb2` shield overlay provides the Wi-Fi companion IC devicetree and moves the console to uart30.
The Zephyr `nrf7002eb2` shield overlay provides the Wi-Fi companion IC devicetree. The base board overlay already routes the console to uart30.

### Console

Expand All @@ -158,7 +158,23 @@ On host boot, [`src/modem_reset.c`](../src/modem_reset.c) pulses nRESET (500 ms)

## Serial Modem firmware

The 91m1_ppp host application is tested with Serial Modem firmware at commit [`e23c2bde08a83e8a2908f78ee19f2b2ff5c6e46e`](https://github.com/nrfconnect/ncs-serial-modem/commit/e23c2bde08a83e8a2908f78ee19f2b2ff5c6e46e). Check out that commit in the [ncs-serial-modem](https://github.com/nrfconnect/ncs-serial-modem) repository, then build from the Serial Modem application directory:
The 91m1_ppp host application is tested with Serial Modem release [`v2.0.0-preview2`](https://github.com/nrfconnect/ncs-serial-modem/releases/tag/v2.0.0-preview2). Download the external-MCU bundle for the nRF9151 / SMA DK:

[`serial_modem_v2.0.0-preview2_nrf9151dk_extmcu.zip`](https://github.com/nrfconnect/ncs-serial-modem/releases/download/v2.0.0-preview2/serial_modem_v2.0.0-preview2_nrf9151dk_extmcu.zip)

This build enables PPP and CMUX on **uart2** routed to the host (P0.02/P0.03 TX/RX, P0.06/P0.07 RTS/CTS, DTR/RI on P0.31/P0.30). Without the external-MCU variant, the modem listens on the USB VCOM UART instead — the host will see `init_chat_script: timed out`.

Extract the zip and flash `serial_modem_v2.0.0-preview2_nrf9151dk_extmcu.hex` on the nRF9151 / SMA DK:

```shell
nrfutil device program --firmware serial_modem_v2.0.0-preview2_nrf9151dk_extmcu.hex --recover
```

The same bundle is attached to every [SMHA release](../../../doc/release-artifacts.md#serial-modem-firmware-nrf9151-dk). CI on-target tests flash this image automatically before each 91m1 run.

### Building Serial Modem from source (optional)

To match an unreleased Serial Modem commit, check out the desired revision in the [ncs-serial-modem](https://github.com/nrfconnect/ncs-serial-modem) repository and build from the Serial Modem application directory:

```shell
west build -p -b nrf9151dk/nrf9151/ns -- \
Expand All @@ -167,6 +183,4 @@ west build -p -b nrf9151dk/nrf9151/ns -- \
-DCONFIG_SM_LOG_LEVEL_DBG=y
```

The `overlay-external-mcu.overlay` file routes Serial Modem to **uart2** on P0.02/P0.03 (TX/RX) and P0.06/P0.07 (RTS/CTS), with DTR/RI on P0.31/P0.30. Without this overlay, the modem listens on the USB VCOM UART instead — the host will see `init_chat_script: timed out`.

See the [Serial Modem getting started guide](https://docs.nordicsemi.com/bundle/addon-serial_modem-latest/page/gsg_guide.html#building_and_running) for workspace setup and how to flash Serial Modem firmware on the nRF9151 / SMA DK.
See the [Serial Modem getting started guide](https://docs.nordicsemi.com/bundle/addon-serial_modem-latest/page/gsg_guide.html#building_and_running) for workspace setup.
2 changes: 1 addition & 1 deletion applications/91m1_ppp/overlay-location.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# -DEXTRA_CONF_FILE=overlay-location.conf \
# -DSB_EXTRA_CONF_FILE=sysbuild-location.conf

# EB2 shield moves the console to uart30 (VCOM0).
# EB2 shield build; console already on uart30 (VCOM0) from the board overlay.
CONFIG_UART_30_INTERRUPT_DRIVEN=y
CONFIG_UART_30_ASYNC=n

Expand Down
Loading
Loading