Updates for Wio Terminal’s Network Connectivity: What does “Wio” Stand For, A Brief Introduction of Realtek RTL8720DN, and How to Connect Wio Terminal to Wi-Fi and Obtain Data from the Internet

Today’s update for Wio Terminal is about one of its highlight features – its reliable & powerful network connectivity! In this post, we will talk about:

  • What does “Wio” Stand for
  • A Brief Introduction of Wio Terminal’s Wireless Core: Realtek RTL8720DN
  • How to Connect Wio Terminal to Wi-Fi and Obtain Data from the Internet

What does “Wio” Stand for

Wio platform, implement IoT the simple way

Before we start, many of you might have a quick question: what does the “Wio” of Wio Terminal ever mean?

It is an abbreviation of “Wireless input and output”, a platform including hardware and software created by Seeed, aiming to simplify IoT development for makers. With the help of the Wio Family, even beginners can build his/her own IoT application within 5 minutes, no hardware programming, no breadboard, no jumper wires, no soldering. 

Wio Terminal is the newest member of the Wio family. You must have noticed that it is quite different from its elder brothers, not a single embedded functional module but a simple and tiny device with highly-integrated design, packing multiple functions in a 72 x 57 x 12mm tiny but stylish enclosure. Together with its reliable wireless connectivity, setting up an IoT project is simpler than ever.

You can use Wio Terminal to make demos showing real-time data from the internet, for example, the live data of local weather or currency exchange rates., etc., without too many hard works. It even has built-in magnets and 2 mounting holes so you can fix it at almost any place you like as a monitor or dashboard.

A Brief Introduction of Wio Terminal’s Wireless Core: Realtek RTL8720DN

To empower Wio Terminal with powerful wireless connectivity, we adopted Realtek RTL8720DN, which can support both BLE / BLE 5.0 and Dual-Band 2.4Ghz / 5Ghz Wi-Fi, providing the backbone for IoT projects.

Here at Seeed, we also provide a Realtek RTL8720DN 2.4G/5G Dual Bands Wireless and BLE5.0 Combo Module for you. It is worth saying that this little module can support WiFi 5G and Bluetooth Low Energy 5.0 as well. With the main chip RTL8720DN, it can be regarded as an SoC for the WiFi and Bluetooth application with typical SBCs. 

How to Connect Wio Terminal to Wi-Fi and Obtain Data from the Internet

Here comes the most important part: How to use Wio Terminal to obtain data from the internet? Today we will introduce how to use Wio Terminal to access to HTTPS server and grab live data from the internet. In this demo, Wio Terminal is used to obtain data from MicroPython’s Github repository and displayed on its LCD screen.

If you have your own Github repository, you can obtain data from yours, and attract Wio Terminal to your desktop so that you can know how many people star or fork your code without opening the page. Sounds quite excited for a maker, right? Of course, you can implement the Demo to other API such as grabbing weather information, Youtube Stats and etc. The possibilities are endless!

If you are a beginner to Wio Terminal, we have prepared many documents for you. Make sure you have updated the latest firmware for the Wireless Core Realtek RTL8720 on Wio Terminal before getting started with this demo. If you are not sure about how to configure Wi-Fi connectivity on Wio Terminal, check our detailed tutorial here.

Let’ s get started!

Hardware Requirement

Arduino libraries needed

  • Install the LCD screen Library Seeed_Arduino_LCD, please visit Wio Terminal LCD for more information.
  • Visit the ArduinoJson repositories and download the entire repo to your local drive.
    • Now, the ArduinoJson library can be installed to the Arduino IDE. Open the Arduino IDE, and click sketch -> Include Library -> Add .ZIP Library, and choose the ArduinoJson file that you’ve have just downloaded.
  • For more information about Https connection, please visit here.

Arduino Instructions

  • Download the Free_Fonts.h header file so that can use abbreviations for the free fonts included in the LCD library. Please make sure to put this header file in the same location as the Arduino Sketch.
  • Download the Complete code here or copy the following.
  • Upload the code.

Complete Code

Note: Change the ssid and password to your Network Wi-Fi.

#include <WiFiClientSecure.h>
#include <ArduinoJson.h>
TFT_eSPI tft;

const char* ssid     = "yourNetworkName";
const char* password = "yourNetworkPassword";

const unsigned char watchIMG[] = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 
  0x00, 0xFC, 0x07, 0x00, 0x00, 0xFF, 0x1F, 0x00, 0x80, 0x1F, 0x3F, 0x00, 
  0xC0, 0x07, 0x7C, 0x00, 0xE0, 0x03, 0xF8, 0x00, 0xF0, 0xE1, 0xF0, 0x01, 
  0xF8, 0xF1, 0xF1, 0x01, 0xF8, 0xF8, 0xF1, 0x03, 0xFC, 0xF8, 0xF1, 0x03, 
  0xF8, 0xF0, 0xF1, 0x03, 0xF0, 0xF1, 0xF0, 0x01, 0xF0, 0x01, 0xF8, 0x00, 
  0xE0, 0x03, 0x78, 0x00, 0xC0, 0x07, 0x3E, 0x00, 0x80, 0xFF, 0x1F, 0x00, 
  0x00, 0xFE, 0x0F, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 

