ESP8266 WiFi Throwies

A few years ago, someone figured out you can take an LED, a coin cell battery, and a magnet, tape them together, and throw them on every conceivable metallic surface. This was the creation of LED throwies, and the world was much worse off for its invention.

With the ESP-8266 WiFi module, we have a tiny, tiny device with a WiFi radio, and just enough processing power to do something interesting. What does that mean? WiFi throwies.

[Andreas Reischle] stuffed an ESP-8266 WiFi module and a lithium cell inside a weatherproof controller loaded up with magnets. On its own, these wouldn’t do much, but with the right combination of software, this little magnetic box can serve as an access point, serving up small JavaScript games to anyone who connects.

The software is based on the NodeMCU firmware and features a web server and a DNS server. The utility of a web server is obvious, and the DNS server redirects all traffic to the device’s index.html file, where a menu of small JavaScript games are presented.

It’s much better than polluting the world with LEDs and lithium; this one has Hunt the Wumpus on it.

Thanks [Oliver] for the tip.

64 thoughts on “ESP8266 WiFi Throwies

          1. Battery life is still a bit of a limitation. It could probably be overcome with solar panels to charge the battery, but then it’s a little bigger. Probably still pretty cheap though.

    1. You’d probably have to put it into some kind of sleep mode. Mine seem to draw about 60 mA in normal operation, which would give about 3.5 days of life for one battery.

      1. I don’t think the police really would mind. In fact, I’d doubt anyone would ever notice it, considering how little power is being siphoned. If anyone ever did figure it out, finding the source would take forever, only to find out its a small chip serving up a wifi network that points to nobody. The only thing this will do well is serve advertisements to people who think they are connecting to a free WiFi site.

    1. You would have to dig into the pole and wind the coil either around the live wire or the ground one. The total magnetic field of the pole is almost zero as the L and N magnetic fields cancels each other.

        1. Nah, lipos don’t catch fire in that scenario; in fact the more discharged they are the more they’re just an inert lump of stuff. As long as you don’t discharge them too fast, which an esp8266 is going to have a hard time doing.

    1. Today I learned, that if you are blocking Cookies, Flick’r will show you the image for a second and then overlays it with a error message that cant be closed. Apparently displaying images is bleeding edge technique.

      1. You can delete the element that’s blocking the image! Pop open Developer Console / Tools in your browser. After opening, you can browse the list of elements (Elements in Chrome, Inspector in Firefox) until the offending layer is found; then remove it with backspace/delete. Undo operation is the standard CTRL-Z or just reload the page if you goof up. Good luck!

      2. If you use firefox, you can right click on the offending element, select ‘inspect element’ and delete the entire node from the HTML. Works like a charm. I use it frequently with sites that interpret the Dutch cookie law as ‘block any access until the mark has accepted all cookies we want to shove down his throat.’

  1. +1 for the mesh network idea. Otherwise, this idea is just whimsical and fun but has no real utility.
    “I threw my server in the air and it got stuck in a tree”

  2. Today I learned, that if you are blocking Cookies, Flick’r will show you the image for a second and then overlays it with a error message that cant be closed. Apparently displaying images is bleeding edge technique.

    1. Flickr is owned by Yahoo! now… it’s unfortunately quite typical of Yahoo! to take a perfectly good site and absolutely ruin it in the name of corporate takeovers and making it theirs. Ugh.

  3. What stops someone from setting this up in a crowded area, where nobody can see it, using a common name as an access point, to push viruses or objectionable material? I mean, nobody is going to suspect a randomly placed conduit box. It doesn’t look like a router, just looks like a box. I wouldn’t suspect it at all.

    1. Or just take two usb chargers, one really small and one big. Gut the big one and put the small charger and the esp8266 in it and connect everything up. Then you have a functioning charger and a virus/malware distributor.

      For extra fun have it scan the ssid’s of near by open ap’s and have it change the same to one of them – people will not know which of the McDfreeWifi that is the real one.

  4. Put a 64GB microSD (£30 or less) and have it serve up 24/7/365.25 torrents :-)

    Wireless update via mesh, good luck putting that genie back in the bottle.
    The download speed will suck but thats no biggie AND added bonus is that people can decided which torrents they want just by going to a specific area.

    slight snag: expensive but if you order the parts in bulk and go for Class 10 cards rather than UHS-2 thats less than a round of drinks per unit (ie £15)

  5. Also worth noting that this is handy in the event of an Internet outage for distributing videos, updates etc and most importantly the real news ie uncensored and unrestricted by whatever Governtatorship is left.
    I’ve also found that Nokia batteries can be revived using the “feed 3V@20mA into left hand pin under sticky label” technique, some folks also use a heated pin to contact that hidden charging point.

  6. I was wondering on how to implement a captive proxy on the ESP8266 and here it is, great!

    Can you please elaborate on the change that is required in the nodeMCU firmware to get the DNS part working?

    1. Yes of course:
      I started out with the NodeMCU source dated 20150213 this version had an issue with the LUAL_BUFFERSIZE in app/lua/luaconf.h . I changed that back to “#define LUAL_BUFFERSIZE BUFSIZ”. This might be fixed in newer versions.
      The other thing is that the DNS feature of the DHCP server just needs to be switched on. It is alreadyimplemented in the code, just waiting to be used:
      So in: ./app/include/lwip/app/dhcpserver.h (Line 55) simply add a “#define USE_DNS 1”
      After compiling and flashing, when running in SoftAP mode, the DHCP server will report 192.168.4.1 as DNS server to the client.

      The dns-liar.lua will be waiting for DNS requests when you have the CaptiveIntraweb code from github running on the module.

  7. Would be interested to see this expanded with a small solar charger, neodyn magnets and sd card attached.
    Thinking as a small game with clues it could be interesting to have a scavenger style cyber hunt with clues, puzzles etc. It could allow for some fun local business advertisements, or promote secrete deals, as well as explain how such simple tech could help save lives.
    Something that showed that this type of tech could be used and encourage others to look into and experiment.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.