HomeIoTThis Vape Net Server Is Not Vaporware

This Vape Net Server Is Not Vaporware



With the entire dwelling automation methods and private challenge web sites that electronics and software program hobbyists construct of their free time, they begin to actually add up. Earlier than they understand it, they may have a closet filled with single-board computer systems serving up historical internet functions that haven’t been touched for the reason that introduction of the iPod’s click on wheel. In spite of everything that point, that {hardware} is perhaps beginning to lose its steam.

Upgrading to new single-board computer systems is perhaps essentially the most wise choice, however Bogdan Ionescu has give you a extra attention-grabbing method to assist that {hardware} get its steam (or reasonably, aerosol) again. Ionescu has confirmed that the ridiculously overpowered disposable vapes that litter parking heaps in every single place, of all issues, could make completely advantageous internet servers — so long as you don’t have to push them too laborious.

For years, Ionescu had been amassing disposable vapes to salvage the batteries. However because the gadgets turned extra refined, he began to think about what different {hardware} could possibly be repurposed. Inside newer vapes, as an alternative of the anticipated epoxy-blobbed ASICs, he found microcontrollers from PUYA. These specific chips, within the PY32 sequence, characteristic a 24 MHz ARM Cortex-M0+ CPU, 24 KB of flash storage, and three KB of RAM. That is probably not a number of energy, however it’s hardly worthy of being referred to as “disposable.”

The thought of utilizing one in all these vapes as an internet server got here after experimenting with semihosting, which is a debugging characteristic that enables an embedded microcontroller to cross system calls by way of to a bunch machine. By chaining semihosting with old-school SLIP (Serial Line Web Protocol), Ionescu was in a position to trick Linux into treating the vape like a dial-up modem. From there, he may transmit and obtain actual IP packets by operating uIP, a light-weight TCP/IP stack designed for memory-constrained methods.

At first, the outcomes have been fairly terrible, with pings of 1.5 seconds, 50% packet loss, and internet pages that took greater than 20 seconds to load. However the bottleneck turned out to be the byte-by-byte dealing with of SLIP packets. By including a hoop buffer to cache reads and batching writes, Ionescu unleashed the vape’s full potential. With that, pings dropped to twenty ms, packet loss vanished, and full internet pages loaded in round 160 ms.

With slightly below 1.4 KB of RAM consumed, there was nonetheless room to run different small duties, and solely about 20% of flash storage was used. That left sufficient area to host his complete weblog submit and even add a easy JSON API reporting web page request counts and the gadget’s distinctive ID.

After all, this isn’t going to exchange information facilities anytime quickly. Twenty kilobytes of storage doesn’t go away a lot room for any internet frameworks, and the setup relies on a related debugger. Nonetheless, the experiment exhibits simply how a lot hidden computing energy exists in on a regular basis devices which might be designed to be thrown away.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments