> For the complete documentation index, see [llms.txt](https://cocolinx.gitbook.io/cocolinx-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cocolinx.gitbook.io/cocolinx-docs/home/english/nrf9151-som/default-firmware-sm.md).

# Default Firmware (SM)

## **Overview**

SM allows the LTE-M module to be used like a **serial-based cellular modem** using standard **AT commands**.\
This enables quick and easy cellular connectivity from a **PC, MCU, or SBC (e.g. Raspberry Pi)** without implementing a full LTE protocol stack.

## **What is Serial LTE Modem?**

Serial LTE Modem (SLM) is firmware that turns the LTE module into a **UART / USB controlled modem**.

Key characteristics:

* AT command-based control
* No SDK or LTE stack required on the host
* Works with PC and external MCU
* Supports common networking features such as TCP, UDP, and MQTT

## **Getting Started**

#### 1. Hardware Connection

* **Connect via USB or UART**
  * &#x20;**SM Commands**
    * **nRF9151-SOM**: TX: GPIO 21, RX: GPIO 22
    * **SOM Carrier Board**: USB port
  * **Debug Logs**
    * **nRF9151-SOM**: TX: GPIO 10, RX: GPIO 11
    * **SOM Carrier Board**: TX: GPIO 10, RX: GPIO 11
* Default baud rate: **115200 bps**

#### 2. TCP and UDP AT Commands

The device currently runs Serial Modem v2.0.0. For AT commands and related documentation, please refer to the link below.

{% embed url="<https://nrfconnectdocs.nordicsemi.com/addons/addon-serial_modem/2.0.0/main/index.html>" %}

#### 4. Practical Testing Scenarios

<figure><img src="https://4012614526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuolW15Ii136DOeL4XvSy%2Fuploads%2Fotc0qBrM8tLuhlv2vhaL%2Fimage.png?alt=media&amp;token=678fcdf7-6241-4c36-b071-161d5d3fd94c" alt=""><figcaption><p>Initial output of SLM Commands Uart</p></figcaption></figure>

<figure><img src="https://4012614526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuolW15Ii136DOeL4XvSy%2Fuploads%2FXpylidWwIUHu06xWo7up%2Fimage.png?alt=media&amp;token=120938d1-d15c-47f6-953a-17e0ffa9e93c" alt=""><figcaption><p>Initial output of Debug Logs Uart</p></figcaption></figure>

This is the initial screen displayed when SLM is powered on.

```
AT+COPS=1,2,"45005" // plmn select to SKT
AT+CFUN=1 // Set the device to full functionality
AT+CGATT? // Check the packet service attach status of the module
AT#XSOCKET=1,2,0 // Open IPv4 UDP Socket
AT#XCONNECT=0,"echo.cocolinx.com",7777 // Connect to "echo.cocolinx.com" udp echo server
AT#XSEND=0,0,0,"Hello World" // Send data to "echo.cocolinx.com"
AT#XRECV=0,0,0,3 // Receive data over the connection with timeout 3s
```

In this test, the following commands are executed in order.

<figure><img src="https://4012614526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuolW15Ii136DOeL4XvSy%2Fuploads%2FeLcXoJ5jZo83yFY6Hycq%2Fimage.png?alt=media&amp;token=9ce2db55-d1ff-41b1-b1bb-1397f092bc46" alt=""><figcaption></figcaption></figure>

As shown in the image above, after connecting to the SKT network, a socket is opened and a connection is made to a UDP echo server. When “Hello World” is sent, the same “Hello World” message is received in return.

<figure><img src="https://4012614526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuolW15Ii136DOeL4XvSy%2Fuploads%2FIa5r7nHn68moDbA9yQDw%2Fimage.png?alt=media&amp;token=f9da919c-fc5f-49aa-9694-7b921592b937" alt=""><figcaption></figcaption></figure>

If an error occurs, the following message will appear in the debug log.
