Our conscience almost prevented us from posting this one. Almost.
What do people all around the world want most? Free WiFi. And what inevitable force do they want to avoid most, just after death and taxes? Rick Astley. As a getting-started project with the ESP8266, Hackaday.io user [jaime] built a “free WiFi portal” that takes advantage of people’s deepest desires. Instead of delivering sweet, high-bandwidth connectivity, once you click through the onerous terms and conditions, it delivers you a looped GIF with background music.
And all of this on $4 worth of hardware, with firmware assembled in the cloud and easily available to anyone. We live in a truly frivolous glorious age.
Digging through our archives, we found a number of Rickroll posts that we’d rather forget, but this steam-powered record player bears a second look.
One of the best hacks I have seen today!
very neat!
On a related topic, it would be nice to make a survey of all the different dev environments available for the esp8266 :)
Now that might actually be the first project I repeat. I wonder just how much of flash on these devices it’d take.
Love it :)
Oh I totally need to build one of these!
You guys missed a huge part of this. It’s a great way for someone to start using platformIO. I really encourage people to check it out and step through how he did this so you can get some exposure to this great platform for small device programming. It makes the MSP430 an actually usable device in contrast to the horrid TI libraries, and even worse TI’s choice of IDE.
It sure does seem to be a very easy way to have a project quickly done and operational.
However, one might argue that it encourages getting to the point faster and not bothering about the details of each programming language / optimizing one’s program for speed and performance… in short leaving perfectionism on the side.
On the other hand, I completely agree that standard dev envs can be extremely annoying to setup and that examples you find online (or made by others) can barely be commented / documented.
Others may also argue that fighting to get something working encourages one’s creativity and ingenuity…
I’m very very divided on that topic.
Quality vs quantity. When you lower the bar, then you’ll find a lot of low quality code from newbies spamming google search and making it even harder to find the good quality code.
Well the thing is that you can still find relatively good code made using flexible programming languages like Lua: http://www.esp8266.com/viewtopic.php?f=19&t=8916
I’m sure that’s my personal bias, but when I see that kind of good code I wonder “why do it in that language that will take quite a while to execute?”…. even if I’m sure it’ll eventually get integrated in the dedicated library.
Still, I ended up using that code for a quick personal project but I can imagine having a hard time explaining to a potential client what I might prefer going for the real dev env when all he needs is a simple clock (for example… though I’m sure I’d use it in the end).
I am a perfectionist but I’m sure my code could use some optimizing. There is a lot of stuff in there that is unnecessary to the the actual Rick Roll. It was a base project to learn about lots of the features of the ESP8266 and how to use them.
must resist the urge to make this and put outside my lab at the university.
Do it. :)
But if they find out who did it they might ban you. :P
they will never.. :)
HMM, rickrolling on a budget. Love it.
Coming from one of the craziest posters her, me, I’d suggest this could be used also for advertising or an electronic version of airdropped (by drone) flyers in places with strict censorship! A “lawn dart” version could be scattered around a city possible even solar powered?
A Rick Roll Throwie! :D
I had the same thought. Unfortunately the current draw will flatten that battery in no time.
That said, I have a bag full of ESP boards… I think I’m going to have to build something for upcoming conferences that builds on this.
I have a bag of $2 5V wall warts that I got from the surplus shop. Total BOM cost (heck, total cost) is around $6. Plug it in, walk away.
Put the ESP INSIDE the wall wart!
You can find cheap minidro e lipos allowing a few hours of full time broadcast. See the ‘cheaper wifi throwies’ article published here some time ago.
Throwaway WiFi done right, finally.
I bet a well compressed video would take less space than a gif and music. I wonder if the gif would be more compatible…
I’m going to have to try this.
I have that song stuck in my head now.
I’m going to go turn on the radio for awile…
where is the source download?
https://github.com/idolpx/mobile-rr?files=1
I think this is it.
Encountered some issues building this. Go into the platformio.ini file and delete the env D1 entry. Then run the platformio init board initialization for your specific esp8266 module (http://docs.platformio.org/en/latest/quickstart.html). Also, the upload spiffs would run into a file system full error. Gzip the jquery, console, and index files in the data dir and youll be good to go. Done on my Nodemcu 0.9
Is it as fast as shown in the video? My experience of esp as a server for Mb file was MUUUCH slower…
Yes it actually runs very quick. The co sole works great too. Just use chrome and not ie on windows 10
For simple pages the only difference between navivators should be caching. Which points to my feeling : the video is too fast to be true, the navivators is probably using its cache the biggest files (gif and mp3). Without cache even a modest 5 kb file takes a couple of seconds to load…
When the captive portal page with “Terms of Service” is displayed I have it set to cache the GIF and MP3 before the “I Accept” button is displayed so that when it is clicked you get Rick Rolled immediately. There is some jQuery that just hides the TOS and displays the GIF and starts the audio when the button is clicked. It is as fast as it shows in the video.
Actually… it’s just plain javascript in that page. I ripped out the jQuery at some point to make it lighter. The console required jQuery so I added it back in for the console.
Sweet… I tried this once but in Lua, which limits file sizes to 26k. Also having the long mp3 and gif files loaded while people read the free wifi screen is a good idea…
Note that for mobile users (bulk of wifi users in tourist areas) the mp3 is not useful because it slows a little bit the loading and the music does not play automatically.
Yes… for mobile users the audio doesn’t play automatically. You need a user to click something to make the audio play. The “I Accept” button is that user interaction that authorizes the audio to play. I lowered the quality and recompressed the MP3 down to 151K before posting the project. It’s actually smaller than the animated GIF.
Originally I had the HTML, Javascript and CSS files gzipped. I left them uncompressed when posting the project because with the 3MB SPIFFS file system they fit with room to spare and it’s easier for people to just open them up and make adjustments. I figured it would simplify things for some users.
As I have it, everything loads just fine. Thanks for the feedback though.
Deleting the board configuration also removed the setting to build a 3M SPIFFS file system. Gzipping the files does help save space though.
build_flags = -Wl,-Tesp8266.flash.4m.ld
There is also a flag to set the board speed to 160Mhz and the upload port for OTA updates (faster) after the initial load. Just uncomment the setting and connect to the ESP Access Point before trying to upload the firmware or SPIFFS image.
board_f_cpu = 160000000L
#upload_port = 10.10.10.1
That helped! I just copied the template you had before with those lines in it. Awesome!
I just thought of an idea.
Place one of these into a 5v cell-phone type charger.
When it’s plugged in you always have power.
Go somewhere that has free open wifi and find something that is being
charged by a 5v power wart and swap this for that one.
One local large retailer near me always has a few of those hand held barcode
scanners on chargers.
Get the ESP8266 to log onto the free wifi and serve up modified internet data
to anyone who sees your ESP8266 free hoax wifi access point :-) The possibilities
for mayhem are endless.
Perhaps you could even remote-update the data on the ESP8266.
I wonder if this could easily be done on the ESP8266?
Seems like using a raspberry pi 3 as a wifi AP connected to an Ethernet port doing the upsidedownternet would be a good choice.
Perhaps a Pi Zero with a wifi dongle?
Good thinking…I think it can be done provided the drivers let you do ap and client simultaneously. You’d need to create a virtual ap. A quick scan brought me this…
https://www.raspberrypi.org/forums/viewtopic.php?f=36&t=138730&start=25
This has all given me the hots to build some wifi projects!
How about a Pi Zero with wifi dongle as a way to safely provide free wifi for people
near your home. Route all the traffic through TOR to keep both your ip secret and
give anonymity to the users. You could place the Zero in a weather-tight box and mount
below an external antenna at the tallest point on your house for good range. You could limit
the bandwidth if you have slow internet.
I’d use a C.H.I.P. $9 computer. It already has WiFi and 4GB of flash memory. Adding WiFi and an SD card to a PI Zero would cost you more than $9.
One of my next projects is to use one of these to build a WiFi Captive Portal MMORPG. Was thinking BrowserQuest style.
Or maybe one of these.
https://www.kickstarter.com/projects/onion/omega2-5-iot-computer-with-wi-fi-powered-by-linux
And yes…with some removal of the extra “features” it can be done a 512KB ESP-01…just perhaps not with the MP3 and GIF. Plenty of fun can be had in a handful of kilobytes with plain old HTML/Javascript. Great ProjectIO learning exercise. I never would have went looking and my ESP-01 would still be sitting in my project bag…waiting for a fun project. I would use this “honeypot” to display whatever custom message I wanted where ever I wanted. It’s part social engineering and part trickery.