
Bogdan Ionescu repurposed disposable vape hardware to host a working website. What looks like a novelty project actually explores creativity at tight hardware limits, reports BogdanTheGeek’s Blog. Rather than taking apart the vape for scrap, Ionescu identified a microcontroller inside, marked “PUYA” (likely a PY32F002B), an ARM Cortex-M0+ chip with a 24 MHz clock speed, ~24 KB flash memory, and ~3 KB of RAM. Despite meager resources, he realized it could still run a web server.
His setup uses semihosting: the microcontroller is connected to a host machine via a debugger, which relays requests and responds on its behalf. He funnels this interface through a serial link and then uses Serial Line Internet Protocol (SLIP) to turn the serial port into a virtual network interface. With that in place, he brings in a tiny IP stack (uIP), adds a minimal HTTP server, and successfully serves web content.
Early performance was glacial: requests had ~1.5 seconds ping times, ~50% packet loss, and a simple webpage took over 20 seconds to load. But by optimizing I/O, buffering reads, and combining writes, he improved dramatically: ping dropped to ~20 milliseconds, pages loaded in ~160 ms, and packet loss went to zero (at the cost of using a large share of the chip’s memory).
Despite constraints, with only ~1.4 KB usable RAM, flash mostly taken up, he managed to serve not just static HTML but also a tiny JSON API endpoint (e.g., number of visits). The whole blog post is hosted on the device.
This is not just a stunt. It’s a demonstration of what embedded systems can do. It reveals that with clever engineering, even “throwaway” hardware can be pushed far beyond its intended purpose. It’s a lesson in optimization, resourcefulness, and digital reuse.