8 Replies Latest reply on Mar 25, 2016 11:16 AM by userc_20416 Branched from an earlier discussion.

    How to publish data to AWS IoT (con't)

      Hi userc_22273

      I tried to run demo.aws_iot.pub_sub.publisher demo code on SDK-3.5.2.

      But I got below error:

       

      Joining : LAB

      Successfully joined : LAB

      Obtaining IP address via DHCP

      Network ready IP: 192.168.1.103

      Resolving IP address of MQTT broker...

      Resolved Broker IP: 52.192.145.107

       

      [MQTT] Opening connection...

      [MQTT LIB] : error intializing the  mqtt connection setup

       

      After adding debug code, it shows

      wiced_tls_init_root_ca_certificates returns -96.

      x509_convert_pem_to_der returns -64 because s2 is NULL.

      Below print out the content of pointer p:

      Obviously, it's incompleted so it returns TROPICSSL_ERR_X509_CERT_INVALID_PEM (-64).

       

      -----BEGIN CERTIFICATE-----

       

      MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB

       

      yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL

       

      ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp

       

      U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW

       

      ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0

       

      aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL

       

      MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW

       

      ZXJpU2lnbiBUcnVzdCBOZ\0xef\0x80q/\0x09\0x02

       

       

      Then I print out the content after resource_get_readonly_buffer() call

      and got the same data as above.