Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.
- What's New
- Product Bulletin
- Service Overview
- Getting Started
-
User Guide
- Edge Computing with IEF
- Service Instances
-
User Guide (Professional)
- Node Management
-
End Device Management
- End Devices and Device Twins
- Device Templates
- End Devices
- Binding an End Device to an Edge Node
- Device Twin Working Principles
- Migrating Device Data to the Cloud
- Performing Security Authentication Using Certificate
-
MQTT Topics
- Device Twin Update
- Device Twin Delta
- Device Member Update
- Device Property Update
- Device Member Acquisition
- Device Member Acquisition Result
- Device Twin Acquisition
- Device Twin Acquisition Result
- Device Twin Modification
- Device Twin Modification Result
- Encryption Data Request
- Encryption Data Acquisition
- Alarm Reporting
- Alarm Clearance
- Custom Topics
- Containerized Application Management
- Edge-Cloud Messages
- Batch Management
- Auditing
- Permissions Management
-
User Guide (Platinum)
- Node Management
-
End Device Management
- End Devices and Device Twins
- Device Templates
- End Devices
- Binding an End Device to an Edge Node
- Device Twin Working Principles
- Migrating Device Data to the Cloud
- Performing Security Authentication Using Certificate
-
MQTT Topics
- Device Twin Update
- Device Twin Delta
- Device Member Update
- Device Property Update
- Device Member Acquisition
- Device Member Acquisition Result
- Device Twin Acquisition
- Device Twin Acquisition Result
- Device Twin Modification
- Device Twin Modification Result
- Encryption Data Request
- Encryption Data Acquisition
- Alarm Reporting
- Alarm Clearance
- Custom Topics
- Containerized Application Management
- Application Mesh
- Edge-Cloud Messages
- Batch Management
- Auditing
- Permissions Management
- Best Practices
-
API Reference
- Before You Start
- API Overview
- Calling APIs
-
API
-
Edge Node Management
- Registering an Edge Node
- Updating an Edge Node
- Querying Details About an Edge Node
- Querying a List of Edge Nodes
- Deleting an Edge Node
- Starting or Stopping an Edge Node
- Updating End Devices for an Edge Node
- Querying Node Certificates
- Creating a Node Certificate
- Deleting a Node Certificate
- Performing an Edge Node Upgrade Check
- Upgrading Edge Nodes
- End Device Management
- End Device Template Management
-
Application Template Management
- Creating an Application Template
- Updating an Application Template
- Querying Details About an Application Template
- Querying a List of Application Templates
- Deleting an Application Template
- Creating an Application Template Version
- Updating an Application Template Version
- Querying Details About an Application Template Version
- Querying a List of Application Template Versions
- Deleting an Application Version
- Deployment Management
- Tag Management
- ConfigMap Management
- Secret Management
- Endpoint Management
- Rule Management
- System Subscription Event Management
- Batch Node Management
- Batch Job Management
- Quota Management
- Service Management
-
Edge Node Management
- Data Structure
- Permissions Policies and Supported Actions
- Appendix
- Change History
- SDK Reference
-
FAQs
-
Edge Node FAQs
- What Do I Do If an Edge Node Is Faulty?
- What Are the Fault Scenarios of Edge Nodes?
- What Do I Do If Edge Node Management Fails?
- How Do I Obtain the Latest Device Properties After Device Properties Are Updated?
- What Operations Can I Perform After a Device Is Associated with a Node?
- Does an Edge Node Support Multiple GPUs?
- Can I Change the GPU on a Running Edge Node?
- How Is Edge Environment Security Protected?
- Why Cannot I View Monitoring Data on an Edge Node?
- How Can I Restore a Deleted Edge Node?
- What Is the Impact of IP Address Changing on an Edge Node?
- What Do I Do If the NTP Configuration Cannot Be Modified?
- How Do I Synchronize Time with the NTP Server?
- How Do I Obtain the IP Addresses of IEF Cloud Services?
- What Do I Do If the Edge Node Space Is Insufficient?
- How Do I Set Docker Cgroup Driver After Installing Docker on an Edge Node?
-
Edge Application FAQs
- What Do I Do If an Application Fails to Be Delivered to an Edge Node?
- What Do I Do If a Containerized Application Fails to Be Started on an Edge Node?
- What Do I Do If a Containerized Application Fails to Be Upgraded?
- What Do I Do If a Container Image Fails to Be Pulled?
- Why Cannot I View Application Logs and System Logs?
- How Do Applications Schedule GPU Resources?
- How Do I Control the Disk Space Occupied by a Container Engine?
- What Do I Do If a Containerized Application Cannot Access External IP Addresses
- What Do I Do If the Ascend AI Accelerator Card (NPU) Is Abnormal?
-
Edge-Cloud Message FAQs
- What Is Route Management?
- What Is a Message Endpoint in Route Management?
- What Is a Route?
- Why Does a Route Fail to Be Created?
- What Can I Do If a Message Fails to Be Forwarded over a Route?
- What Is the Impact of Disabling a Route?
- What Can I Do If SystemEventBus (MQTT Broker) of an Edge Node Fails to Be Connected?
- Network Management FAQs
- Basic Concept FAQs
-
Others
- Region and AZ
- What Are the Specifications of Edge Nodes Supported by IEF?
- What Are the Differences Between Device Properties and Device Twins?
- What Programming Language Is Required for IEF Development?
- Do I Need to Prepare Edge Nodes by Myself?
- Can I Still Use the Previously Delivered Applications After My Account Is in Arrears?
- What Are the Differences Between IEF and IoT Edge?
- What Do I Do If an Agency Fails to Be Automatically Created?
- How Can I Deal With Insufficient Permissions?
- How Will the Multi-AZ Reconstruction of SWR Application Container Image Data Affect IEF?
-
Edge Node FAQs
-
Edgectl User Guide
- Overview
- Installing edgectl
- Example: Using edgectl to Run Commands
-
edgectl Commands
- Querying the edgectl Version
- Managing the Product Lifecycle
-
Checking an Item
- Checking the Hardware Architecture
- Checking the CPU
- Checking the Memory
- Checking Hard Disks
- Checking the Domain Name Resolution Function
- Checking Docker
- Checking Network Connectivity
- Checking the Installation Status of the IEF Software
- Checking the Running Status of the IEF Software
- Checking GPUs
- Checking NPUs
- Checking Processes
-
Error Codes
- Error Code Overview
- Common Errors
- Permission Errors
-
OS Errors
- ERROR3001 Failed to obtain the hardware architecture
- ERROR3002 Unsupported hardware architecture
- ERROR3101 Failed to obtain the CPU information of the node
- ERROR3102 Failed to obtain the real-time CPU status of the node
- ERROR3103 Insufficient node CPU
- ERROR3201 Failed to obtain the memory information of the node
- ERROR3202 Insufficient node memory
- ERROR3301 Failed to obtain the disk information of the node
- ERROR3302 Insufficient disk space on the node
- ERROR3401 Failed to resolve the domain name
- ERROR3501 Failed to check the network
- ERROR3601 Failed to obtain the process information of the node
- ERROR3602 Failed to obtain the total number of processes on the node
- ERROR3603 Number of remaining processes on the node is insufficient
-
IEF Software Errors
- ERROR5001 Incomplete IEF software installation
- ERROR5002 IEF software is not completely running
- ERROR5003 Failed to read the IEF software configuration file
- ERROR5004 Docker is not enabled for the IEF software
- ERROR5005 Failed to start the IEF software
- ERROR5006 Failed to stop the IEF software
- ERROR5101 No application data found
- ERROR5102 No status data of the application found
- ERROR5103 Container is not started
- ERROR5104 Container exits abnormally
- ERROR5105 Failed to pull the container image
- ERROR5106 Container exits
- Third-Party Dependency Errors
- Data Collection Errors
- Internal Errors
- Videos
- General Reference
Copied.
Cloud Delivering Messages to Edge Nodes
Scenario
IEF can deliver messages from SystemREST in the cloud to SystemEventBus (MQTT broker) on edge nodes.
To be specific, IEF calls the open REST gateway interface to send messages to SystemEventBus on an edge node based on the node ID and custom topic. Your end devices can receive messages from the cloud by subscribing to custom topics.
The procedure is as follows:
Creating a Route
SystemREST and SystemEventBus are default endpoints and do not need to be created. SystemREST indicates the REST gateway interface of IEF in the region. SystemEventBus indicates the MQTT broker of an edge node.
- Log in to the IEF console, and click Switch Instance on the Dashboard page to select a platinum service instance.
- In the navigation pane, choose Edge-Cloud Messages > Routes.
- Click Create Route in the upper right corner.
- Set parameters.
Figure 1 Creating a route
- Name: Enter a route name, for example, SystemREST2SystemEventBus.
CAUTION:
Message routes and system subscriptions are of the same resource type. Their names cannot conflict with each other.
- Source Endpoint: Select SystemREST.
- Source Endpoint Resource: Enter a URL path starting with a slash (/). You can use {} for fuzzy match. For example, /aaa/{any-str}/bbb can match /aaa/ccc/bbb or /aaa/ddd/bbb. The specified source resource is used as a matching field for calling the REST interface.
- Destination Endpoint: Select SystemEventBus.
- Destination Endpoint Resource: Enter the topic name prefix used when the message is forwarded to the MQTT broker.
NOTE:
If both Source Endpoint Resource and Destination Endpoint Resource are set to /, IEF will forward all messages sent to the REST interface to the MQTT broker of the corresponding edge nodes. The topic name contained in the messages is the same as the request URL.
- Name: Enter a route name, for example, SystemREST2SystemEventBus.
- Click Create.
The created route is displayed in the message route list.
Figure 2 Routes
Sending a Message
To deliver a message from SystemREST in the cloud to SystemEventBus on an edge node, obtain the SystemREST endpoint property, construct a request, and send the request to SystemEventBus through a route.
- Obtain the SystemREST endpoint property.
- Log in to the IEF console, and click Switch Instance on the Dashboard page to select a platinum service instance.
- In the navigation pane, choose Edge-Cloud Messages > Endpoints. In the row where SystemREST is located, the value of public in the Property column is the endpoint of SystemREST, as shown in the following figure.
Figure 3 SystemREST endpoint property
- Construct a request and send it.
An HTTPS request needs to be constructed and sent to SystemREST. The details are as follows:
- Method: POST
- URL: https://{rest_endpoint}/{node_id}/{topic}. In the URL, {rest_endpoint} is the endpoint obtained in 1, {node_id} is the edge node ID, and {topic} is the message topic, that is, the source endpoint resource defined in Creating a Route.
- Body: content of the message to be sent, which is user-defined.
- Header: X-Auth-Token, which is a valid token obtained from IAM. For details on how to obtain a token, see Obtaining a User Token.
For example, use Postman to send the following message:
Figure 4 Sending a message
Receiving a Message
- Log in to the edge node.
- Use the MQTT client to receive messages.
Currently, edge nodes support two types of MQTT brokers.
- Built-in MQTT broker (using port 8883): To use this type of MQTT broker, edge nodes must pass certificate authentication and subscribe to corresponding topics. For details about certificate authentication, see Performing Security Authentication Using Certificate.
- External MQTT broker (using port 1883): To use this type of MQTT broker, install a third-party MQTT broker on edge nodes and enable edge nodes to subscribe to corresponding topics.
This section describes how to use an external MQTT broker, for example, Mosquitto, to receive messages. The procedure is as follows:
- In the Ubuntu OS, run the following commands to install Mosquitto:
apt-get install mosquitto systemctl start mosquitto systemctl enable mosquitto
- In the CentOS OS, run the following commands to install Mosquitto:
yum install epel-release yum install mosquitto systemctl start mosquitto systemctl enable mosquitto
After the installation is complete, run the topic subscription command. If a message is sent after the subscription, the edge node will receive the message. In the following command, # indicates that any topic is subscribed to. You can replace # with a specified topic, for example, /aaa or /bbb.
[root@ief-node ~]# mosquitto_sub -t '#' -d Client mosq-m02iwjsp4j2ISMw6rw sending CONNECT Client mosq-m02iwjsp4j2ISMw6rw received CONNACK (0) Client mosq-m02iwjsp4j2ISMw6rw sending SUBSCRIBE (Mid: 1, Topic: #, QoS: 0, Options: 0x00) Client mosq-m02iwjsp4j2ISMw6rw received SUBACK Subscribed (mid: 1): 0 Client mosq-m02iwjsp4j2ISMw6rw received PUBLISH (d0, q0, rQ, mQ, '/aaa', ... (31 bytes)) { "test-key": "test-value" }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot