> For the complete documentation index, see [llms.txt](https://cavedu.gitbook.io/linkit-7697/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cavedu.gitbook.io/linkit-7697/linkit-7697-development-guide-for-arduino-ide/developer-guide/using-the-wi-fi-library.md).

# 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 <a href="#usingthewi-filibrary-scanningfornearbywi-finetwork" id="usingthewi-filibrary-scanningfornearbywi-finetwork"></a>

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**.

![](/files/08uW6pE19jDyZwjPdz4t)

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:

![](/files/WJvljaydlntIRbxoFin6)

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.

![](/files/YNtvusIUZS5mi6PDPkZK)

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 <a href="#usingthewi-filibrary-connectingtoawebserver" id="usingthewi-filibrary-connectingtoawebserver"></a>

```
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();
```

```
  _      _       _    _____ _     ______ __ ___ ______ 
 | |    (_)     | |  |_   _| |   |____  / // _ \____  |
 | |     _ _ __ | | __ | | | |_      / / /| (_) |  / / 
 | |    | | '_ \| |/ / | | | __|    / / '_ \__, | / /  
 | |____| | | | |   < _| |_| |_    / /| (_) |/ / / /   
 |______|_|_| |_|_|\_\_____|\__|  /_/  \___//_/ /_/
```
