IoTIoT

Compute
Elastic Cloud Server
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
Domain Name Service
VPC Endpoint
Cloud Connect
Enterprise Switch
Security & Compliance
Anti-DDoS
Web Application Firewall
Host Security Service
Data Encryption Workshop
Database Security Service
Advanced Anti-DDoS
Data Security Center
Container Guard Service
Situation Awareness
Managed Threat Detection
Compass
Cloud Certificate Manager
Anti-DDoS Service
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GaussDB NoSQL
GaussDB(for MySQL)
Distributed Database Middleware
GaussDB(for openGauss)
Developer Services
ServiceStage
Distributed Cache Service
Simple Message Notification
Application Performance Management
Application Operations Management
Blockchain
API Gateway
Cloud Performance Test Service
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
DevCloud
ProjectMan
CodeHub
CloudRelease
CloudPipeline
CloudBuild
CloudDeploy
Cloud Communications
Message & SMS
Cloud Ecosystem
Marketplace
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP License Service
Support Plans
Customer Operation Capabilities
Partner Support Plans
Professional Services
enterprise-collaboration
Meeting
IoT
IoT
Intelligent EdgeFabric
DeveloperTools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Updated at: Feb 24, 2022 GMT+08:00

Configuring Service Parameters

API Function

This API is used to set the parameters required for login.

API Description

1
2
HW_INT IOTA_ConfigSetStr(HW_INT iItem, HW_CHAR *pValue) 
HW_INT IOTA_ConfigSetUint(HW_INT iItem, HW_UINT uiValue)

Parameter Description

Parameter

Mandatory or Optional

Type

Description

key

Mandatory

int

Specifies the configuration item for logging in to the device.

  • Device ID: EN_IOTA_CFG_DEVICEID.
  • App ID: EN_IOTA_CFG_APPID.
  • Secret: EN_IOTA_CFG_DEVICESECRET.
  • HTTP address: LEN_IOTA_CFG_IOCM_ADDR.
  • HTTP port: EN_IOTA_CFG_IOCM_PORT.
  • MQTT address: EN_IOTA_CFG_MQTT_ADDR.
  • MQTT port: EN_IOTA_CFG_MQTT_PORT.

value

Mandatory

String

Specifies the value of the configuration item.

  • Device ID: obtain the value from the callback that is bound.
  • App ID: obtain the value from the callback that is bound.
  • Secret: obtain the value from the callback that is bound.
  • HTTP address: southbound access address for the AgentLite to connect to the IoT platform.
  • HTTP port: 8943.
  • MQTT address: southbound access address for the AgentLite to connect to the IoT platform.
  • MQTT port: 8883.

Return Value

For details, see 4.2 Function Return Values.

Example

1
2
3
//Developers call this API to configure parameters.
IOTA_ConfigSetStr (EN_IOTA_CONFIG_IOCM_ADDR, "10.0.0.1");
IOTA_ConfigSetUint(EN_IOTA_CFG_IOCM_PORT, 8943);

Did you find this page helpful?

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel