NB-IoT Suite Product Introduction QuickStart User Guide Device Development Guide Application Development Guide Best Practices FAQ Service agreement Update Log

Instance of NB device access based on MCU


The MCU-based method realizes NB device access, that is, by transplanting the SDK to the device MCU, and connecting to the OneNET platform through the interaction between the MCU and the module.
This situation is suitable for the experimental stage or when the terminal device has an urgent desire to access the OneNET platform, but the module used by the device does not support access to the OneNET platform.

The specific access instance and procedures are as follows:

(1)First of all, transplant SDK to the MCU needing to be connected to OneNET.

(2)Network configuration Conduct network configuration on the device side before connecting to OneNET platform:

Including the address and authorization information of the access machine (namely IMEI and IMSI)


Meanwhile, it’s also necessary to finish the allocation of the interaction resource between the device and the platform. In SDK on the device side, the temperature and humidity of the device sensor, such as temperature and humidity sensor, can be expressed as two resources respectively. After the configuration of resource attribute, the device server-side will subscribe all resources in the resource list from the device.
Property Description
objid Describe the device sensor type.
instid Describe the serial number of the sensor.
resid Describe certain type of data of the sensor, such as the current value, maximum value and minimum value of temperature.
flag Operability of the resource, including readable/writeable/executable resources
type Data type of the resource; the types supported include
    bool/int/float/string/bin|

|write| Hook function for the user to write the resource| |execute| Hook function for the user to execute the resource|

Note: objid and resid can’t be arbitrarily defined, and they shall follow <IPSO-Smart-Objects-Expansion-Pack>

Configuration example :

(3)Heartbeat setting SDK on the device side will set the lifetime value during initialization, and ...After SDK expires, it will actively send Update message to the server. If the server side fails to receive Update message,... and sends RST message to the device.

(4)Data transmission If the resource value is updated, nbiot_device_notify shall be invoked to notify ..., and SDK will upload it to onenet.

(5)Downlink treatment The command is sent by the third party application to onenet, and will then be forwarded to the terminal device by the cloud platform. SDK will automatically call the write hook function or execute hook function in the corresponding resource of the command, and compile the two functions to finish the processing the the downlink command.

个搜索结果,搜索内容 “

    0 个搜索结果,搜索内容 “