- WeMos D1 Mini $4.00 USD
- WeMos Relay Shield $2.10 USD
- Set as AP
- Enable webrepl
- Upload files
- Reboot
import network
sta_if = network.WLAN(network.STA_IF)
sta_if.active(False)
ap_if = network.WLAN(network.AP_IF)
ap_if.active(True)
import webrepl
webrepl.start()
import os
os.listdir()
- Open REPL
import useless_throwie
- Connect to AP
- Open 192.168.4.1 in a web browser
- Click the toggle switch
- Watch the relay
First attempts at a captive portal with DNS spoofing.
Based on Mini Fake DNS server.
Simple web server that reponds with pre-gzipped html content dist/web/hello_world.min.html.gz
.
Testing the relay and onboard LED.
Simple web server that serves the html toggle switch that can flip the relay (GPIO5) and onboard LED (GPIO2) when clicked.
Given the gzipped html, dist/web/useless_throwie.min.html.gz
, is around 8kb, this might only work on ESP8266s with larger flash chips. Without gzip, the minified html is around 15kb.
Work in progress. Useless throwie combined with a captive portal / DNS spoofing.