Code Monkey home page Code Monkey logo

mobile-rr's Introduction

ESP8266 Mobile Rick Roll Captive Portal

The purpose of this project was to help me get familiar with programming for the ESP8266 and have a bit of fun.

ESP8266 Mobile-RR

  • User connects to the device broadcasting an SSID of "FREE Highspeed WiFi" (this is configurable of course)
  • The captive portal helper on their phone/table/computer kicks in and presents them with a page showing "Terms of Service" and a button labeled "I Accept"
  • When they click the button a full screen animated GIF of Rick Astley dancing appears and an audio clip of "Never Gonna Give You Up" starts playing on loop along with a message in the bottom right letting them know they got rock rolled (Incase they don't understand what's going on)

On bootup, the buzzer plays a little bit of "Never Gonna Give You Up". To access the console, connect to the ESP8266 Access Point and browse to "http://10.10.10.1/console". From here you can monitor all connections and see when someone gets Rick Roll'd by the device. The console also allows you to enter commands to get more info about the status of the device, change the SSID, get the Rick Roll count and even beep the buzzer.

The "debug" setting is on by default and shows you all DNS and HTTP requests made to the device. It's kind of cool to see all the sites that the apps on your phone are trying to access. Check out the screenshots of the console for a glimpse of what it looks like. Some apps are very noisy. You can toggle the "debug" off to not see that stuff.

Parts List

Wiring

Connect the '+' lead of the piezo to GPIO 4 (D2 on WeMos D1 Mini) and '-' lead to Ground. I chose GPIO 4 because I installed the long leads with the headers on the WeMos D1 Mini. The spacing from ground was perfect to just plug the buzzer in direct between G & D2.

Build Firmware

I use PlatformIO to build this. http://platformio.org/

  • Install PlatformIO and let it update itself on first startup
  • Once updated and restarted, clone the "mobile-rr" project to a folder and open the project in PlatformIO
  • Next build the firmware by clicking the checkmark icon on the toolbar

There is currently an issue with the latest version of a few libraries that this project depends on. To get things to compile you have to enter the following commands into the PlatformIO terminal.

Open the terminal in PlatformIO and enter the following commands.

> pio lib uninstall 305 306
> pio lib install 305 --version=5987225cf6
> pio lib install 306 --version=dab3077f2b

That will revert those libraries to the previous versions and everything will compile properly.

Build Firmware

Upload Firmware and SPIFFS data

After your firmware build is successful you can upload it by clicking the arrow under the checkmark in the PlatformIO toolbar.

Upload Firmware

You can add/edit the files in the "www" folder to your liking. (Files in the "www" folder will be cloned and gzipped to the "data" folder when building.) Then follow the instructions below to build and upload the SPIFFS file system image to your ESP8266.

Upload SPIFFS 1

Upload SPIFFS 2

Note: Anytime you make changes to the firmware or the data you can rebuild and upload either without the need to install the other again. They reside in different areas of the flash memory.

References

I learned everything I needed to create this from these projects

mobile-rr's People

Contributors

boneskull avatar idolpx avatar ivankravets avatar noki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.