WiFi (Raspberry Pi Pico W) Support

WiFi is supported on the Raspberry Pi Pico W by selecting the “Raspberry Pi Pico W” board in the Boards Manager. It is generally compatible with the Arduino WiFi library and the ESP8266 Arduino WiFi library.

Enable WiFi support by selecting the Raspberry Pi Pico W board in the IDE and adding #include <WiFi.h> in your sketch.

Supported Features

  • WiFi connection (Open, WPA/WPA2)

    • Static IP or dynamic DHCP supported

    • Station Mode (STA, connects to an existing network)

    • Access Point Mode (AP, creates its own wireless network) with 4 clients

  • WiFi Scanning and Reporting

    • See the ScanNetworks.ino example to better understand the process.

Important Information

  • Adding WiFi increases flash usage by over 220KB

    • There is a 220KB binary firmware blob for the WiFi chip (CYW43-series) which the Pico W uses, even to control the onboard LED.

  • Adding WiFi increases RAM usage by ~40KB.

    • LWIP, the TCP/IP driver, requires preallocated buffers to allow it to run in non-polling mode (i.e. packets can be sent and received in the background without the application needing to explicitly do anything).

  • The WiFi driver has some limitations stemming from the upstream SDK:

    • Extensible Authentication Protocol (EAP) is not supported

    • Combined STA/AP mode is not supported

  • Multicore is supported, but only core 0 may run WiFi related code when in bare metal. When using FreeRTOS, any Task on any core can perform networking operations.

The WiFi library borrows much work from the ESP8266 Arduino Core , especially the WiFiClient and WiFiServer classes.

Special Thanks

Special thanks to:

  • @todbot for donating one of his Pico W boards to the effort

  • @d-a-v for much patient explanation about LWIP internals

  • The whole ESP8266 Arduino team for their network classes

  • Adafruit Industries for their kind donation