Banned Book Library: Turning a Smart Light Bulb into a Digital Dead Drop
Overview
The Banned Book Library is a project that transforms a standard WiFi smart light bulb into a "digital dead drop"—an offline, open WiFi access point and web server that hosts digital copies of banned or challenged books. The goal is to provide a discreet way to distribute important literature in communities where such materials are restricted, utilizing the inconspicuous nature of a light bulb to avoid detection.
Hardware and Teardown
Device Selection
The project utilizes a smart bulb powered by an ESP32-C3 chip with 4MB of flash memory. The author selected a bulb with Tasmota firmware pre-installed to facilitate over-the-air (OTA) flashing, avoiding the immediate need for hardware modification.
Physical Modification
To explore the hardware, the author performed a teardown by removing the plastic bulb housing and the LED daughter board. This revealed the motherboard encased in a rubbery potting compound, which had to be manually removed to access the ESP32-C3 pins.
To enable serial programming, the author soldered wires to the following pins:
- VCC and GND: For power (3.3V).
- TX and RX: For serial UART communication.
- IO9: Shorted to ground to put the chip into download mode for flashing.
Firmware Development and Storage Optimization
Transition from Arduino to ESP-IDF
Initial development began with the Arduino IDE for rapid prototyping of the web server and WiFi access point. However, the author encountered a critical limitation: the Arduino framework prevents writing to sensitive flash areas, such as the partition table, for safety reasons.
To overcome this, the project migrated to the ESP-IDF (Espressif IoT Development Framework). By enabling the SPI_FLASH_DANGEROUS_WRITE_ALLOWED setting in menuconfig, the author gained the ability to modify the partition table directly. To maintain the ease of use of Arduino libraries, the author integrated "Arduino as a Component" within the ESP-IDF environment.
Partition Table Modification
With only 4MB of total flash, the default Tasmota partition layout left only 320KB for storage (SPIFFS), which is insufficient for a library of ebooks. The author redesigned the partition table to shrink the application partition (app0) and expand the storage partition (spiffs) to 2MB, providing enough space for several EPUB files and web assets.
Custom Safeboot Implementation
To ensure the device remains updatable without compromising security, the author implemented a custom safeboot firmware. This was necessary because the original Tasmota safeboot stored WiFi credentials in plaintext in the NVS (non-volatile storage) partition, posing an OPSEC risk for a public dead drop. The custom safeboot creates its own access point and hosts a minimal web server for OTA updates, allowing the main firmware to erase NVS data upon deployment.
Software Architecture
Web Application and Admin Panel
The device hosts a web application featuring a themed index page and a library section listing books, authors, and the reasons they were banned. An administrative panel at /admin (password-protected) allows the operator to adjust the LED color temperature using AnalogWrite() on specific GPIO pins, ensuring the bulb blends in with existing lighting in a public space.
Captive Portal Integration
To ensure users can find the library without manually entering a URL, the author implemented a captive portal. This is achieved through two primary mechanisms:
- DNS Redirection: A DNS server responds to all requests with the device's own IP address.
- HTTP Interception: The server catches specific "call home" requests from Android, iOS, and Windows devices (e.g.,
/generate_204or/hotspot-detect.html) and redirects them to the local library URL.
Technical Constraints and Insights
Storage Limitations
Despite the partition expansion, the 4MB limit restricts the library to a few books (average EPUB size ~350KB). The author notes that this limitation transforms the project from a general archive into a curated collection, where each dead drop reflects the specific values of its creator.
Community Perspectives
Discussion surrounding the project highlighted several technical and conceptual points:
- Detection Risks: Some users noted that while the bulb is physically inconspicuous, the open WiFi SSID would be easily detectable via a network scan.
- OS Limitations: Android devices often automatically disconnect from WiFi networks that do not provide internet access, which may hinder organic discovery.
- Alternative Implementations: Commenters suggested using compression (e.g., LZS) to increase the number of stored books or evolving the project into a mesh network using protocols like Reticulum or Meshtastic to share books across multiple bulbs.
"I think there is something delightfully poetic about using a source of light to spread suppressed knowledge."
Summary of Technical Stack
| Component | Technology Used |
|---|---|
| Microcontroller | ESP32-C3 |
| Framework | ESP-IDF with Arduino as a Component |
| Filesystem | LittleFS / SPIFFS |
| Communication | WiFi AP, DNS Server, HTTP Web Server |
| OTA Updates | ElegantOTA, Custom Safeboot |
| Hardware Control | GPIO PWM (AnalogWrite) |