sdk完善

This commit is contained in:
kerwincui
2022-08-03 15:47:44 +08:00
parent fc753c2898
commit 339e065031
5 changed files with 160 additions and 97 deletions

View File

@@ -24,7 +24,7 @@ void connectMqtt()
// 生成mqtt加密密码
String aesPassword = generationAESPwd();
// 连接 设备mqtt客户端Id格式为认证类型(E=加密、S=简单) & 设备编号 & 产品ID & 用户ID
String clientId = "E&" + deviceNum + "&" + productId + "&" + userId;
String clientId = "E&" + (String)deviceNum + "&" + (String)productId + "&" + (String)userId;
printMsg("客户端ID"+clientId);
bool connectResult = mqttClient.connect(clientId.c_str(), mqttUserName, aesPassword.c_str());
if (connectResult)