Using the Wi-Fi Library

The Wi-Fi features of LinkIt 7697 are provided through the LWiFi library. Its interface is very similar to the Arduino Wi-Fi library, therefore most of the examples should work without needing modifications.

Scanning for Nearby Wi-Fi Network

The board comes with an LWiFi library that provides nearly the same interface as the Arduino's WiFi library. In this section, you'll learn how to run the ScanNetwork example, which shows a list of nearby Wi-Fi access points, the steps are as follows:

  1. Select File > Examples > LWiFi > ScanNetworks.

2. Click the Upload button and wait for the Done Uploading message to appear.

3. Click the Serial Monitor button in the toolbar, as shown below:

4. Adjust the Baud rate setting to 9,600. A list of nearby access points and their signal strength should appear in the output window, for example.

You can press the onboard RST button to re-run the sketch without having to reconnect to the serial monitor. This is because the RST button only resets the MT7697 SoC but not the CP2102N chipset. The COM port is always available even when the SoC has been reset.

Connecting to a Web Server

char ssid[] = "yourNetwork"; // your network SSID (name) 
char pass[] = "secretPassword"; // your network password (use for WPA, or use as key for WEP)
// Make a HTTP request: 
client.println("GET /linkit_7697_ascii.txt HTTP/1.0"); 
client.println("Host: download.labs.mediatek.com"); 
client.println("Accept: */*"); 
client.println("Connection: close"); 
client.println();
  _      _       _    _____ _     ______ __ ___ ______ 
 | |    (_)     | |  |_   _| |   |____  / // _ \____  |
 | |     _ _ __ | | __ | | | |_      / / /| (_) |  / / 
 | |    | | '_ \| |/ / | | | __|    / / '_ \__, | / /  
 | |____| | | | |   < _| |_| |_    / /| (_) |/ / / /   
 |______|_|_| |_|_|\_\_____|\__|  /_/  \___//_/ /_/

Last updated