1. 下载后解压,qcloud_iot_mqtt_sign-master.zip
GitHub - tencentyun/qcloud_iot_mqtt_signContribute to tencentyun/qcloud_iot_mqtt_sign development by creating an account on GitHub.https://github.com/tencentyun/qcloud_iot_mqtt_sign
2. 按照readme文件修改文件,选择编译器,编译环境
3. 打开linux虚拟机,打开vim,进入,安装cmake
4. 执行bash cmake_build.sh
5. 进入out/bin,执行./qcloud-dynreg-sign product_id product_secretkey device_name
6. 复制生成的参数到apipost
{ "Response": { "Len": 53, "Payload": "b05ZCOCKKjDqQ+yVKergD2jGAnXjYcsGbEAOi8UB+4r6oxY6ZI+QiJmfLj9CBDDssrfLw6QRlLyfo+qyN1lH2A==", "RequestId": "f4d2d833-b2f9-466a-bd24-691750eb2f6f", "State": 1 } }
7. base64解码https://the-x.cn/base64/
8. 去掉空格回车http://www.esjson.com/delSpace.html
9. aes解密https://the-x.cn/cryptography/Aes.aspx
注意第四项是产品秘钥,第五项是16个0
结果中的psk就是设备秘钥