Why my car-window WiFi billboard can't use HTTPS (and what I did instead)
I turned a $4 chip into a WiFi access point that advertises from a car window — and the interesting part wasn't the hardware, it was figuring out how to protect what people type into it.
What it is
A Wemos D1 mini — an ESP8266 dev board about the size of a stick of gum — turned into a self-contained WiFi access point that rides in a car window. Phones nearby see an open network; the moment one joins, a captive portal auto-opens a stripped-down version of our site with a short "want a free review?" form. There's no internet behind it. The board is the network: a parked billboard and a digital business card in one, running off USB power.
How it works
Four small pieces, all on the chip:
| Piece | Job |
|---|---|
| SoftAP | Broadcasts an open SSID phones can join |
| DNS server | Answers every lookup with the board's own address, so all roads lead to the page |
| Web server | Serves the page plus a QR code to the real site |
| Flash storage | Appends each submitted lead to the board's own filesystem |
The trick that makes the page pop by itself is the captive-portal probe. When your phone joins a network it quietly hits a known "is there internet here?" URL. We answer those probes by bouncing the phone to our page, and the OS throws up its "sign in to network" sheet automatically. No tapping required.
The HTTPS rabbit hole
My first instinct was "put it on HTTPS." It turns out a captive portal and HTTPS actively fight each other:
- The portal works by answering every domain with our own address. Over HTTPS the phone expects a certificate matching the domain it asked for — which we can't have — so the handshake fails and the auto-pop breaks.
- No certificate authority will ever issue a cert for a private address with no public domain, so the only option is self-signed, which greets every visitor with a full-screen "your connection is not private" warning. On a billboard, that warning is death.
- TLS on an 80 MHz chip is heavy and slow anyway.
So HTTPS makes the thing worse, not safer. But there's still a real gap: on an open network, anything typed into a plain form travels over the air in the clear.
What I did instead
I moved the encryption into the visitor's browser. When someone submits the form, their name, phone and email are sealed on their own phone, before anything is sent — a per-record public-key "sealed box" (an ephemeral key agreement plus authenticated encryption). The board only ever receives and stores ciphertext. The public key is baked into the firmware; the private key that opens it lives offline and never touches the device. Steal the board and you get gibberish.
The catch: browsers deliberately disable the built-in Web Crypto API on plain HTTP (it's treated as an insecure context), so I couldn't use it. I ended up implementing the crypto in plain JavaScript, leaning only on the two primitives browsers do allow over HTTP — a secure random source and a text encoder. Before trusting it, I ran the browser code against a reference implementation and did a full round-trip (seal in the browser, decrypt with the real offline tool) to prove it was byte-for-byte compatible.
If someone has JavaScript turned off, the form still works — the board encrypts that one record itself as a fallback, so no lead is ever lost. And there's a plain-English /security page plus a security.txt, because if you're going to ask strangers to type into your network, you should be able to explain exactly what happens to it.
Gotchas worth knowing
- Counterfeit USB-serial chip. The cheap boards ship with a cloned CH340. The newer official Windows driver detects the clone and bricks it — the port appears but won't open ("device not functioning," error 31). The fix is to pin an older signed driver. Worse, Windows Update keeps silently re-installing the bad one, so I scripted the rollback.
- The cable lied. A charge-only USB cable powers the board's LED but carries no data, so nothing enumerates. Hours of "why won't it connect?" traced back to a drawer cable. Keep one known-good data cable.
- No clock. The chip has no real-time clock, so it can't timestamp a lead. The fix fell out naturally: the browser already knows the time, so it stamps the record before sealing it.
- Don't cook a battery. A parked car in the sun is no place for a lithium cell. This runs off the car's USB, not a LiPo.
- Don't be a rogue AP. It's a billboard, not a trap: it never impersonates a venue's network and never blocks or kicks anyone off theirs. That line matters both legally and ethically.
The takeaway
The hardware was the easy afternoon. The real work was refusing the lazy answer ("just add HTTPS") and instead asking what actually protects the person on the other end — then proving it, not assuming it.
Want IT that's built this way — security reasoned from first principles, not bolted on? Come say hello.