Bringing my Glance Clock back to life using an ESP32 (M5Stack) as a bridge.
This repository contains code and binaries to revive a non-functional "Glance Clock" by using an ESP32 (M5Stack) as a bridge. It smartly resurrects the clock from the outside without modifying the original internal firmware.
Here is a video demonstrating control via a web browser and iPhone Shortcuts.
- ESP32 Bridge: Acts as a relay using M5Stack Basic or AtomS3 Lite to send data to the Glance Clock via BLE.
- Web API: Can be operated through HTTP requests from browsers, home automation tools, or API clients.
- Captive Portal Support: Easily configure SSID and passwords from a smartphone or PC during initial startup or Wi-Fi configuration.
- Automated Time Synchronization: Timezone settings, including daylight saving time, are automatically configured via IP geolocation.
To get started, here are the minimum requirements and how the system architecture works:
- Glance Clock: The target device to revive.
- ESP32: M5Stack Basic or AtomS3 Lite.
- PC: Required to flash the firmware/program to the M5Stack.
[ Control Triggers ]
- Home Assistant (Automations / Sensor integration)
- Raspberry Pi (Periodic / Event transmissions via Node-RED, etc.)
- Smartphone Browser / iOS Shortcuts (Manual / Widget operations)
↓ (HTTP Requests)
[ ESP32 Bridge ]
- Wi-Fi connection & Built-in HTTP server
- Accurate time synchronization via NTP (CTS function)
- Translates received messages according to the protocol
↓ (BLE Communication)
[ Glance Clock ]
- Text scrolling display / Notifications / Animations
m5stack-glance-clock/
├── docs/
│ └── m5stack_deployment_guide.md # Detailed Arduino IDE & esptool configuration guide
├── src
│ └── GlanceBridge.ino # Source code
├── tools
│ └── GlanceCommand.html # GUI tool
└── build/ # Prebuilt binaries for Web Flusher, etc.
├── firmware.bin
├── partitions.bin
└── bootloader.bin
You can directly flash the firmware via a browser-based Web Flusher without setting up a development environment (like Arduino IDE).
- Connect the M5Stack to your PC via a USB cable.
- Open a Web Flusher tool like esptool-js in a Chromium-based browser (Chrome or Edge).
- Specify the files located in the
build/folder to their respective address offsets based on your hardware target:
| Binary File | M5Stack Core Basic (ESP32) | AtomS3 / AtomS3 Lite (ESP32-S3) |
|---|---|---|
bootloader.bin |
0x1000 |
0x0 |
partitions.bin |
0x8000 |
0x8000 |
firmware.bin |
0x10000 |
0x10000 |
⚠️ Note: Pay close attention to thebootloader.binaddress! Flashing to0x1000on an AtomS3 (ESP32-S3) will cause a boot checksum failure.
If you want to modify the code or build the binary yourself using Arduino IDE:
- Open
src/GlanceBridge.inoin Arduino IDE. - Select your target board and configure board options (
Flash Mode,Partition Scheme,USB CDC On Boot, etc.). - For exact tool menu configurations and command-line
esptoolflashing procedures for both M5Stack Core Basic and AtomS3 Lite, please consult the 👉 M5Stack Deployment & Configuration Guide.
- Restart the M5Stack after flashing the firmware.
- Upon initial startup, since there are no Wi-Fi settings configured, the M5Stack operates in Access Point (AP) mode.
- Connect to the Wi-Fi network broadcasted by the M5Stack (
M5Stack-Setup) from your smartphone or PC's Wi-Fi settings screen. - The Captive Portal configuration screen will automatically pop up (or appear when you open a browser).
- Enter your home Wi-Fi SSID and password and save them; the M5Stack will then connect to your home network.
- Once the PIN code appears on the clock display, open http://glance-clock.local/ to enter the PIN code via the Web GUI, or directly access http://glance-clock.local/pin?code=[PIN-code] to start operating as a bridge.
- Calendar Integration Feature:
Currently, the calendar integration feature (/calendar) is not correctly documented due to a lack of parsed information. Please use with caution. - Timezone & NTP:
The timezone is hardcoded to Japan Standard Time (JST+9) at9 * 3600seconds using the NICT NTP server (ntp.nict.jp). If you use the device outside of Japan or in a different timezone, please updategmtOffset_secas well as the NTP server.
Timezone settings, including daylight saving time, are automatically configured via IP geolocation.
This project would not have been possible without the invaluable prior research and open-source contributions by predecessors in the community. I am deeply grateful to:
- Hypfer for Hypfer/glance-clock (BLE protocol reverse-engineered)
- frannraf for frannraf/glance-clock-control
If they had not shared their information and code with the public, I would not have been able to achieve any of this. Thank you so much for paving the way!
This project is an unofficial, independent third-party implementation based on reverse-engineered protocols. It is not affiliated with, authorized, maintained, or sponsored by the original hardware manufacturer.
Use of this firmware, bridge software, and web tools is entirely at your own risk. The author assumes no responsibility or liability for any damage to your hardware, data loss, or any other issues arising from the use of this project.
This project is licensed under the MIT License - see the LICENSE file for details.
This software utilizes the free ip-api.com API, which is restricted to non-commercial use. For commercial applications, you must obtain a paid API key and update the API endpoint accordingly.