const unsigned char starIMG[] = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 
  0x00, 0xC0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 
  0x00, 0xF0, 0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xF8, 0x03, 0x00, 
  0x00, 0xF8, 0x07, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0xFE, 0xFF, 0xFF, 0x1F, 
  0xFE, 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x07, 0xF8, 0xFF, 0xFF, 0x03, 
  0xF0, 0xFF, 0xFF, 0x01, 0xC0, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0x7F, 0x00, 
  0x00, 0xFF, 0x3F, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0x80, 0xFF, 0x3F, 0x00, 
  0x80, 0xFF, 0x3F, 0x00, 0x80, 0xFF, 0x7F, 0x00, 0x80, 0xBF, 0x7F, 0x00, 
  0xC0, 0x1F, 0x7E, 0x00, 0xC0, 0x07, 0x78, 0x00, 0xC0, 0x01, 0x70, 0x00, 
  0x40, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 

const unsigned char forkIMG[] = {
  0xF8, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0x0F, 0x07, 0x00, 0x01, 
  0x07, 0x07, 0xE0, 0x0F, 0x07, 0x07, 0x78, 0x1E, 0x9E, 0x07, 0x38, 0x38, 
  0xFC, 0x01, 0x38, 0x38, 0xF8, 0x00, 0x38, 0x3C, 0xF8, 0x00, 0xF0, 0x1F, 
  0xF8, 0x00, 0xE0, 0x07, 0xF8, 0x00, 0xC0, 0x07, 0xF8, 0x00, 0xE0, 0x07, 
  0xF8, 0x00, 0xE0, 0x07, 0xF8, 0x00, 0xF8, 0x03, 0xF8, 0x00, 0xFE, 0x01, 
  0xF8, 0xE0, 0xFF, 0x00, 0xF8, 0xFF, 0x7F, 0x00, 0xF8, 0xFF, 0x1F, 0x00, 
  0xF8, 0xFF, 0x03, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 
  0xF8, 0x01, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 
  0x9E, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 
  0x0F, 0x07, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 

const char*  server = "api.github.com";  // Server URL

const char* test_root_ca = \
                            "-----BEGIN CERTIFICATE-----\n"
                            "-----END CERTIFICATE-----\n";

// You can use x.509 client certificates if you want
//const char* test_client_key = "";   //to verify the client
//const char* test_client_cert = "";  //to verify the client

String github_data;

WiFiClientSecure client;

void setup() {
    //Initialize serial and wait for port to open:

    Serial.print("Attempting to connect to SSID: ");
    WiFi.begin(ssid, password);

    tft.setCursor((320 - tft.textWidth("Connecting to Wi-Fi.."))/2, 120);
    tft.print("Connecting to Wi-Fi..");

    // attempt to connect to Wifi network:
    while (WiFi.status() != WL_CONNECTED) {
        // wait 1 second for re-trying

    Serial.print("Connected to ");

    tft.setCursor((320 - tft.textWidth("Connected!"))/2, 120);


void loop() {
    // do nothing

void getData() {
  //client.setCertificate(test_client_key); // for client verification
  //client.setPrivateKey(test_client_cert); // for client verification

    tft.setCursor((320 - tft.textWidth("Conectting to Server.."))/2, 120);
    tft.print("Connecting to Server..");

    Serial.println("\nStarting connection to server...");
    if (!client.connect(server, 443)) {
        Serial.println("Connection failed!");
        tft.setCursor((320 - tft.textWidth("Connection failed!"))/2, 120);
        tft.print("Connection failed!");
    } else {
        Serial.println("Connected to server!");
        tft.setCursor((320 - tft.textWidth("Connected to Server!"))/2, 120);
        tft.print("Connected to Server!");

        // Make a HTTP request:
        client.println("GET https://api.github.com/repos/micropython/micropython HTTP/1.0");
        client.println("Host: api.github.com");
        client.println("User-Agent: Seeed-Studio");
        client.println("Connection: close");

        while (client.connected()) {
            String line = client.readStringUntil('\n');
            if (line == "\r") {
                Serial.println("headers received");

          String line = client.readStringUntil('\r');
          github_data = line;
        Serial.println("closing connection");          

    //ArduinoJson to parse data, plesae check ArduinoJson for more info
    const size_t capacity = 2*JSON_OBJECT_SIZE(18) + JSON_OBJECT_SIZE(77) + 6050;
    DynamicJsonDocument doc(capacity);
    deserializeJson(doc, github_data);

    int subscribers_count = doc["subscribers_count"];
    int forks = doc["forks"];
    int stargazers_count = doc["stargazers_count"];


    tft.drawString("MicroPython Github",20,10);
    tft.drawFastHLine(185,18,120 ,TFT_RED);
    tft.drawFastHLine(185,19,120 ,TFT_RED);
    tft.drawFastHLine(185,20,120 ,TFT_RED);
    tft.drawFastHLine(10,33,300 ,TFT_NAVY);
    tft.drawFastHLine(10,34,300 ,TFT_NAVY);
    tft.drawFastHLine(10,35,300 ,TFT_NAVY);

    tft.drawXBitmap(20,60, watchIMG, 29, 27, TFT_WHITE);
    tft.drawXBitmap(20,120, starIMG, 30, 30, TFT_WHITE);
    tft.drawXBitmap(20,180, forkIMG, 30, 30, TFT_WHITE);

    tft.drawString("Watchers: ",60, 68);
    tft.drawString("Stars: ",60, 128);
    tft.drawString("Forks: ",60, 188);

    tft.drawNumber(subscribers_count, 165, 68);
    tft.drawNumber(stargazers_count, 130, 128);
    tft.drawNumber(forks, 130, 188);

You can find more awesome demos with detailed tutorials at our wiki. Stay tuned with us and know more updates about Wio Terminal!

About Author


April 2020