Serial LTE Modem
Let's build and test 'Serial LTE Modem' application with nRF9160 M.2 Development Kit.
'Serial LTE Modem' Application is located at C:\ncs\v1.7.1\nrf\applications\serial_lte_modem
1. Edit 'Serial LTE Modem' Application
1.1 Create file 'soonisys_sldev_nrf9160ns.overlay'
&uart2 {
compatible = "nordic,nrf-uarte";
current-speed = <115200>;
status = "okay";
tx-pin = <17>;
rx-pin = <18>;
};
&i2c2 {
status = "disabled";
};
You can change any pin for uart-2 tx/rx.
1.2 Edit file 'sample.yaml'
sample:
name: serial lte modem sample
tests:
samples.nrf9160.serial_lte_modem:
build_only: true
platform_allow: soonisys_sldev_nrf9160ns
tags: ci_build
samples.nrf9160.serial_lte_modem.native_tls:
build_only: true
extra_args: OVERLAY_CONFIG=overlay-native_tls.conf
platform_allow: soonisys_sldev_nrf9160ns
tags: ci_build
1.3 Edit file 'prj.conf'
Edit SLM(Serial LTE Modem) part in prj.conf.
You can select either uart0(connected to usb) or uart2(pin) and change the interface pin(12) for sleep&wake.
UART-0(USB) USE CASE

UART-2(Tx/Rx PIN) USE CASE

2. Build and Run

3. Test

Launch 'LTE Link Monitor'
Connect to USB COM Port
Check 'Automatic requests'
Uncheck 'Flow control'
3.1 Serial Commands - LTE Connection
AT+CFUN=1
AT+CFUN?
3.2 Serial commands - UDP Send&Recv(Socket)
AT#XSOCKET=1,2,0 (Create UDP socket with ipv4)
AT#XCONNECT="3.37.91.140",39633 (Connect to soonisys's echo server)
AT#XSEND="Hello soonisys" (Send packet to connected server)
AT#XRECV=1 (Recv packet, timeout=1sec)
AT#XSOCKET=0 (Close socket)

3.3 Serial commands - LTE Disconnection
AT+CFUN=0
4. Reference
InstallationHello World - SampleLast updated