Updated on 2022-02-24 GMT+08:00

Device Integration

In CoAP or LWM2M access scenarios, devices can be connected to the IoT platform by integrating NB-IoT modules or LiteOS SDK.

Integrating NB-IoT Modules

Devices integrated with NB-IoT modules can connect to the IoT platform through NB-IoT networks.

Features

  • Wide coverage: The gain is 20 dB higher than that of LTE.
  • Low power consumption: The solution focuses on applications with small data volume at a low rate.
  • Massive amounts of connections: A single sector supports a maximum of 50,000 connections.
  • Low cost: NB-IoT chipsets or modules are cost-effective for its low rate, low power consumption, and low bandwidth.

Scenarios

Low requirements on data timeliness, small data packets, fixed locations, and power supply from batteries. For example, smart metering and smart street lamp.

Applicable Networks

  • NB-IoT network: constructed by carriers
  • NB-IoT SIM card: purchased from NB-IoT network carriers
  • NB-IoT module: purchased from the module manufacturers

Communication Protocols

CoAP/LWM2M

Related Resources

Obtain more information and support from the module manufacturer.

Integrating LiteOS SDK

LiteOS SDK is a lightweight SDK integrated on the device. Its features are as follows:

Features

  • Protocols and security details are shielded. Users can focus on their applications without paying attention to the implementation of protocols and security policies.
  • An adaptation layer is provided. Users can migrate LiteOS SDK by adapting only a few interfaces.
  • Data reported by devices can be cached and retransmission and acknowledgment mechanisms are provided to ensure data reporting reliability.
  • Firmware upgrade, resumable download, and integrity protection for firmware packages are supported.
  • Security and non-security connection modes are supported.

Running Environment Requirements

RAM > 32KB

FLASH > 128KB

Applicable Networks

NB-IoT, 2G/3G/4G, and wired network

Communication Protocols

CoAP and LWM2M

Related Resources

For details about how to integrate the LiteOS SDK, see LiteOS SDK Integration Development Guide.

AT Command

AT commands are used to control devices. The following AT commands are for reference only. Obtain the command set from the corresponding module manufacturer.

AT Command

Function

Remarks

AT+CMEE=1

To query an error.

Standard AT command.

AT+CFUN=0

To power off a device. Shut down a device before setting the IMEI and IP address of the IoT platform.

Standard AT command.

AT+CGSN=1

To query an IMEI. The IMEI is a type of device ID. When an NA server calls an API to register a device, nodeId and verifyCode must be set to the IMEI.

Standard AT command.

AT+NTSETID=1,xxxx

xxxx indicates an IMEI. If an IMEI is not found, you can set an IMEI that is unique.

The IMEI is a type of device ID. When an NA server calls an API to register a device, nodeId and verifyCode must be set to the IMEI if the device uses a HiSilicon chipset. If the device uses a Qualcomm chipset, nodeId and verifyCode must be set to urn:imei:IMEI.

Proprietary AT command of the HiSilicon chipset, which stores the IMEI in the flash memory. This parameter is used when the NA server registers with the IoT platform. Other chipset or module manufacturers can refer to this parameter.

AT+NCDP="IP","port"

Set the IP address and port number of the IoT platform connected to the device. 5683 is a non-encrypted port and 5684 is a DTLS encrypted port.

Proprietary AT command of the HiSilicon chipset, which stores the IP address and port number in the flash memory. This parameter is used when the NA server registers with the IoT platform. Other chipset or module manufacturers can refer to this parameter.

AT+CFUN=1

To power on a device.

Standard AT command.

AT+NBAND= frequency band

To set the frequency band.

Proprietary AT command of the HiSilicon chipset, which stores the frequency band in the flash memory. This parameter is used when the device is connected to a network. Other chipset or module manufacturers can refer to this parameter.

AT+CGDCONT=1,"IP","CTNB"

To set the APN of the core network. The APN is related to the sleep and keep-alive modes of a device and must be confirmed with the carrier.

Standard AT command.

AT+CGATT=1

To access a network.

Standard AT command.

AT+CGPADDR

To obtain the IP address of a device.

Standard AT command.

AT+NMGS=x,xxxx

To send downstream data. The first parameter indicates the number of bytes, and the second parameter indicates the reported hexadecimal stream.

Proprietary AT command of the HiSilicon chipset. Data transmitted for the first time is used for device registration, and after a device is registered, only data is sent. Other chipset or module manufacturers can refer to this parameter.

AT+NQMGR

To receive downstream data.

Proprietary AT command of the HiSilicon chipset. It is used to query the amount of data that can be received in the receive buffer, the total number of received messages, and the number of discarded messages. Other chipset or module manufacturers can refer to this parameter.

AT+NMGR

To read data.

Proprietary AT command of the HiSilicon chipset. The command is used to read data received from the IoT platform (LWM2M server). Other chipset or module manufacturers can refer to this parameter.