Banned book library in a Wi-Fi lightbulb
Banned Book Library in a Wi-Fi Lightbulb
藏在 Wi-Fi 灯泡里的禁书图书馆
Banned Book Library Tags = [ cyberpunk, hacking, hardware ] Posted on June 15, 2026 at 06:35 PDT 禁书图书馆 标签 = [ 赛博朋克, 黑客, 硬件 ] 发布于 2026 年 6 月 15 日 06:35 PDT
Overview A long while back I had an idea to hack a WiFi smart light bulb to do something more useful to me. Actually, I had a few different ideas of things to do with them. One of these ideas was to modify the device to have an open WiFi access point and a web server hosting banned books. The idea was that if you lived somewhere that banned books you thought were important, you could theoretically stick a digital copy of the book on one of these light bulbs. Then you could go install it somewhere in your community. As long as the light bulb is switched on, then anyone in the vicinity can still access the banned material assuming they have an electronic device with WiFi. Since the device is a light bulb, it would be difficult to detect and likely to go unnoticed. A cyberpunk digital dead drop. These devices are also fairly inexpensive, so leaving them around town as is hopefully not very cost prohibitive. 概述 很久以前,我萌生了一个想法:黑入一个 Wi-Fi 智能灯泡,让它发挥更有用的作用。事实上,我当时有几个不同的点子。其中之一就是改装这个设备,让它成为一个开放的 Wi-Fi 热点,并运行一个托管禁书的网页服务器。这个想法是,如果你生活在一个禁书的地方,而你认为这些书很重要,理论上你可以把书的电子版存进这些灯泡里。然后,你可以把它安装在社区的某个地方。只要灯泡开着,任何在附近的人,只要有带 Wi-Fi 的电子设备,就能访问这些禁书。由于设备本身是个灯泡,它很难被察觉,也很容易被忽视。这简直是一个赛博朋克风格的数字死信箱。这些设备也相当便宜,所以把它们留在城里应该不会有太高的成本负担。
I think the idea hosting banned books specifically came to me after having read Ben Brown’s short story Library. It’s been a while since I read it, but if I recall there are characters in the story who maintain a “library” which acts as a digital archive of creative works, owners manuals, 3d models, etc. Things that others might find useful or interesting that you wouldn’t want to lose should they be somehow wiped from the Internet. That’s only a part of the story and it was a fun read. You should go read it! Anyway, a few months ago I decided to finally get to work on this project. The result is the Banned Book Library! 我想,托管禁书这个点子是在读了 Ben Brown 的短篇小说《图书馆》(Library)后产生的。虽然读完已经有一段时间了,但我记得故事里有角色维护着一个“图书馆”,它充当了创意作品、用户手册、3D 模型等的数字档案库。这些东西是别人可能觉得有用或有趣,且你不希望它们以某种方式从互联网上消失的资料。这只是故事的一部分,读起来很有趣。你应该去读读看!总之,几个月前,我决定终于开始着手这个项目。成果就是这个“禁书图书馆”!
Hardware I brought up this idea with some folks at my local DEFCON meetup group. One of them had some experience with home automation and recommended I look into Tasmota. Tasmota is an open-source firmware you can install on various smart devices to integrate them into a home automation system such as HomeAssistant. The main idea with this firmware is to provide you with local control over the device. Many of these devices rely on cloud services that change over time or sometimes completely disappear, leaving the devices unusable. Tasmota allows you to untether yourself from these cloud services and host everything internally. Actually, this is another great parallel to Ben Brown’s Library story. Also relevant is Cory Doctorow’s Unauthorized Bread. I hadn’t heard of Tasmota but after reading about it, it sounded like a good way to go. 硬件 我在当地的 DEFCON 聚会上向一些人提到了这个想法。其中一位有家庭自动化经验的朋友建议我研究一下 Tasmota。Tasmota 是一款开源固件,你可以将其安装在各种智能设备上,以便将它们集成到 HomeAssistant 等家庭自动化系统中。这个固件的核心理念是让你实现对设备的本地控制。许多智能设备依赖于云服务,而这些服务会随时间推移而改变,甚至有时会完全消失,导致设备无法使用。Tasmota 让你摆脱这些云服务的束缚,将一切托管在本地。事实上,这与 Ben Brown 的《图书馆》故事又是一个很好的呼应。Cory Doctorow 的《未经授权的面包》(Unauthorized Bread)也与之相关。我以前没听说过 Tasmota,但在阅读相关资料后,觉得这确实是个好方向。
I had sort of expected many of these smart light bulbs would rely on ESP32 chips, or similar. Having no experience with them made it feel a bit daunting to get started. I thought maybe it might be easier to modify the Tasmota firmware to do what I wanted instead of writing something from scratch. I did not end up modifying Tasmota in the end, but this rabbit hole did lead me to find a website that sells WiFi light bulbs with Tasmota pre-installed. The product page even specified that the bulb uses an ESP32C3 4MB. It also listed which GPIO pins were used to control the various LEDs, which would come in handy later: R:GPIO6 G:GPIO7 B:GPIO5 CW:GPIO3 WW:GPIO4 我预料到许多智能灯泡会依赖 ESP32 芯片或类似的芯片。由于我没有相关经验,起步时感到有些畏惧。我原以为修改 Tasmota 固件来实现我的需求,比从零开始写代码要容易些。最终我并没有修改 Tasmota,但这个探索过程让我发现了一个网站,专门销售预装了 Tasmota 的 Wi-Fi 灯泡。产品页面甚至明确指出该灯泡使用的是 ESP32C3 4MB 芯片。它还列出了用于控制各种 LED 的 GPIO 引脚,这在以后会派上用场:R:GPIO6 G:GPIO7 B:GPIO5 CW:GPIO3 WW:GPIO4
This seemed like a great starting point because although Tasmota supports many other devices, not all of them can be flashed over the air (OTA). Many of them require breaking them open, soldering on small wires, and flashing via a serial programmer. Tasmota has a built-in mechanism to update the firmware OTA, so it seemed likely I might be able to flash my own modified Tasmota firmware, or otherwise a custom firmware without having to tear the light bulbs apart. The one thing that struck me as a potential problem was the flash size. It was listed as 4MB. This is not very much space to host a library of books… That 4MB would need to fit all of the firmware, the website, and any books. Not much space. I thought I might be able to overcome this by adding storage, such as a microSD card reader. More on that later. I purchased two of these bulbs to play with. I figured I might end up breaking or bricking one, so having a backup would be good. 这似乎是一个很好的起点,因为虽然 Tasmota 支持许多其他设备,但并非所有设备都能通过无线(OTA)方式刷入固件。许多设备需要拆开外壳、焊接细导线,并通过串口编程器进行刷写。Tasmota 内置了 OTA 更新固件的机制,所以我很有可能在不拆开灯泡的情况下,刷入我自己修改的 Tasmota 固件或其他自定义固件。唯一让我觉得是个潜在问题的是闪存大小。规格表上写的是 4MB。这对于托管一个书籍图书馆来说空间太小了……这 4MB 需要容纳固件、网页以及所有的书籍。空间非常有限。我想我可以通过增加存储设备(例如 microSD 读卡器)来解决这个问题。稍后再详述。我买了两个这样的灯泡来折腾。我想我可能会弄坏或把其中一个变砖,所以有个备用的会比较好。
Teardown The bulbs showed up in the main a few days later and I opened up the box to check it out. The first thing I wanted to do was open it up and see what I was working with. I was mainly wondering if the pins were exposed so I might be able to attach a microSD card reader. To remove the white plastic bulb on top, I ran a razer blade around the circumference of the bulb in between the base and the bulb. I had to go around twice, the second time angling the knife downward to cut through the sealant inside. Then I was able to just twist and pull the bulb right off. Minimal damage. This revealed a round daughter board with all of the LEDs on it. This PCB was attached to another one underneath using six pins. There was also a hole in the middle where the mother board stuck through a bit. This ended up being the antenna for the ESP32. The bulb housing was lined with aluminum and the daughter board was also made of aluminum. So they likely designed it this way to ensure a decent wifi signal. The daughter board was glued in with more sealant. I used my knife to cut through this and a small, flat screwdriver to carefully pry the daughter board out. I slid it up so it would separate from the mother board. Now I could very clearly see the ESP32C3 inside, as well as some other supporting circuitry. I’m no electronics expert, but I believe most of the components inside are to convert the AC mains power to a cleaner 3.3V DC for the ESP32 as well as whatever voltage was needed to drive the LEDs. I never plugged this device into mains while it was open so I didn’t measure the voltage for the LEDs. One nice thing about this ESP32 was that it seemed to have a bunch of pins exposed. I hoped this might make it possible to solder on a microSD card reader for expanded storage. You can also see some of the pins are labeled at the bottom to let you know which pins are for which 拆解 几天后灯泡寄到了,我打开盒子检查了一下。我首先想做的就是拆开它,看看内部结构。我主要是想确认引脚是否外露,以便我能接上一个 microSD 读卡器。为了拆掉顶部的白色塑料灯罩,我沿着灯座和灯罩之间的缝隙用剃须刀片划了一圈。我划了两遍,第二次时将刀片向下倾斜,以切开内部的密封胶。然后我就可以直接扭动并拔下灯罩,几乎没有损坏。这露出了一块圆形的子板,上面装有所有的 LED。这块 PCB 通过六个引脚连接到下方的另一块板子上。中间还有一个孔,主板的一部分从那里伸出来。这原来是 ESP32 的天线。灯泡外壳内衬有铝,子板也是铝制的。所以他们这样设计可能是为了确保良好的 Wi-Fi 信号。子板是用更多的密封胶粘住的。我用刀切开密封胶,并用一把小的一字螺丝刀小心地撬出子板。我把它向上滑,使其与主板分离。现在我可以非常清楚地看到里面的 ESP32C3,以及其他一些辅助电路。我不是电子专家,但我相信里面的大多数组件是为了将交流市电转换为供 ESP32 使用的更纯净的 3.3V 直流电,以及驱动 LED 所需的电压。在拆开状态下,我从未将此设备接入市电,因此我没有测量 LED 的电压。这个 ESP32 的一个优点是它似乎有很多引脚外露。我希望这能让我焊接一个 microSD 读卡器来扩展存储空间。你也可以看到底部标注了一些引脚,告诉你哪些引脚对应什么功能。