0
Trevor Chang

大家好!

我在试着用Ameba 的Standard SDK 中提供的样例 example_amazon_awsiot.c,来实现Ameba 与Amazon AWS IOT的连接

我根据网页连接https://www.amebaiot.com/cn/ameba-arduino-amazon-aws-iot/进行操作,完成了 Create Thing ,Policy, Certificate等

然后对于example_amazon_awsiot.c文件中相关的参数进行了修改;比如MQTT_BROKER_SERVER, THING_NAME, rootCABuff, certificateBuff, privateKeyBuff

并且根据readme.txt文件中要求 undef MQTT_TASK

 

出现问题 Not Received CONNACK

这个的console log 如下 而且在反复打印出来这些消息

[6017932]mqtt:Not received CONNACK

[6018941]mqtt:Wi-Fi connected.

[6018950]mqtt:addr = 52.71.143.170

[6019345]mqtt:root_crt parse done

[6019618]mqtt:client_crt parse done

[6020447]mqtt:
Verify requested for (Depth 2):
[6020463]mqtt:cert. version : 3
serial number : 18:DA:D1:9E:26:7D:E8:BB:4A:21:58:CD:CC:6B:3B:4A
issuer name : C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 2006 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G5
subject name : C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 2006 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G5
issued on : 2006-11-08 00:00:00
expires on : 2036-07-16 23:59:59
signed using : RSA with SHA1
RSA key size : 2048 bits
basic constraints : CA=true
key usage : Key Cert Sign, CRL Sign
[6020649]mqtt: This certificate has no flags
[6020663]mqtt:
Verify requested for (Depth 1):
[6020679]mqtt:cert. version : 3
serial number : 51:3F:B9:74:38:70:B7:34:40:41:8D:30:93:06:99:FF
issuer name : C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 2006 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G5
subject name : C=US, O=Symantec Corporation, OU=Symantec Trust Network, CN=Symantec Class 3 Secure Server CA - G4
issued on : 2013-10-31 00:00:00
expires on : 2023-10-30 23:59:59
signed using : RSA with SHA-256
RSA key size : 2048 bits
basic constraints : CA=true, max_pathlen=0
subject alt name :
key usage : Key Cert Sign, CRL Sign
[6020857]mqtt: This certificate has no flags
[6020871]mqtt:
Verify requested for (Depth 0):
[6020886]mqtt:cert. version : 3
serial number : 3D:D5:89:C0:F8:31:34:4D:3B:B1:5E:9C:67:E6:D0:E9
issuer name : C=US, O=Symantec Corporation, OU=Symantec Trust Network, CN=Symantec Class 3 Secure Server CA - G4
subject name : C=US, ST=Washington, L=Seattle, O=Amazon.com, Inc., CN=*.iot.us-east-1.amazonaws.com
issued on : 2017-08-16 00:00:00
expires on : 2018-05-16 23:59:59
signed using : RSA with SHA-256
RSA key size : 2048 bits
basic constraints : CA=false
subject alt name : iot.us-east-1.amazonaws.com, *.iot.us-east-1.amazonaws.com
key usage : Digital Signature, Key Encipherment
ext key usage : TLS Web Server Authentication, TLS Web Client Authentication
[6021079]mqtt: This certificate has no flags
[6024869]mqtt:ssl handshake success

[6024879]mqtt:"a9rksz87g7nz7.iot.us-east-1.amazonaws.com" Connected

sean 回答了