AWS_RSA_EXAMPLE project - Error (-3)

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

 

I am trying to get the: WINC3400_AWS_RSA_EXAMPLE project from the ASF 3.47.0 to work, but can't connect to my freshly AWS created IoT thing.

 

Summary of what I did so far:

-WINC3400 is attched to SAMG55 EXPLAINED board.

-AWS IoT: "thing" created, certifcates, keys and policy generated.

-AWS MQTT tested with MQTTBox - working fine, I can connect, publish and subscribe to AWS IoT MQQT.

-ATWINC3400 FW updated with certificates and keys from Amazon AWS

-Example project updated with end point address and "thing" ID

 

According to the example manual (included in main.c file) the console o/p should be as follow:

-- AWS IoT Demo --
 * -- SAMXXX_XPLAINED_PRO --
 * -- Compiled: Jun xx xxxx xx:xx:xx --
 * (APP)(INFO)Chip ID 3400d2
 * (APP)(INFO)Curr driver ver: x.x.x
 * (APP)(INFO)Curr driver HIF Level: (2) x.x
 * (APP)(INFO)Fw HIF: 8104
 * (APP)(INFO)Firmware HIF (2) : x.x
 * (APP)(INFO)Firmware ver   : x.x.x
 * (APP)(INFO)Firmware Build <Month> DD YYYY Time xx:xx:xx
 * (APP)(INFO)Ota HIF: 0000
 * (APP)(INFO)No valid Ota image
 * wifi_cb: M2M_WIFI_RESP_CON_STATE_CHANGED: CONNECTED
 * wifi_cb: M2M_WIFI_REQ_DHCP_CONF: IP is xxx.xxx.xxx.xxx
 * (APP)(ERR)[hif_isr][674]Socket callback is not registered
 * (APP)(ERR)[hif_isr][705](hif) host app didn't set RX Done <2><4A>
 * Received time
 * Connecting...Host IP is x.xx.xx.xxx
 * Host Name is xxxxxxxxxxxxx-xxx.xxx.xx-xxxx-x.amazonaws.com
 *
 * ALPN mode enabled
 * (APP)(INFO)Socket 0 session ID = 1
 * Successfully connected.
 * Negotiated Amazon MQTT.
 * Subscribing...Subscription success
 * Subscribe callback
 * WINC3400_IOT/sub
 * {
 *   "message": "Hello from AWS IoT console"
 * }

 

My output indicates an error:

-- SAMG55_XPLAINED_PRO --
-- Compiled: Oct 25 2019 19:58:16 --
(APP)(INFO)Chip ID 3400d2
(APP)(INFO)Curr driver ver: 1.1.0
(APP)(INFO)Curr driver HIF Level: (2) 1.4
(APP)(INFO)Fw HIF: 8104
(APP)(INFO)Firmware HIF (2) : 1.4
(APP)(INFO)Firmware ver   : 1.3.1
(APP)(INFO)Firmware Build Jun 28 2019 Time 13:46:26
(APP)(INFO)Ota HIF: 0000
(APP)(INFO)No valid Ota image
wifi_cb: M2M_WIFI_RESP_CON_STATE_CHANGED: CONNECTED
wifi_cb: M2M_WIFI_REQ_DHCP_CONF: IP is 192.168.0.6
Received time
Connecting...   Host IP is 54.186.212.104
Host Name is am70esuw10xxx.iot.us-west-2.amazonaws.com                          

ALPN mode enabled
(APP)(INFO)Socket 0 session ID = 1
Successfully connected.
Negotiated Amazon MQTT.
Error(-3) connecting to am70esuw10xxx.iot.us-west-2.amazonaws.com:443An error oc
curred in the loop.

I traced, that error is triggered in

 

aws_iot_mqtt_connect(&connectParams);
...
   pahoRc = MQTTConnect(&c, &data);
   ...

        /* send the connect packet */
    rc = sendPacket(c, len, &connect_timer);
    if(SUCCESS != rc) {
        return rc;
    }

    /* this will be a blocking call, wait for the CONNACK */
    rc = waitfor(c, CONNACK, &connect_timer);
    if(SUCCESS != rc) {
        return rc;
    }
    .....

So it looks to me, that there is no ACK from AWS, but I can't figure why....

 

Thanks for looking...

Last Edited: Fri. Oct 25, 2019 - 08:39 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would try port 8883 instead of 443.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Im trying to achive the same goal, but so far im not able to doit.

 

What process/tutorial did you follow to validate the correct certificates were generated and downloaded?

 

Regards.

 

EC.

ec ...