MQTT AWS example error

Hello,

I am trying to get the AWS TLS MQTT example working but I get an error 0x1005 from the nxd_mqtt_client_secure_connect.

I know the error means failure to connect to the broker however does this mean that there is something wrong with the certificates or with the link to my IoT device on AWS?

regards,

Maarten

  • After trying my certificates and key with the Amazon iot dev sdk python pubsub sample, I can confirm that all the certificates are correct which makes this problem even stranger.
    Any help would be appreciated
    regards, Maarten
  • In reply to MaartenK:

    Hi Maarten,

    Is this issue okay now? Have you checked the Application Note for some known issues and limitations?

    JB
    RenesasRulz Forum Moderator

    https://renesasrulz.com/
    https://academy.renesas.com/
    https://en-us.knowledgebase.renesas.com/

  • No its still not working and the limitations also don't say anything about not being able to connect.
    regards, Maarten
  • In reply to MaartenK:

    Hi,

    Which version of the SSP are you using and with which board and toolchain?

    How are you connecting the board to the internet? Does the connection go through a proxy? Currently there is no support for a proxied connection.

    Regards,

    Ian.
  • In reply to Ian:

    Hello,
    I am using SSP version 1.5.0 with toolchain version 4.9.3.20150529 on a PK S5D9 kit.
    I am not behind a proxy and I have tried the Azure and Google demo and they do work.
    But I also wanted to try AWS to make a fair comparison between the three.
    So any help would be great.
    Regards,
    Maarten
  • In reply to MaartenK:

    Hi,

    Is this the project you are working with?

    www.renesas.com/.../D6002695.html

    If so, I will take a look at it.

    Regards,

    Ian.
  • In reply to Ian:

    That's correct,
    Maarten
  • In reply to MaartenK:

    Hi Maarten,

    I was able to reproduce your problem. It looks like there is an issue with the TLS packet buffer size.

    In the file mqtt_client_api.h in the structure "st_mqtt_client_ctrl" change the size of the array tls_packet_buffer from 4000 to (16 * 1024). 16kB is the maximum size of a TLS record.

    typedef struct st_mqtt_client_ctrl
    {
    UCHAR tls_packet_buffer[16 * 1024]; ///< TLS packet buffer for reassembly


    Regards,

    Ian.
  • In reply to Ian:

    This worked for me, thanks!
    regards, Maarten
  • In reply to Ian:

    hi , i had an similar issue , after changing it to 16kB ,the output from my tera term became
    "Initializing Cloud Interface:Could not resolve host name":

    Had no issues with my endpoint and certificates , tried them on mqtt.fx and was able to connect to AWS.
    Will be glad if you can share some pointers

    Regards,
    Qw