Your PC has no WiFi, or its WiFi card is flaky, or you just want a cheap, hackable network adapter. You probably have an ESP32-S3 or a Pico 2 W in a drawer. TinyWifiDongle turns it into a USB WiFi dongle:
#include "TinyWifiDongle.h"
TinyWifiDongle dongle;
void setup() { dongle.begin("ssid", "password"); }
void loop() {}
Flash it, plug it in, and your PC sees a normal network adapter. No driver is needed, because Linux, macOS and Windows 11 already ship a CDC-NCM driver.
Why does it exist?
Most “WiFi on a microcontroller” projects go the other way: the MCU is the client and runs its own TCP/IP stack. That’s fine for sensors, but it makes the board a dead end. It can’t give a PC network access.
I wanted the reverse. The MCU should be a transparent bridge, with no IP stack of its own, that copies Ethernet frames unchanged between USB and WiFi. The PC then becomes an ordinary client of your WiFi network. It gets its address from your router’s DHCP server and shows up like any laptop. That keeps the firmware small and avoids NAT and routing tricks. It also gives you a base for experiments such as Wake-on-LAN, custom filtering and logging, or adding WiFi to a headless box.
It’s also a handy real-world demo of what TinyUSB, the ESP32-S3 and the RP2350 can do together, all in a header-only library.
What you get
- ESP32-S2/S3 and Pico W / Pico 2 W supported (ESP32-P4 compiles; its USB side is untested)
- Setup in the browser: if you don’t want to hard-code credentials, the board opens its own setup page
- Honest speeds: full-speed USB limits you to about 600 KB/s on the ESP32-S3 and about 250 KB/s on the Pico 2 W. That’s fine for browsing and downloads, but don’t expect gigabit.
- Pluggable logging to any Arduino
Print
Grab it from GitHub: https://github.com/pschatzmann/TinyWifiDongle
0 Comments