2 Replies Latest reply on Apr 4, 2020 10:11 AM by ChMa_3807401

    MQTT connection failed


      I am trying to connect my CY8CKIT-062-WIFI-BT kit to AWS IoT cloud. The kit is programmed with aws_demo from Cypress Github (GitHub - cypresssemiconductorco/amazon-freertos: IoT operating system for microcontrollers), not from Amazon. However, it failed to establish new MQTT connection. The log from serial port is shown below. Can someone tell me what could go wrong and how to fix it?


      Thanks in advance,




      P.S. for whatever reason, I cannot post question in the freertos space. Anyone knows why?


      WLAN MAC Address : A0:C9:A0:46:BE:46

      WLAN Firmware    : wl0: Sep  5 2019 23:24:33 version (r722362 CY) FWID 01-f7128517

      WLAN CLM         : API: 12.2 Data: 9.10.39 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2019-09-05 23:10:00

      WHD VERSION      : v1.70.0 : v1.70.0 : GCC 7.2 : 2019-12-02 04:14:53 -0600

      1 3848 [Tmr Svc] Wi-Fi Connected to AP. Creating tasks which use network...

      2 3848 [Tmr Svc] IP Address acquired

      3 5586 [Tmr Svc] Write certificate...

      4 6176 [iot_threa] [INFO ][DEMO][lu] ---------STARTING DEMO---------

      5 6178 [iot_threa] [INFO ][INIT][lu] SDK successfully initialized.

      6 9195 [iot_threa] [INFO ][DEMO][lu] Successfully initialized the demo. Network type for the demo:

      7 9195 [iot_threa] [INFO ][MQTT][lu] MQTT library successfully initialized.

      8 9195 [iot_threa] [INFO ][DEMO][lu] MQTT demo client identifier is CY8CKIT-062-WIFI-BT (length 19).

      9 13173 [iot_threa] [INFO ][MQTT][lu] Establishing new MQTT connection.

      10 13176 [iot_threa] [INFO ][MQTT][lu] Anonymous metrics (SDK language, SDK version) will be provid

      11 13178 [iot_threa] [INFO ][MQTT][lu] (MQTT connection 0x8012798, CONNECT operation 0x80128b0) Wai.

      12 18178 [iot_threa] [INFO ][MQTT][lu] (MQTT connection 0x8012798, CONNECT operation 0x80128b0) Wai

      13 18178 [iot_threa] [ERROR][MQTT][lu] Failed to establish new MQTT connection, error TIMEOUT.

      14 18178 [iot_threa] [INFO ][MQTT][lu] Network connection closed on error.

      15 18478 [iot_threa] [INFO ][MQTT][lu] (MQTT connection 0x8012798) Network connection destroyed.

      16 18478 [iot_threa] [ERROR][DEMO][lu] MQTT CONNECT returned error TIMEOUT.

      17 18478 [iot_threa] [INFO ][MQTT][lu] MQTT library cleanup done.

      18 18478 [iot_threa] [ERROR][DEMO][lu] Error running demo.

      19 18478 [iot_threa] [INFO ][INIT][lu] SDK cleanup done.

      20 18478 [iot_threa] [INFO ][DEMO][lu] -------DEMO FINISHED-------