QNAP Systems, Inc. - Network Attached Storage (NAS)



Connect LinkIt 7688(Duo) to QNAP NAS via QIoT Suite Lite

Getting started with LinkIt 7688(Duo) (Python)

In this tutorial, you will learn the basics of working with LinkIt 7688 (Duo) (that runs OpenWRT). You will then learn how to seamlessly connect your devices to QNAP NAS using QIoT Suite Lite.

Please ensure your LinkIt 7688 (duo) and NAS is under the same LAN.

1. Configure your device

1.1 Getting started

  • What will you need
    1. LinkIt 7688 (Duo)
    2. Power Supply:
      • The LinkIt 7688 is powered by a USB Micro power supply with at least 1A at 5V.
    3. Wi-Fi AP
  • Power on your LinkIt 7688(Duo)
    Power (PWR) connector, not the USB host (HOST) connector near the MPU reset button. The green ON LED (Power on) will light up, followed by a blink from the orange Wi-Fi LED (bootloader initialization). After about 5 seconds, the device boot up starts and the orange LED will light up solid for about 30 seconds.

1.2 Connect your LinkIt 7688(Duo) to the network

  • Turn on the AP mode
    • After boot up, the Wi-Fi LED will turns off. This means the system is ready to accept a Wi-Fi connection.
    • If not, press the Wi-Fi Reset button for at least 5 seconds and release to turn on the AP mode.
  • Consult the below image for the Wi-Fi LED Status and System Status. (image source : Media Tek Lab)
  • Go to your Wi-Fi settings and choose "LinkIt_Smart_7688_XXXXXXX". (where “XXXXXXX” is the MAC address of your LinkIt 7688 (Duo)).
  • Once you join the LinkIt Smart Network, open "http://mylinkit.local" or "" in your web browser
    • In the log in page, set a password (or enter a previously-set up password).
    • The default username is root.
  • After logging in, go to the "Network" tab and select "Station Mode" to set up the Wi-Fi AP you will connect to. Your PC and LinkIt must be on the same network. Click "CONFIGURE & RESTART".
  • Change your PC network to the same as the LinkIt network.

For further information on setting up a LinkIt 7688(Duo) setup guide, visit: https://docs.labs.mediatek.com/resource/linkit-smart-7688/en/get-started

2. Create your device in QIoT Suite Lite

2.1 Install QIoT Suite Lite

  • QIoT Suite Lite can be installed from the App Center.
  • Launch and log in to QIoT Suite Lite. The default username and password is "admin".

2.2 Create a new IoT application

IoT Applications are a combination of Things, Rules, and Dashboards. We recommend that you first create a “Things” in IoT Application. This IoT Application allows you to keep a record of all of the devices that are connected to your NAS.

Rules make it possible to build IoT applications that gather, process, analyze and act on data generated by connected devices. Rules can apply to data from one or many devices, and it can take one or many actions in parallel.

Dashboards turn your data into analytics and reports that provide rela-time insight.

All these elements provide user a complete IoT Application environment.

  • Click "IoT Applications".
  • Click "Add IoT Application".
  • In "Create a New IoT application":
    • Enter the IoT Application name (for example: "myApp").
    • The Rule name and Dashboard name will be automatically generated based on the IoT Application name.
    • Click "Create".
  • Click "+ Add Thing" to add this application’s device.
  • Click "Add Thing", In "Add Thing":
    • Enter a name for your device name (for example: "linkIt") and enter the device information (such as serial number and manufacturer) in Add attribute.
    • If your device is already supported by QIoT (Arduino Yun,Raspberry Pi, Edison, and LinkIt 7688 (Duo)), choose a pre-defined Thing Type.
    • Click Add.
  • Click "Thing Resource":
  • In "Thing Resources", click "Add Resource":
  • In "Add Thing Resource":
    • Enter the name and ID for the sensor in Resource Name and Resource ID. Please note that the Resource ID will be used to create a Topic in the QIoT Broker. This ID should be unique for the device and no duplicates should be allowed for the same device.
  • If you need to add more resources repeat the preceding steps. Click "Close" when finished.
  • Go to the "Dashboard" tab, and a sample dashboard will be created
  • Go to the Rule tab to define the flow or rules on how to process the data sent from the device, and how to present in a dashboard.

3. Connect your device to QIoT Suite Lite using MQTTS

3.1 Generate resource info inside QIoT Suite

  • Click the "Connect a Device":
  • Choose MQTTS and click "Generate a Device 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".
  • Click "Download JSON file".

3.2 Download sample code

  • Download sample code from the QNAP QIoT Suite Lite GitHub.
  • Set the data structure like as in the following image.
    • The "resource.json" file must be saved in the "res" folder, and the device Certificate, CA Certificate, and Private Key must be saved in the "ssl" folder.
  • 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".

  • 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).
  • 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).

3.3 Using another protocol

  • Click "Connect a Device".
  • You can select another protocol.
  • Connect to your device using SSH, and enter the following commands:

4. Integrate Power BI

4.1 Get your first Power BI account

  • Sign up for a free PowerBI account at https://powerbi.microsoft.com/en-us/
  • After registering, the page will lead you to the below page. Click "My workspace", and then click "Skip for now".

4.2 Setup your streaming dataset API

  • Create "Datasets"
    • Click "Create" in the top-right corner
    • Click "Streaming dataset"
  • Select "API", the source of your data, and click "Next".
  • Define your values from stream (such as temp, max, min), and you will get a JSON result in the textbox. We will use this JSON code to push data to the QIoT Suite Lite application. Click "Create" to finish.
  • Once you create your data stream, you get a REST API URL which IoT applications can call using POST requests to push your live data to the streaming data dataset you created.

4.3 Configure Node-RED’s nodes in your IoT application

  • Create an IoT application in QIoT Suite.
  •  The following is your first Node-RED flow, and then you can start creating your own IoT flow. You can learn more about Node-RED at https://nodered.org/
  • Before you start pushing live data to Power BI. We need a "function" node to convert IoT data to a streaming data dataset. Here you can replace msg.payload to your JSON dataset.
  • Enter the code as following:
  • We need an "http request" node to help us to push live data to Power BI. Drag and drop the "http request" node and connect it to the tail of the "function" node.
  • Copy and paste the REST API URL from the Power BI console, and set the http method to POST. Click "Deploy".
  • Your Node-RED flow will look like below.

4.4 Add tile to display real-time data

  • Create "Dashboard"
    • Click "Create" in the top-right corner
    • Click "Dashboard"
    • Enter the dashboard’s name, and click "Create".

  • Click "Add tile" in the top-right corner
  • Select "CUSTOM STREAMING DATA" and click the "Next".
  • Select the datasets and click "Next".
  • Select a visualization type, and set the minimum and maximum value.
  • You will now have a streaming dataset to work with. You can get a real time gauge that looks as following.
Release date: 2017-10-19
Was it helpful?
Thank you for your feedback.
Thank you for your feedback. If you have any question, please contact support@qnap.com