Da16200 connecting to AWS

I have the DA16200 evaluation board. I am trying to connect to my AWS account. I have mqtt_config setup as shown below. when I try to connect I get the following message. It is crucial that I am able to connect to my AWS account using TLS and certificates. I have loaded the 3 certificates that I use to connect to my AWS account from other boards. These certificates work for all other cases.

/DA16200/NET] # cert
#1 (MQTT, Enterprise)
  - Root CA: O
  - Certificate: O
  - Private Key: O
  - DH Parameter: X
#2 (HTTPs, CoAPs Client)
  - Root CA: X
  - Certificate: X
  - Private Key: X
  - DH Parameter: X
 

mqtt_client_check_conn failed
[mosquitto__socket_connect_tls] Failed to establish tls-sess(0x7200)
[_mosquitto_socket_connect_step3] Failed to connect tls-sess(19)
 Unable to connect (TLS Handshake failed.)
 [SUB] REQ mqtt_restart (count=1)
 

 

MQTT Client Information:
  - MQTT Status  : Not Running
  - Broker IP          : xxx-ats.iot.us-east-1.amazonaws.com
  - Port               : 8883
  - Pub. Topic         : da16k
  - Sub. Topic         : da16ks
  - QoS Level          : 1
  - TLS                : Enable
  - Ping Period        : 600
  - TLS Incoming buf   : 4096(bytes)
  - TLS Outgoing buf   : 4096(bytes)
  - TLS Auth mode      : 1
  - User name          : <None>
  - Password           : (None)
  - Client ID          : test_id
  - MQTT VER           : 3.1
 

  • Hi tjm, 

    According to our Team internally, there is an update for TLS functionality in the latest FreeRTOS SDK v3.2.0.0.

    So, would it be possible to use the latest version and check if this issue exists?

    SDK Download link : DA16200 DA16600 FreeRTOS SDK v3.2.0.0

    SDK image : DA16200 DA16600 FreeRTOS SDK Image v3.2.0.0

    Release notes : DA16200 DA16600 FreeRTOS SDK Release Note v3.2.0.0

    Thanks, PM_Dialog

  • I will give it a try and let you know the results.

  • I will give it a try and let you know the results.

  • I think I entered the wrong flash device when it prompted me. I entered the JV version instead of JW. How do I change that.

  •      I updated the SDK and I got the same results. I cannot connect to my AWS. the CERTS are the same ones I am using from my local machine as follows. what am I missing? I need to access the customers AWS account so they can begin processing the data. my local machine is of no use to the customer.

    **************************************************  

    my local machine

    PS C:\Mosquitto> .\mosquitto_pub.exe -h xxxxdvx40gv-ats.iot.us-east-1.amazonaws.com -p 8883 -t da16ks -m "hello world1" --cafile .\AmazonRootCA1.pem --cert .\neuroalert-certificate.pem.crt --key .\neuroalert-private.pem.key -d
    Client (null) sending CONNECT
    Client (null) received CONNACK (0)
    Client (null) sending PUBLISH (d0, q0, r0, m1, 'da16ks', ... (12 bytes))
    Client (null) sending DISCONNECT
    **************************************************************************

    DA16200 eval board

            ******************************************************
            *             DA16200 SDK Information
            * ---------------------------------------------------
            *
            * - CPU Type        : Cortex-M4 (120MHz)
            * - OS Type         : FreeRTOS 10.4.3
            * - Serial Flash    : 4 MB
            * - SDK Version     : V3.2.0.0 GEN
            * - F/W Version     : FRTOS-GEN01-01-03339ce3d-002291
            * - F/W Build Time  : Nov 18 2021 15:06:16
            * - Boot Index      : 0
            *
            ******************************************************
     

    MQTT Client Information:
      - MQTT Status  : Not Running
      - Broker IP          : xxxxxx9dvx40gv-ats.iot.us-east-1.amazonaws.com
      - Port               : 8883
      - Pub. Topic         : da16k
      - Sub. Topic         : da16ks
      - QoS Level          : 1
      - TLS                : Enable
      - Ping Period        : 600
      - TLS Incoming buf   : 4096(bytes)
      - TLS Outgoing buf   : 4096(bytes)
      - TLS Auth mode      : 1
      - User name          : (None)
      - Password           : (None)
      - Client ID          : (default: da16x_CEBC)
      - MQTT VER           : 3.1
    [/DA16200/NET] # cert
    #1 (MQTT, Enterprise)
      - Root CA: O
      - Certificate: O
      - Private Key: O
      - DH Parameter: X
    #2 (HTTPs, CoAPs Client)
      - Root CA: X
      - Certificate: X
      - Private Key: X
      - DH Parameter: X
    [/DA16200/NET] # mqtt_client start

    [/DA16200/NET] # [mosquitto__socket_connect_tls] Failed to establish tls-sess(0x7200)
    [_mosquitto_socket_connect_step3] Failed to connect tls-sess(19)
     Unable to connect (TLS Handshake failed.)
     [SUB] REQ mqtt_restart (count=1)
    [mosquitto__socket_connect_tls] Failed to establish tls-sess(0x7200)
    [_mosquitto_socket_connect_step3] Failed to connect tls-sess(19)
     Unable to connect (TLS Handshake failed.)
     [SUB] REQ mqtt_restart (count=2)
    [mosquitto__socket_connect_tls] Failed to establish tls-sess(0x7200)
    [_mosquitto_socket_connect_step3] Failed to connect tls-sess(19)
     Unable to connect (TLS Handshake failed.)
     [SUB] REQ mqtt_restart (count=3)
    [mosquitto__socket_connect_tls] Failed to establish tls-sess(0x7200)
    [_mosquitto_socket_connect_step3] Failed to connect tls-sess(19)
     Unable to connect (TLS Handshake failed.)
     [SUB] REQ mqtt_restart (count=4)
    [mosquitto__socket_connect_tls] Failed to establish tls-sess(0x7200)
    [_mosquitto_socket_connect_step3] Failed to connect tls-sess(19)
     Unable to connect (TLS Handshake failed.)
     [SUB] REQ mqtt_restart (count=5)
    [mosquitto__socket_connect_tls] Failed to establish tls-sess(0x7200)
    [_mosquitto_socket_connect_step3] Failed to connect tls-sess(19)
     Unable to connect (TLS Handshake failed.)
    [SUB] MAX Retry (Retry Cnt=6).
    [mqtt_client] terminated
     

  • cert 0 - AmazonRootCA1.pem

    cert 1 - neuroalert-certificate.pem.crt

    cert 2 - neuroalert-private.pem.key

  • Hi tjm, 

    Thanks for moving into the latest SDK version. I have shared the updated log file internally to have a look. 

    Thanks, PM_Dialog

  • Hi tjm, 

    Can you please indicate the exact flash part number that you are using on your design? 

    You could refer to UM-WI-056 DA16200 DA16600 FreeRTOS Getting Started Guide and configure the fw for W25Q32JW.

    Thanks, PM_Dialog

  • I did redo it with the correct part number. as I showed above using the correct memory device it does not connect to AWS. could you please help me make an AWS connection. someone using your eval board must have tested it with AWS.

  • Hi Jtm, 

    I am currently waiting for feedback from our CS Team. I will get back to you ASAP.

    Thanks, PM_Dialog