Arduino

Reference Language | Libraries | Comparison | Changes

## WiFi101 library

This library allows you to use the Arduino WiFi Shield 101. This is a powerful IoT shield with crypto-authentication, developed with ATMEL, that connects your Arduino or Genuino to the internet wirelessly. Connecting it to a WiFi network is simple, no further configuration in addition to the SSID and the password are required. It can serve as either a server accepting incoming connections or a client making outgoing ones. The library supports WEP and WPA2 Personal encryption and also WPA2 Enterprise. Compared to the retired WiFi Shield and the related library, this product and library support all the same methods plus the `connectSSL()` and WPA2 Enterprise. The board connected to the shield communicates with the WiFi shield 101 using the SPI bus. This is on digital pins 11, 12, and 13 on the Uno and pins 50, 51, and 52 on the Mega. On both boards, pin 10 is used as SS. On the Mega, the hardware SS pin, 53, is not used but it must be kept as an output or the SPI interface won't work. Digital pin 7 is used as a handshake pin between the Wifi shield 101 and the underlying board, and should not be used. The WiFi101 library is very similar to the Ethernet and the library WiFi, and many of the function calls are the same. For additional information on the Arduino WiFi Shield 101, see the Getting Started page and the Arduino WiFi Shield 101 hardware page. ### Examples wifi101ConnectNoEncryption : Demonstrates how to connect to an open network wifi101ConnectWithWEP : Demonstrates how to connect to a network that is encrypted with WEP wifi101ConnectWithWPA : Demonstrates how to connect to a network that is encrypted with WPA2 Personal wifi101ScanNetworks : Displays all WiFi networks in range wifi101WiFiChatServer : Set up a simple chat server wifi101WiFiWebClient : Connect to a remote webserver wifi101WiFiWebClientRepeating : Make repeated HTTP calls to a webserver wifi101WiFiWebServer : Serve a webpage from the WiFi shield Wifi101WiFiUdpSendReceiveString : Send and receive a UDP string wifi101UdpNTPClient : Query a Network Time Protocol (NTP) server using UDP | #### WiFi class The WiFi class initializes the ethernet library and network settings. begin() disconnect() config() setDNS() SSID() BSSID() RSSI() encryptionType() scanNetworks() status() getSocket() macAddress() #### IPAddress class The IPAddress class provides information about the network configuration. localIP() subnetMask() gatewayIP() #### Server class The Server class creates servers which can send data to and receive data from connected clients (programs running on other computers or devices). Server WiFiServer() begin() available() write() print() println() #### Client class The client class creates clients that can connect to servers and send and receive data. Client WiFiClient() WiFiSSLClient() connected() connect() connectSSL() write() print() println() available() read() flush() stop() #### UDP class The UDP class enables UDP message to be sent and received. WiFiUDP begin() available() beginPacket() endPacket() write() parsePacket() peek() read() flush() stop() remoteIP() remotePort()

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

### Share

### This link has expired.
Please re-subscribe to our Newsletters.

### Subscribe to our Newsletters

Email

Please enter a valid email to subscribe

Arduino Newsletter
Arduino Store Newsletter

### Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy

###### Newsletter

- ©2015 Arduino
- Copyright Notice
- Contact us
- About us
- Careers