Web hosting bills getting too expensive? Maybe you ought to consider serving your site from a one-dollar 8-bit microcontroller. Okay, you won’t exactly be serving up a high-performance, graphic-rich website using this project from a European developer and blogger who goes by Maurycyz. The setup is limited to one URL, but hey, it actually works, provided an influx of visitors hasn’t killed the site yet. The bargain-basement chip that serves as the central component of this project is the AVR64DD32, which currently retails from DigiKey for $1.30. It has a single 8-bit AVR core with a blistering 24 MHz max clock speed, 8 KB of static RAM, 64 KB of flash memory, and 256 bytes of EEPROM non-volatile memory for storing a very limited amount of data. Serving a web page from such a limited chip is a task, to say the least, and Maurycyz had to do a lot of legwork to get the thing working. The I/O pins on the AVR max out at 12 MHz, which Maurycyz explained meant that it wouldn’t be possible to use Ethernet for the project, as the data flow from even the aged baseline Ethernet connection of 10BASE-T is too fast for the chip to handle. “10BASE-T still runs at 10 megabits/second,” Maurycyz wrote. “Worse, it uses Manchester encoding: a zero is sent as ‘10’ and a one as ‘01,’ so 10 megabits of data is actually 20 megabits at the wire.” “The proper solution is to buy a dedicated Ethernet chip from DigiKey, but then I'd be waiting weeks to finish this project,” Maurycyz noted. Instead of waiting, he decided to take a different approach by turning to Serial Line Internet Protocol (SLIP), just like the guy who turned a discarded vape into a web server last year. For those unfamiliar with SLIP, it’s a 38-year-old protocol designed to encapsulate IP traffic for transmission over serial lines, and it was widely used to make internet connections in the olden days. SLIP is still supported in modern Linux builds due to its compact size and the fact that it’s often used to connect microcontrollers to the internet. Now, giving the AVR an internet connection didn’t solve the harder problem of actually serving a web page to visitors. Maurycyz said the chip could generate response packets by swapping the source and destination addresses on incoming traffic and resetting the packet’s TTL value, but implementing TCP still took several days of work. HTTP handling was simplified by returning a hardcoded response for every request, which works as long as the site only serves a single URL. Here’s that limitation we were talking about: “This works fine as long as there's only a single URL on the site,” Maurycyz said. Sorry for those wanting to host more pages from that $1 microcontroller. Lastly, Maurycyz said he had to figure out how to get requests from the internet to the microcontroller without spending money on a publicly routed IP address. That was resolved by using WireGuard to connect the microcontroller located at his home to a public-facing machine at a Helsinki datacenter, which then proxied requests to the microcontroller using a local address block. “This means that visitors aren't directly connecting to the MCU's TCP/IP stack... but hey, it's the same setup that the Vape Server uses and no one complained,” Maurycyz said. And all without having to buy a vape or root through dumpsters to find an old one. Source code and a pre-built binary are available from Maurycyz’s site for those who want to try this experiment for themselves. We reached out to Maurycyz for more info on the project, but didn’t hear back. ®
source https://www.theregister.com/offbeat/2026/05/18/yes-you-can-serve-a-website-from-a-1-microcontroller/5242096
Scientists reveal the surprising truth about coffee and blood pressure
-
Coffee may give your blood pressure a temporary jolt, but that doesn’t mean
it’s secretly wrecking your heart. Researchers say caffeine can briefly
raise b...
21 hours ago

0 comments:
Post a Comment