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  “Connect a Device” button

create_certificate_button

 

  • Choose MQTTS and Click “Generate a Device Certificate”

8.gnerate_certificate

  • In “Download the files to connect “ pop window, you could click the file name to download “Device Certificate, CA Certificate, and Private Key” to your PC and don’t rename the file and then click “OK”.downloadcertificate
  • Click “Download JSON file”. This file very import to help your device connect to QIoT Suite Lite.

10.downloadjsonfile

 

Part B :Download sample code

  • Download sample code from QNAP QIoT Suite Lite GitHub.
  • Data structure like following picture
    • Pre-downloaded resource.json must be put in “res” folder
    • Device Certificate, CA Certificate, and Private Key put in “ssl” folder .

data_structure

  • Open Terminal application (e.g., WinSCP) on your PC and login to Device for transfer data.
    • Linkit7688 only support scp protocol. SFTP need install  openssh-sftp-server.

scp

scpToFolder

 

  • Open Terminal application (e.g., PuTTY) on your PC.Connect to your device by SSH and enter the folder where put sample code (e.g., /home/root/bundle).

ssh_img

  • Install sample code dependency

  • Run sample code

  • device will send message to topic “temp” or that you defined ,as below image.

15

Part C :Another protocol

  •  Click “Connection a device” buttoncreate_certificate_button
  • You can choose another protocol you would like to use

12_another_protocol

  • SSH to your device , and input command as following.

  • 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