OneNET IoT Platform Platform Introduction Introduction Manual Guidline for Device Development Guideline for Application Development
API
API Usage API List SDK MQTT LwM2M EDP Modbus TCP
HTTP Push

LwM2M Access Instructions

The test access process incliudes platform domain and device domain, to help you experience the first access, to gain a general understanding of the functions and access protocol of the platform.

Test flow chart: Access process based on NB modules/SDK: pic

Access steps

Step1 Create product and select access protocol First you need to create a NB-IoT product on the platform, and select LWM2M protocol when selecting device access protocol. (Because NB-IOT device needs to access the platform through NB base station, please select "NB-IoT" when creating product), specific creation steps can view Product Create

If you don't have OneNET account, you can proceedUser Registration

After product creation, record its user ID.

Step2 Create device, record device ID and other information

There are two ways to create device: The first one, Click “add device” button at the web page, input device name and authentication information (i.e. IMEI, IMSI). For the specific platform resource model, refer to Resource Model, and record the device number.

The second one, create device by calling API for device creation, input the device name, access protocol, authentication information, and MasterKey and other information to create device on the platform.

Step3 transplant SDK or carry NB modules, and establish UDP connection

Actual acccess method Combining with NB-IOT device, currently there are two main types:

The first one, NB-IOT device piggybacks NB modules that have been connected to OneNET platform. Device connects with NB module, NB base station and core network to interact with OneNET platform and establish UDP connection with bootstrap server.

The specific method is to send AT command to modules after device is powered on, and enable UDP connection between the device and platform by carrying endpoint name parameters (i.e. authentication information IMEI, IMSI, etc. ). After connection succeeds, bootstrap server will return LWM2M access server address and port;

Some of the NB modules connected to OneNET platform are shown in the following table:

Manufacturer Name Product Type Product Model
FIBOCOM Module N700-CN
QUECTEL Module BC95
CHEERZING Module ML5330
SIMCom Module SIM7000C-N
H3C Module IM2209
ZXIC Chip RoseFinch7100
QUALCOMM Chip MDM9206
MTK Chip MT2625
HUAWEI HiSilicon Chip Boudica120
HUAWEI HiSilicon Chip Boudica150

The second one, NB modules on NB-IOT device is not connected to OneNET platform. Suggests two ways for this situation: The first way is to adapt NB modules to access OneNET ; another way requires the user to download NB-IoT SDK, carry out the corresponding development work and transplant itself to MCU of the device.

If SDK is transplanted to MCU successfully, after bootstrap server address, port number, and endpoint name parameters (i.e., authentication information IMEI, IMSI, etc.) be configured in MCU, and then can enable UDP connection with bootstrap server by SDK. After connection succeeds, bootstrap server will return LWM2M access server address and port.

Bootstrap server domain name: iot.zong.com.pkPort number: 5683

Step4 Establish protocol connection between device and platform

After device acquires the address of LWM2M access server in Step3, it will automatically complete protocol connection with platform.

If connection succeeds, an online token will be seen in device information: pic

Step5 Device resource list view

After device is online in Step4, can enter the resource list of device to view information by clicking the rightmost button “Resource List”. After device goes online, will upload resource list to platform, and platform can read, write, execute, and subscribe to these resources.

In resource list, you can see object names and number of instances and attributes under the device. pic

Step6 View device attributes, Operate resource data

After seeing device resource list in Step5, click a specific object name to see the specific object instance and attribute values under the object instance. On this page, you can read, write, execute, and view details of a specific attribute to complete its actual operation on the device. pic

Step7 Develop NB-IOT application in combination with actual scenarios Through the above operations of Step1-6, it can enable actual operations of connection, resource list viewing, reading, writing, and execution of object attributes for specific NB-IOT device, and meet the whole NB-IOT application in NB environment.

Common Problems

Q1: Terminal cannot connect with OneNET

A: First, to determine whether the terminal is properly connect to NB network, which can be determined by checking terminal IP address. If registration cannot be completed after the terminal obtained IP address, it is likely that NB core network limits OneNET.

Q2: SDK initialization module failed

A: When SDK starts, it will first configure the working mode of current module to connect to NB network. The configuration is done through a series of AT commands. It should be noted that modules take some time to process each AT instruction, so it is suggested that AT instruction can be delayed for several seconds, otherwise the initialization process will fail.

Q3: Unable to connect to platform, and return 4.03

A: 4.03 Forbidden means authentication fails, usually because of imei and imsi are incorrect. Platform is authenticated by endpoint name of device, which in the form of imei; the semicolon is in the middle of imsi.

Q4: Why is the device offline on OneNET portal page

A: The device online status is only related to whether lifetime expires. lifetime is a parameter of device connection (Register), and unit is second, defaulting to 86400 if not specified. When lifetime expires, platform will kick device off the line, so that device can not report data, but only reconnect (Register). Device can extend lifetime by sending Register Update message when lifetime has not expired.

Q5: Read/Write/Execute returns TIME_OUT

A: TIME_OUT is because the platform did not receive response from device within timeout period (25 seconds), there are several possibilities:

1) Network connection session is reclaimed by core network. NB-IOT device connected to the platform through core network. If the device does not have uplink and downlink activities for certain time (it varies from place to place and usually is several minutes), core network will recover connection, so that the message sent from the platform cannot reach the device

2) Network issue, NB-IOT network is unstable. Although CoAP has retransmission mechanism, it may still fail to complete the process of platform-to-device request response within 25 seconds.

Q6: Execute interface cannot send binary data

A: In LwM2M protocol, the parameters Execute operated are strings. Binary is not supported. To send binary, you can use Write operation, and refer to API file to write resource interface.

Q7: Only one data is saved to the platform every 5 minutes when continuously upload data

A: CoAP protocol filters duplicate messages by message id and token. For the Notify message, as each token is the same, when the message id remains the same, it will be filtered as a duplicate message. The time window for filtering repeated message is 247 seconds, i.e., all repeated messages within 247 seconds are filtered after the first message is processed.

Q8: The uploaded Integer/Float/string data is displayed as the form of [10, 100, 123] A: No standard resource model defined by IPSO is used. For Object ID and Resource ID of non-IPSO model, the platform cannot determine the resource data type of and can only process it in binary.

Q9: Whether the platform support DTLS encrypted transmission A: Public-key-based DTLS encryption (using coaps and 5684 port connections) is currently supported, and DTLS encryption based on PSK and X.509 certificates will be supported in the future.

results matching ""

    No results matching ""