หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ IoT Device Access/ FAQs/ LwM2M/CoAP Device Access

LwM2M/CoAP Device Access

Updated on 2025-03-03 GMT+08:00

How Do I Connect Devices to the IoT Platform Through LwM2M over CoAP Protocols?

  1. Development on the platform: Create products, develop product models and codecs on the platform, and register devices. For details, see Creating a Product, Developing a Product Model, Developing a Codec, and Registering a Device.
  2. Development on the device: Use modules and Tiny SDKs on the device side for access. For details, see IoT Device SDK Tiny (C) User Guide.
  3. (Optional) Develop applications.

How Do I Know the Strength of the NB-IoT Network Signal?

Run the AT+CSQ command to query the NB-IoT signal strength.

The returned value is +CSQ. <rssi>,<ber>

A larger value of rssi indicates a stronger signal. The formula for calculating the signal strength is as follows: Signal strength = 113 dBm + (rssi x 2)

  • rssi = 0: The signal is poor.
  • rssi = 31: The signal is very strong.
  • rssi = 99: There is no signal.
  • The ber field is not used. It is fixed at 99.

If there is no signal or the signal is poor, contact the carrier.

Why Did the NB-IoT Module Not Attach to the Network?

  1. Run the AT+NUESTATS command to check whether there is a network signal.
  2. If the value of Signal power is 0, there is no network signal. Check whether the frequency band corresponding to the base station has been released, or move the device to somewhere where the signal is stronger and try again.
  3. Run the AT+NBAND? command to check whether the configured frequency band is the same as that of the module.

What Do I Do If an NB-IoT Module Failed to Be Bound to a Device?

When the NB-IoT module and real NB-IoT network are used to access the IoT platform, the first step is to bind a device.

If the device fails to be bound, you can troubleshoot the error by checking the following items:

  • When you register the device on the platform, is the value of nodeId correct? Is the timeout period too short?

    The values of nodeId must be the IMEI of the NB-IoT module. In addition, the timeout period should be long enough, so that the device can send a binding request to the platform within the period after the registration is successful.

  • Is the product information used during device registration the same as that in the product model?

    If you register the device in the IoTDA console, ensure that the correct product model is selected. If you call an API to register the device, make sure the value of deviceInfo is the same as that defined in the profile.

  • Is the signal from an NB-IoT base station reaching the module?

    Run the AT+CSQ? command to check the NB-IoT signal strength. If there is no signal or the signal strength is weak, contact the carrier.

  • Can the NB-IoT module be attached to the network?

    Run the AT+CEREG? command to obtain the network registration details. If the returned status is unregistered or rejected, contact the carrier. The version of the NB-IoT module may not match the version of the carrier's base station.

  • Can the NB-IoT module ping the Huawei Cloud IoT platform?

    Run the AT+NPING command to ping the Huawei Cloud IoT platform. If the platform cannot be pinged, it indicates that the carrier's network cannot reach the public network. Contact the carrier to check if its core network is connected to the public network and if the core network can be connected to only the carrier's IoT platform. Work with the carrier on the connection to the public network.

  • Are the domain name and port of the platform correctly set for the NB-IoT module?

    Run the AT+NCDP command to set the domain name and port of the platform. To obtain the domain name and port, log in to the IoTDA console and check the connection details of CoAP or CoAPS devices.

  • Does the AT command sent to the NB-IoT module end with \r\n?

    Each command sent to the NB-IoT module must end with \r\n. If not so, the command is cached in the NB-IoT module.

  • Is the transmitted data in the "SENT" status in the NB-IoT module?

    Run the AT+NQMGS command to check the status of the commands sent.

    PENDING: The data was sent but the platform has not responded.

    SENT: The data was sent and the platform has responded.

    ERROR: Data reporting is abnormal.

    If the status is PENDING or ERROR, there may be network issues. Check the base station and core network.

  • Can the AT+NMGS data sent by the NB-IoT module be parsed properly?

    Use the codec test tool to check whether the streams to be sent can be parsed.

What Can I Do If an NB-IoT Module Cannot Report Data?

Ensure that the NB-IoT module has been bound to a device. The binding is performed when the NB-IoT module reports the first piece of data to the IoT platform. If the binding fails, the device is not activated on the platform. In this case, resolve the fault by referring to What Do I Do If an NB-IoT Module Failed to Bind to a Device.

Let's assume that the device binding is successful and the device is displayed as online on the platform. Check the following the items:

  • Does the AT+NMGS command sent to the NB-IoT module end with \r\n?

    Each command sent to the NB-IoT module must end with \r\n. If not so, the command is cached in the NB-IoT module.

  • Can the payload of the sent AT+NMGS be parsed by the codec?

    Use the codec test tool to check the payload in the code stream to be sent. Check whether the message structure is correct and complies with the definition in the product model.

Why Was a 513 Message Reported During the Connection of an NB-IoT Device?

After being powered on, devices initiate a TUP registration flow to the IoT platform. TUP is a Huawei proprietary protocol over CoAP. It is similar to LwM2M. The TUP registration flow on HiSilicon chipsets cannot exceed 4 seconds. If the TUP registration is not completed within 4 seconds, a 513 message is reported.

When a 513 message is reported, do as follows:

  1. If a 513 message is reported due to poor network performance, contact the NB-IoT network carrier to check the network status.
  2. You are advised to restart the device and run AT+NMGS. When you send service data by running AT+NMGS, registration is triggered. If the subscription to the t/d resources (resources for receiving and sending service data) is not received within 4 seconds, an error is returned, but the registration is continued based on the CoAP-layer retransmission. Only when the subscription to the t/d resources is not received within 160 seconds, will the registration fail. The 160 seconds is sufficient for device registration. If an error message is returned after 4 seconds, only the data of the first packet is discarded. You are advised to restart the device and run AT+NMGS to trigger the registration.

    You can run AT+NMSTATUS? to query registration status. If +NMSTATUS:MO_DATA_ENABLED is returned, the registration is successful.

Why Does Data Reporting Fails When an NB-IoT Card Is Used in Another Device?

Some carriers' cards are bound to devices. If a device is changed, the card bound to the device may be unavailable. In this case, contact the carrier.

What Can I Do If I Cannot Connect a Registered NB-IoT Device to the IoT Platform?

  • Run the AT+CGATT=1 command in the module and see if there is an error reported. If there is, do as follows:
    • Contact the NB-IoT network carrier to check if the NB-IoT card works properly.
    • Contact the module manufacturer to check if the model works properly.
  • If no error is reported, check if the IP address and port number of the platform are correct.
NOTE:

You can obtain the IP address and port number from the platform service provider. Port 5683 is used for unencrypted access, whereas port 5684 is used for encrypted access.

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback