Skip to content

Add CoAP protocol support to serial modem#179

Closed
zavdimka wants to merge 2 commits into
nrfconnect:mainfrom
zavdimka:main
Closed

Add CoAP protocol support to serial modem#179
zavdimka wants to merge 2 commits into
nrfconnect:mainfrom
zavdimka:main

Conversation

@zavdimka
Copy link
Copy Markdown

Description

This PR adds CoAP (Constrained Application Protocol) support to the ncs-serial-modem application, enabling IoT/M2M communication over the CoAP protocol.

Changes

  • New file: app/src/sm_at_coap.c - Full CoAP protocol implementation

    • Support for up to 3 simultaneous CoAP connections
    • CoAP socket management and message handling
    • TLS/DTLS credential support for secure communication
    • CoAP payload buffering (512 bytes max)
  • Updated: app/CMakeLists.txt

    • Added sm_at_coap.c to build system with CONFIG_COAP conditional compilation

Features

  • Multiple concurrent CoAP contexts
  • Secure communication via TLS/DTLS
  • Full CoAP message handling
  • Integration with existing AT command interface

How to Test

Enable CoAP support in your configuration with CONFIG_COAP=y

@zavdimka zavdimka force-pushed the main branch 3 times, most recently from 8e61a7b to 008ac0e Compare February 17, 2026 17:10
- Implement sm_at_coap.c with CoAP protocol handling
  - Support for multiple CoAP contexts (up to 3 simultaneous connections)
  - CoAP socket management and message handling
  - TLS/DTLS credential support
  - CoAP payload buffering (512 bytes)

- Update CMakeLists.txt to include CoAP source file
  - Add conditional compilation with CONFIG_COAP flag
  - Integrate sm_at_coap.c into the build system

- Add overlay-coap.conf

This enables CoAP protocol communication capabilities in the serial modem application.

Signed-off-by: Dmitrii Zavrazhnov <zavdimka@gmail.com>
@trantanen
Copy link
Copy Markdown
Collaborator

Thanks for the contribution. We do have CoAP AT command API in our backlog. It will likely appear in the public repository during April.

@trantanen
Copy link
Copy Markdown
Collaborator

We are merging PR #283 this week to bring in CoAP client functionality into Serial Modem.
Wi-Fi related AT commands are something we won't have in the mainline since that functionality is not available in 9151 SiP. If you need them you can keep them in your own patch.
Could we close this PR?

@trantanen
Copy link
Copy Markdown
Collaborator

We are merging PR #283 this week to bring in CoAP client functionality into Serial Modem. Wi-Fi related AT commands are something we won't have in the mainline since that functionality is not available in 9151 SiP. If you need them you can keep them in your own patch. Could we close this PR?

I'm closing this PR now. You can still add comments if you have any questions.

@trantanen trantanen closed this Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants