Jeremy P. Bentham's PicoWi Is a Standalone Bare-Metal Wi-Fi Driver for the Raspberry Pi Pico W
Built as part of a project for high-speed measurement and streaming, this open source driver unlocks the radio's capabilities.
Developer Jeremy P. Bentham has written a stand-alone driver for the Wi-Fi radio on the Raspberry Pi Pico W, as part of a project to create bare-metal firmware for high-performance measurement and streaming applications.
"The aim of this project is to provide a fast Wi-Fi driver for the CYW43439 chip on the [Raspberry] Pi Pico W module, with C code running on the RP2040 processor," Bentham explains of his work. "It can also be used with similar Broadcom/Cypress/Infineon chips that have an SPI [Serial Peripheral Interconnect] interface, such as the CYW4343W."
Traditionally, the Wi-Fi radio on the Raspberry Pi Pico is handled in firmware — MicroPython or CircuitPython, for most users. Bentham, however, is working on bare-metal applications — and thus needed a driver which could act on its own, without being tied to a particular firmware.
"For simplicity, I use a Raspberry Pi 4 to build the code and program the Pico, with two I/O [Input/Output] lines connected to the Pico SWD [Serial Wire Debug] interface," Bentham explains. "This is really easy to set up, using a single script that installs the SDK and all the necessary software tools on the Pi 4."
Bentham's driver includes sample code for everything from blinking an LED — the traditional hardware "hello, world" — to simple TCP/IP operations, though not everything is supported in the initial release: "For the time being, the code does not support the Access Point functionality within the Wi-Fi chip," Bentham notes. "It can only join a network that is unencrypted, or with WPA1 or WPA2 encryption."
More information is available on Bentham's website, with the source code published to GitHub under the permissive MIT license.