James Judd Adds SPI Ethernet Support to the Raspberry Pi Pico — and Other RP2040 Boards, Too

New release, based on an Arduino driver, adds support for the ENC28J60 SPI Ethernet module and the lwIP TCP/IP stack.

Gareth Halfacree
3 years ago

Back-end engineer James Judd has released software which adds support for the the Lightweight IP (lwIP) stack and the popular ENC28J60 SPI-connected Ethernet module to add network support to the low-cost Raspberry Pi Pico microcontroller board.

The Raspberry Pi Pico, launched earlier this year as the first device to feature Raspberry Pi's in-house RP2040 microcontroller chip, has proven as popular as its bargain-basement $4 price point would suggest — but that hasn't stopped people wishing for additional features. Key among these is some form of network capabilities, and Judd's software brings exactly that to the table.

"My goal was to be able to ping [the Raspberry Pi Pico]," Judd writes of the self-described side project. "Four weeks later, the Pico pinged back! Packets are read from SPI and then fed to lwIP which is running in 'NO_SYS' mode — because the Pi Pico has no operating system!"

While designed for and tested on the Raspberry Pi Pico, the code should translate to any other microcontroller board based on the same RP2040 chip -—including the Zero RP2040, a project from pseudonymous maker arturo182 to put the RP2040 into a Raspberry Pi Zero form factor. "That means," he writes on Twitter, "the Ethernet HAT should work with the Zero RP2040!"

Judd isn't the first to bring networking to the Raspberry Pi Pico, either: Last month Hermann Stamm-Wilbrandt released code for adding lwIP-based networking to the device in both client and server modes, though relied on Ethernet-over-USB rather than true wired Ethernet interface.

Judd has released the source code for the project on GitHub under the GNU General Public License 2.0.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles