soonisys
www.soonisys.comdocs.soonisys.com
nRF9160 M.2 Module
nRF9160 M.2 Module
  • PRODUCTS DETAIL
    • nRF9160 M.2 Module
    • nRF9160 M.2 Development Kit
  • DEVELOPMENT
    • Getting Started-SDK v2.3.0
    • Getting Started-Legacy
      • Installation
      • Hello World - Sample
      • Create Project
      • Cat-M1 + UDP
      • Serial LTE Modem
    • Resources
    • Sim Cards
Powered by GitBook
On this page
  • 1. Edit 'Serial LTE Modem' Application
  • 1.1 Create file 'soonisys_sldev_nrf9160ns.overlay'
  • 1.2 Edit file 'sample.yaml'
  • 1.3 Edit file 'prj.conf'
  • 2. Build and Run
  • 3. Test
  • 3.1 Serial Commands - LTE Connection
  • 3.2 Serial commands - UDP Send&Recv(Socket)
  • 3.3 Serial commands - LTE Disconnection
  • 4. Reference
  1. DEVELOPMENT
  2. Getting Started-Legacy

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

  1. AT+CFUN=1

  2. AT+CFUN?

LTE Link Monitor will send requests after 'AT+CFUN?'

3.2 Serial commands - UDP Send&Recv(Socket)

  1. AT#XSOCKET=1,2,0 (Create UDP socket with ipv4)

  2. AT#XCONNECT="3.37.91.140",39633 (Connect to soonisys's echo server)

  3. AT#XSEND="Hello soonisys" (Send packet to connected server)

  4. AT#XRECV=1 (Recv packet, timeout=1sec)

  5. AT#XSOCKET=0 (Close socket)

3.3 Serial commands - LTE Disconnection

  1. AT+CFUN=0

4. Reference

PreviousCat-M1 + UDPNextResources

Last updated 3 years ago

Installation
Hello World - Sample
nRF9160: Serial LTE modem — nRF Connect SDK 1.7.1 documentation
Logo
prj.conf - uart0
prj.conf - uart1
open project
LTE Link Monitor
simple udp send&recv