What is the Cloud-to-Cloud (formerly Generalization Protocol) SDK?

Updated at:

Alibaba Cloud IoT Platform supports communication protocols such as MQTT, CoAP, and HTTP. Other protocols, such as the fire protection protocol GB/T 26875.3-2011 and Modbus, are not currently supported. If a device cannot directly connect to Alibaba Cloud IoT Platform, you can use the Cloud-to-Cloud software development kit (SDK) to build a bridge service. This service establishes a bidirectional data tunnel between your device or platform and Alibaba Cloud IoT Platform.

Note

The Cloud-to-Cloud SDK is available only in the following regions: China (Shanghai), China (Beijing), China (Shenzhen), Germany (Frankfurt), and US (Virginia).

Service architecture

The Cloud-to-Cloud SDK is a protocol-adaptive framework. You can use it to build a bridge service for efficient, bidirectional communication with Alibaba Cloud IoT Platform.

网桥

Scenarios

  • A device cannot connect directly to Alibaba Cloud IoT Platform because of network environment or hardware limitations.

  • A device uses a protocol that Alibaba Cloud IoT Platform does not currently support.

  • A communication network already exists between a device and its access server (bridge server). You want to connect the device to Alibaba Cloud IoT Platform without modifying the device or its protocol.

  • A device is already connected to your server and requires a service upgrade.

    • Reuse Alibaba Cloud IoT Platform features, such as the over-the-air (OTA) update feature.

    • Incorporate the device into a solution based on Alibaba Cloud IoT Platform.

    • Handle other business logic as needed.

Main features

The Cloud-to-Cloud SDK enables a bridge server to communicate with Alibaba Cloud IoT Platform.

Basic features:

  • Static configuration management using a configuration file.

  • Device connection management.

  • Uplink communication.

  • Downlink communication.

    Note

    Downlink communication does not support synchronous methods, such as synchronous service invocation or revert-RPC (RRPC) communication.

Advanced features:

  • Dynamic configuration management using an interface.

  • Encapsulated interfaces for reporting property, event, and tag data. These interfaces also support batch reporting of properties and events, setting properties, and service invocation.

Glossary

Term

Description

Device

A physical Internet of Things (IoT) device that cannot use a protocol supported by Alibaba Cloud IoT Platform to communicate directly with the cloud.

Bridge server

A device access server. This server uses a specific protocol to communicate with the device and uses the Cloud-to-Cloud SDK to communicate with Alibaba Cloud IoT Platform.

Original protocol

The specific protocol used between the device and the bridge server. The Cloud-to-Cloud SDK is not concerned with the definition or implementation of the original protocol.

Original identity

The unique identifier used when the device and the bridge server communicate using the original protocol. In the Cloud-to-Cloud SDK interface parameters, originalIdentity represents the original identity of the device.

Device certificate

The device certificate information (ProductKey, DeviceName, and DeviceSecret) obtained after registering a device on Alibaba Cloud IoT Platform. In a cloud-to-cloud scenario, the device certificate is not written to the device. Instead, configure the Cloud-to-Cloud SDK file devices.conf. The bridge then maps the device's original identity, originalIdentity, to the device certificate information.

Bridge certificate

The bridge certificate information (ProductKey, DeviceName, and DeviceSecret) obtained after registering a bridge device on Alibaba Cloud IoT Platform. This certificate identifies the bridge in the cloud.

Development and deployment

  1. In the Alibaba Cloud IoT Platform console, create a product and a device to obtain the bridge device certificate information.

    For more information, see Create a product, Create a single device, or Create multiple devices in a batch.

    Provide the bridge device certificate information when you configure the Cloud-to-Cloud SDK.

    Note

    A bridge is a virtual concept. You can use the certificate information of any device as the bridge certificate information.

  2. Configure the Cloud-to-Cloud SDK.

    For more information, see Basic usage and Advanced usage.

    Note

    The Cloud-to-Cloud SDK is available only for Java and supports JDK 1.8 or later.

  3. Deploy the completed bridge service.

    • You can deploy the service to Alibaba Cloud for high scalability using services such as Alibaba Cloud Elastic Computing Service (ECS) and SLB.

    • You can also deploy the service directly to a local environment to ensure a trusted communication environment.

    The following example describes the deployment process for Alibaba Cloud Elastic Compute Service (ECS).

    网桥