# open-desk-lamp-firmware: replacement firmware for the Xiaomi desk lamp

> Replaces the ESP8266-based Xiaomi desk lamp firmware with an open implementation of the lamp's local power, dimming and colour-temperature controls, based on the documented board wiring.

- Type: Case study
- Targets: Firmware
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-10-27
- Added to the catalog: 2026-11-09
- Original resource: <https://github.com/fvollmer/open-desk-lamp-firmware>
- Primary source: <https://github.com/fvollmer/open-desk-lamp-firmware/blob/043aeb9f95c0454b92200cded4b7e4cc3b23011e/README.md>
- Catalog page: <https://awesomerea.org/resources/xiaomi-desk-lamp-open-firmware-case/>
- Record JSON: <https://awesomerea.org/resources/xiaomi-desk-lamp-open-firmware-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/xiaomi-desk-lamp-open-firmware-case/index.md)

## Requirements & limits

- The firmware covers the lamp's local knob controls: power, dimming and colour temperature; the author's hardware variant is the documented target.
- Installation requires opening the lamp, wiring U0RX, U0TX, GPIO0 and GND to a USB serial adapter, and overwriting stock firmware. Back up the original flash; the backup contains Wi-Fi credentials. Check flash size for other variants.
- Build with CMake 2.8+, xtensa-lx106-elf from esp-open-sdk and Espressif's ESP8266 NONOS SDK. CI compiles the firmware but runs no tests.
- The project uses MIT; Espressif's SDK libraries have their own modified MIT license. Stock firmware and the Xiaomi app retain their own terms.

## Primary sources

1. <https://github.com/fvollmer/open-desk-lamp-firmware/blob/043aeb9f95c0454b92200cded4b7e4cc3b23011e/README.md>
2. <https://github.com/fvollmer/open-desk-lamp-firmware/blob/043aeb9f95c0454b92200cded4b7e4cc3b23011e/src/CMakeLists.txt>
3. <https://github.com/fvollmer/open-desk-lamp-firmware/blob/043aeb9f95c0454b92200cded4b7e4cc3b23011e/src/main.c>
4. <https://github.com/fvollmer/open-desk-lamp-firmware/blob/043aeb9f95c0454b92200cded4b7e4cc3b23011e/src/leds.c>
5. <https://github.com/fvollmer/open-desk-lamp-firmware/blob/043aeb9f95c0454b92200cded4b7e4cc3b23011e/.travis.yml>
6. <https://github.com/fvollmer/open-desk-lamp-firmware/blob/043aeb9f95c0454b92200cded4b7e4cc3b23011e/LICENSE>
7. <https://github.com/fvollmer/open-desk-lamp-firmware/releases/tag/v0.0.1>
8. <https://github.com/pfalcon/esp-open-sdk/blob/c70543e57fb18e5be0315aa217bca27d0e26d23d/README.md>
9. <https://github.com/pfalcon/esp-open-sdk/blob/c70543e57fb18e5be0315aa217bca27d0e26d23d/Makefile>

## More in Firmware and hardware

- [EchoPod: replacement firmware for the Snowsky Echo Mini 8 GB](https://awesomerea.org/resources/echopod-echo-mini-firmware-case/index.md) · Case study
- [GLaBIOS: a scratch-built 8K ROM BIOS](https://awesomerea.org/resources/glabios-rom-bios-case/index.md) · Case study
- [TC66 custom firmware: a replacement image for the RuiDeng USB-C meter](https://awesomerea.org/resources/tc66-meter-firmware-case/index.md) · Case study
- [UV-K5: an open reimplementation of Quan Sheng firmware v2.1.27](https://awesomerea.org/resources/uv-k5-firmware-case/index.md) · Case study
- [R64Emu: low-level Nintendo 64 hardware reconstruction](https://awesomerea.org/resources/r64emu-n64-case/index.md) · Case study
- [Nuked-MD-FPGA: Sega Mega Drive chipset reconstruction](https://awesomerea.org/resources/nuked-md-fpga-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
