UNIT.City — місце, де люди працюють... КРАЩЕ! Обирай свій простір просто зараз 👉
Наталя ХандусенкоHot News
16 September 2025, 11:46
2025-09-16
Engineer turns disposable vape into 24KB web server that loads pages in 160ms
Romanian engineer Bogdan Ionescu has been collecting discarded vapes for years to use their batteries, but when he noticed that the “trendier” models had more advanced microcontrollers, he decided to experiment.
Romanian engineer Bogdan Ionescu has been collecting discarded vapes for years to use their batteries, but when he noticed that the “trendier” models had more advanced microcontrollers, he decided to experiment.
In one of these vapes, Ionescu found a PUYA C642F15 chip. After research, he found out that it was actually a PY32F002B, which runs on an Arm Cortex M0+ processor (24 MHz). The chip also had 24 KB of flash memory and 3 KB of RAM, Interesting Engineering writes .
The engineer called this basic kit “so bad it could just be thrown away.” But even in it, he saw potential.
Ionescu decided to use a chip that supported the old SLIP protocol. This turned the device into a very simple analogue of a 56K modem. He then added the uIP 0.9 code, which allowed the vape to act as a web server and transmit data over TCP/IP.
The results were initially disappointing. “The ping time was about 1.5 seconds, and half of the data packets weren’t even delivered. A simple page took over 20 seconds to load. It was so bad it was laughable, and I thought about quitting,” Ionescu said.
But then the engineer realized that the problem was in his code. By adding a special buffer, he significantly accelerated data transfer. Further adjustments reduced the ping time to 20 ms without packet loss, and the full page started loading in about 160 ms.
He uploaded his blog post about this experiment to the server. The text barely fit into the available 20 KB of flash memory.
Visitors could access the page, which ran on a tiny vape server, but the server often failed due to the high number of requests. When many people accessed it at the same time, a “503” error would appear.