This manual details how devices connect to Aliyun IoT Platform using the CCP protocol, including authentication and data channel setup.
This document explains the CCP protocol for device-to-cloud communication in Aliyun IoT. It covers device authentication using HMAC-MD5 or HMAC-SHA1, key generation, and secure data channel access. The protocol includes steps for obtaining server certificates, exchanging session IDs, and establishing encrypted connections. It also defines message types like CONNECT, PUSH, RPC, and PING/PONG for device-cloud interaction.
The manual includes technical specifications for parameters such as deviceId, productKey, deviceSecret, and seedkey, along with encryption algorithms and certificate handling. It provides code examples in Java and C for implementation, and describes error codes for troubleshooting. This manual is written in Chinese.
| Authentication Algorithm | HMAC-MD5 (default) or HMAC-SHA1 |
|---|---|
| Session ID (sid) | 32-bit hex string, cached locally for 24 hours |
| Seed Key | 16-byte random array, RSA encrypted with server's public key |
| Certificate Format | X.509 certificate in PEM format, base64-encoded |
| Message Types | CONNECT, PUSH, RPC, PING, PONG, DISCONNECT, RECONNECT, etc. |
The device sends a signed request to http://manager.channel.aliyun.com/iot/auth using HMAC-MD5 or HMAC-SHA1, with parameters including deviceId, productKey, and a computed signature.
The seedkey is a 16-byte random value generated by the device, encrypted with the server's public key, and used to decrypt the session token (sid) for secure communication.
CCP supports CONNECT, PUSH, RPC, PING, PONG, DISCONNECT, RECONNECT, and others for device-cloud communication.
Data is encrypted using AES-128-ECB with PKCS5 padding, using the seedkey as the key, and then base64-encoded for transmission.