Connect Linkit 7688(Duo) to QNAP NAS – Lesson 3

14

Lesson 3 Connect your device to QIoT Suite Lite using MQTTS

In Lesson 2 , we complete deploy sample code to your device .In this lesson, you will learn how yo use sample code to connect to QIoT Suite Lite.

And there are three parts:

A: Generate resource info inside QIoT Suite

B: Download sample code

C: Other Protocol

Part A :Generate resource info inside QIoT Suite

  • Click the “Connect a Device”:

create_certificate_button

 

  • Choose MQTTS and click “Generate a Device Certificate” :

8.gnerate_certificate

  • In “Download the files to connect”, click the links to download the “Device Certificate”, “CA Certificate”, and “Private Key” to your PC. Do not rename these files. Click OK.
    downloadcertificate
  • Click Download JSON file.

10.downloadjsonfile

 

Part B :Download sample code

  • Download sample code from QNAP QIoT Suite Lite GitHub.
  • Set the data structure like as in the following image.
    • The resource.jsonfile must be saved in the res folder, and the device Certificate, CA Certificate, and Private Key must be saved in the ssl folder.

data_structure

  • Open Terminal application (such as WinSCP) on your PC and login to your device.
    • LinkIt 7688 only supports the SCP protocol. SFTP can be installed  using openssh-sftp-server.

scp

scpToFolder

 

  • Open a Terminal application (such as PuTTY) on your PC.Connect to your device by using SSH and enter the folder where the sample code is stored (for example: /home/root/bundle).

ssh_img

  • To Install sample code dependencies, enter the following commands:

  • Run the sample code

  • The device will send a message to the topic temp (or the topic you defined)

15

Part C : Using another protocol

  • Click “Connect a Device”.

create_certificate_button

  • You can select another protocol.

12_another_protocol

  • Connect to your device using SSH, and enter the following commands:

  • In next Lesson ,we will integrate Power BI to visualize senser data . Lesson 4 Integrate Power BI

Please visit QNAP github for QIoT Suite Lite sample code

QNAP-Github

Related posts

Leave a Reply