TI中文支持网
TI专业的中文技术问题搜集分享网站

CC3220 連接至AWS-IOT

你好

範例程式為shadow_sample_console_echo_CC3220SF_LAUNCHXL_tirtos_ccs

目前有在AWS申請帳號且有創建一個實物,如下圖

在aws_iot_config.h設定之設定下

#define AWS_IOT_MQTT_HOST "12345abcde9874-ats.iot.ap-northeast-1.amazonaws.com"
#define AWS_IOT_MQTT_PORT 8883

#define AWS_IOT_MQTT_CLIENT_ID "20190318_iot"

#define AWS_IOT_MY_THING_NAME "20190318_iot" 

#define AWS_IOT_ROOT_CA_FILENAME "/cert/ca.pem"
#define AWS_IOT_CERTIFICATE_FILENAME "/cert/cert.pem" 
#define AWS_IOT_PRIVATE_KEY_FILENAME "/cert/key.pem" 

ca.pem係AWS提供之RSA 2048 bit key: Amazon Root CA 1 

 

—–BEGIN CERTIFICATE—–
MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF
ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6
b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTEL
MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv
b3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXj
ca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM
9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw
IFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6
VOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L
93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQm
jgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
AYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3DQEBCwUA
A4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDI
U5PMCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUs
N+gDS63pYaACbvXy8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vv
o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU
5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy
rqXRfboQnoZsG4q5WTP468SQvvG5
—–END CERTIFICATE—–

 

, Cert.pem 與 key.pem 係AWS-IOT-CORE 創建完"實物"後產生(非使用Play ground裡的 pem)。這3組碼我貼到certs.h裡,確定沒有TAB產生之空白。

也確認IOT-CORE有激啟動


 

,連線後出現下面訊息

==================================================

startSNTP: Current time: Mon Mar 18 07:20:24 2019

CC32XX has connected to AP and acquired an IP address.

IP Address: 192.168.0.102

Successfully wrote file /cert/ca.pem to flash

Successfully wrote file /cert/cert.pem to flash

Successfully wrote file /cert/key.pem to flash

Shadow Init

Shadow Connect

ERROR: runAWSClient L#83Shadow Connection Error (-13)

==================================================

相關流程有照手冊一步一步進行,確認有連到AP,TCPING確認該實物有開啟

IOT-CORE有監控功能也確認有連線,但不知為何會出現該錯誤訊息。

沒頭緒中,懇請提供建議,謝謝。

Alvin Chen:

请参考:
e2e.ti.com/…/602961

Alvin Chen:

回复 Alvin Chen:

有关CC3220 連接至AWS-IOT的问题请直接发送帖子在如下论坛;
e2e.ti.com/…/968

赞(0)
未经允许不得转载:TI中文支持网 » CC3220 連接至AWS-IOT
分享到: 更多 (0)

© 2024 TI中文支持网   网站地图 鲁ICP备2022002796号-1