Forums - mqtt with TLS

4 posts / 0 new
Last post
mqtt with TLS
Yang001
Join Date: 15 Aug 16
Posts: 4
Posted: Sat, 2018-11-10 14:40

Hi,

I am using QCA4020(CDB20) Development kit with SDK 2.0. I need function of mqttc with TLS support , do you have any example or demo code that I can follow it up to build my application? 

 

Regard,

Javi Yang.

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Mon, 2018-11-12 15:49

We have multiple demos using mqttc connecting with TLS support.
Kindly refer to Onboard_demo / QCLI_demo for more information.

More information is available in sections " Onboard demo with cloud mode" and "6.3.16 AWS Demo"  of document "QCA402x (CDB2x) Development Kit User Guide".

Also, you can refer to below source files.
[target]\quartz\demo\Onboard_demo\src\ecosystem\aws\aws_run.c 
[target]\quartz\demo\QCLI_demo\src\ecosystem\aws\shadow_sample\shadow_sample.c

  • Up0
  • Down0
Yang001
Join Date: 15 Aug 16
Posts: 4
Posted: Mon, 2018-11-12 22:51
Hi,
 
First at all, thanks for your prompt reply. 
 
I am trying to study on AWS demo, it seems using aws-iot-device-sdk to do the mqtt with TLS support. 
 
Can I use it to communicate with the other MQTT broker as well ? Or how do I use MQTT Client service of QAPI  to acheive mqtt with TLS support?
 
BR,
  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Tue, 2018-11-13 14:02

Yes, We can use the same connections parametes to establish connection with MQTT broker.

However, the example demo uses sample shadow communication, if you want to update MQTT broker refer to subscribe_sample_publish demo in aws_iot_Device_sdk as we need to call appropriate aws_iot_mqtt_xx() calls.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.