This project provides an ESP32-based time server for Casio G-Shock watches. The ESP32 is a tiny, low-cost microcontroller with built-in WiFi and Bluetooth. This server enables your G-Shock to connect and set its correct time. In addition, it displays some information about your watch.
Just like your G-Shock itself, it’s designed to be set-and-forget. Just start the server once—it will run reliably for months with no user intervention.
- BLE Time server for setting your G-Shock's correct time
- Touch and display support (ST7789 LCD)
- Battery and temperature display
Works with many G-Shock, Edifice, and Pro Trek variants. Here are the models reported to be compatible with the app and their modules.
Note: By compatible watches we mean that these watches can work with the app, but this does not mean that every function of the watch is supported by the app. For example, fitness functions are not implemented in the app.
| Model | Module Number(s) |
|---|---|
| GW-B5600 | 3461 |
| GM-B5600/GMW-B5600 | 3459 |
| GMW-B5000 | 3459, 3461 |
| GW-5000 | 3159, 3495 |
| GA-B2100 | 5689 |
| GA-B010 | 5736 |
| GST-B500 | 5684 |
| GST-B200 | 5608 |
| MSG-B100 | 5659 |
| G-B001 | 3519 |
| GR-B200 | 5635 |
| GPR-B1000 | 3452 |
| GBD-800 | 3464 |
| GBD-H1000 | 3475 |
| MRG-B5000 | 3541 |
| GCW-B5000 | 3543 |
| GG-B100 | 5594, 5595 |
| GST-B100 | 5513 |
| ABL-100WE | 3565 |
| Edifice ECB-10 | 5618, 5604 |
| Edifice ECB-20 | 5638, 5603 |
| Edifice ECB-30 | 5686, 5672 |
Watches that Dont Work
Some advances watches are NOT compatible with the device. They have a different way of connecting to the server. Here are some test results.
| Subseries | Module | Comment |
|---|---|---|
| GWF-A1000 | 5623 | Server recognizes watch, but throws error message |
| GPR-H1000 | 3554 | Server recognizes watch, but throws error message "Failed to connect to Casio device" |
| GPW-2000 | 5502 | Server does not recognizes connection attempt |
| MRG-BF1000 | 5702 | Server does not recognizes connection attempt |
| GB-X6900 | 3418 | Server does not recognizes connection attempt |
We are looking for feedback about the accuracy of this table, so please comment in the Issues section with any discrepancies.
ESP32-C6-Touch-LCD-1.47micro controller with a touch-enabled display or aSuper Mini ESP32-E6micro controller.- MicroPython firmware
mpremotefor file transfer- USB C cable to connect the device to your computer
The currently supported hardware is ESP32-C6-Touch-LCD-1.47. Make sure it is exactly this display, because pins differ for similar displays, even from the same manufacturer. Also, the touch function is used to wake up the display, so make usre it is exactly the same model. You can get it at Amazon or AliExpress (sponsored).
Alternatively, you can get an even cheaper Super Mini ESP32-E6. You can get it at Amazon or AliExpress (sponsored).
This device does not have a display but uses an LED to show the current status:
-
Pulsating green every 5 seconds — normal operation, waiting for a connection.
-
Changing colors — the device is connected to a watch, and watch's time is being updated.
-
Blinking blue — the device is in configuration mode and is waiting for the Android app to connect.
-
Blinking red — some error has occurred, such as an invalid configuration file.
Pre-configured devices available. Inquire by email at [email protected]
Download the latest firmware:
- Follow the instructions here to download and install the latest MicroPython firmare on your device.
Note: On Linux, the port is typically
/dev/ttyACM0.
- install mpremote
pip install mpremote
Deploy the Server Software:
Copy project files to the ESP32:
python sync.py
The server needs an internet connection to get the correct time. You must therefore provide a way for it to connect to your WiFi network. Here is how to configure it:
A config.json_template file is provided in the repository. Copy it, rename it to config.json, and fill in your values:
{
"ssid": "YourWiFiSSID",
"password": "YourWiFiPassword",
"ssid_alternate": "",
"password_alternate": "",
"timezone": "Continent/City",
"offset": 0
}Configuration fields:
| Key | Required | Description |
|---|---|---|
ssid |
Yes | Your primary WiFi network name |
password |
Yes | Your primary WiFi password |
ssid_alternate |
No | Fallback WiFi network name. If NTP sync fails on the primary network, the server will automatically try this one |
password_alternate |
No | Password for the fallback WiFi network |
timezone |
Yes | Your timezone in Continent/City format. See valid timezones |
offset |
No | Fine adjustment in seconds applied when setting the watch time, to compensate for ESP32 processing lag (default: 0) |
dateformat |
No | Date display format: MM/DD (default) or DD/MM |
timeformat |
No | Time display format: 24H (default) or 12H |
temperature_unit |
No | C (default) or F |
foreground_color |
No | Display foreground color as a decimal RGB value |
background_color |
No | Display background color as a decimal RGB value |
Copy the file to the device:
mpremote connect /dev/ttyACM0 fs cp config.json :config.json
Reset or Power OFF/ON the device.
- Alternatively, download and install the Android APK on your phone: ⬇️ Download Latest APK. You can find sources here.
- If not configured, the ESP32 will boot into configuration mode. Once booted, start the Android app. When the red dot at the bottom-right of the app’s screen turns green, the ESP32 controller is connected. (You can also put the server in configuration mode at any time by pressing the BOOT button on the device).
- Enter your SSID and WiFi password, then press SUBMIT. This will create the configuration file on the ESP32, and the device will reboot into server mode.
Note: The app also provides locale information such as date and time format, temperature units (C or F), and color scheme for the server. It is recommended to use the app for setup.
After setup, the ESP32 will start the main server and display the status.
Three ways to connect the watch to the server:
- Automatic connection: If your watch is set to auto-update time, it will try to connect four times per day and update its time.
- Manual (time only): For a quick time update, short-press the lower-right button on your watch. The watch will connect, update its time, and the display on the server will show the name of the last connected watch and the time of the last sync.
- Manual with watch information: Long-press the lower-left button. The watch will connect and update its time. Additionally, the server will display information such as the next alarm, next reminder, battery level, and temperature of the watch.
The ESP32 display will automatically dim after 5 minutes and turn off completely after 30 minutes. Tap the screen to wake it and show the display again.
You can examine the activities on your device by using the same Android app you used for configiring the device. Go to the second screen, Logs, and you should see something like this:
Note that only the last 10 entries are kept. Also, the log will reset if the device is reset or umplugged.
To clear the sync log from your PC while the ESP32 is connected via USB:
mpremote connect /dev/ttyACM0 exec "from lib.logs.activity_log import activity_log; activity_log.clear_logs()"To also reset the list of previously connected watches:
mpremote connect /dev/ttyACM0 exec "from lib.utils.persistent_store import store; store.clear()"If there is a new version of the software in this repository, you can update it on your device as follows:
git pull
mpremote cp :config.json config.json # backup your configuration
python sync.py
Here is the structure of the server software files:
main.py– Main entry point for the ESP32 serverconfig_server.py– Configuration server used to connect to the supporting Android app and receive configuration informationgshock_server.py/gshock_server_no_display.py– Main G-Shock server logic (with/without display)lib/– Core libraries:display/– Display and LED control (ST7789, fonts, icons)config/– Configuration managementgshock_api/– Software to connect and communicate with G-Shock watchesutils/– Utility functions and persistent storage
If you see nothing on the screen, or the device keeps rebooting, run the server manually and look at the output for any problems:
mpremote run gshock_server.py
MIT License
Copyright © Ivo Zivkov
For more details, see the project modules:
gshock_server.pymain.pydisplay.pygshock_api.pyconfig_manager.py
- MicroPython Download
- MicroPython ESP32 Getting Started
- Install MicroPython on ESP32
- Flashing Firmware with esptool.py
- Erase ESP32 Flash
- Troubleshooting Erase/Flash Issues
Additional resources:
(https://visualgdb.com/documentation/espidf/)
(https://randomnerdtutorials.com/esp32-web-server-beginners-guide/)
(https://www.scribd.com/document/830747162/the-complete-esp32-projects-guide-ebook-1)
(https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf)
(https://docs.nordicsemi.com/bundle/ncs-2.0.2/page/zephyr/boards/xtensa/esp32/doc/index.html)
(https://docs.espressif.com/projects/esp-hardware-design-guidelines/en/latest/esp32/esp-hardware-design-guidelines-en-master-esp32.pdf)
(https://github.com/izivkov/CasioGShockSmartSync)
(https://www.waveshare.com/wiki/ESP32-S3-Relay-6CH)
(https://docs.keyestudio.com/projects/KS5020/en/latest/docs/1.%20Arduino_C_Tutorial.html)
(https://randomnerdtutorials.com/getting-started-with-esp32/)




