Skip to content

UniqueDroid/esp-watchos

Repository files navigation

ESPWatchOS logo

ESPWatchOS

A custom smartwatch OS for the Waveshare ESP32-C6-Touch-AMOLED-2.06 (ESP32-C6, 2.06" 410x502 AMOLED touch display, QSPI, dual digital mics). Built on ESP-Brookesia for the phone-style launcher/app-lifecycle framework and LVGL for the UI.

Layout

  • main/ - boot sequence, power/boot button handling, status bar clock/WiFi icon updates, AOD (always-on-display) handling.
  • components/system/ - shared OS services, each its own component: alarm_shared, display_shared, homescreen_shared, os_fs (LittleFS layout), rtc_shared, timer_shared, webserver_shared (WiFi settings UI, served from the watch itself), wifi_shared (WiFi scan/connect, reused by several apps below).
  • components/apps/ - independent apps, each a separate component launched from the home screen.
  • components/system/brookesia_core/ - vendored ESP-Brookesia framework source.
  • Schematic/ - board schematic (from Waveshare).

Both components/apps and components/system are wired in via EXTRA_COMPONENT_DIRS in the root CMakeLists.txt - any new component dropped in either directory is picked up automatically.

Apps

App What it does
Watchface Default home screen clock face
WiFi Connect Scan and join a WiFi network
WiFi Analyzer Live signal strength / channel view for nearby APs
Signal Tracker Tracks a chosen AP's signal over time
Network Scanner Finds devices on the local network via mDNS
Port Checker Checks a host for open common ports
Timer Countdown timer
Flappy A Flappy Bird clone
Settings Device settings

Adding a new app

Add a new component under components/apps/, subclass esp_brookesia::systems::phone::App (see any existing app for the run/back/pause/resume/close lifecycle), and register it with ESP_UTILS_REGISTER_PLUGIN_WITH_CONSTRUCTOR - apps self-register at startup, so nothing else needs editing to wire it into the launcher.

Security notes

  • WiFi credentials are AES-128-CTR encrypted (wifi_shared) with a key derived from the device's own MAC address before being written to LittleFS - this keeps the password out of a plaintext file a casual look at the filesystem would see, but does not withstand an attacker who also has this source code, since the key is fully derivable from a MAC address readable via the same physical/USB access that would expose the file. True protection against that threat model needs flash encryption, a one-way per-device provisioning step this project doesn't do.
  • The settings webserver (webserver_shared) requires HTTP Basic Auth (admin + an 8-character password generated on first use, shown on the watch under Settings -> Server).

Building

Requires ESP-IDF (CONFIG_IDF_TARGET=esp32c6, see sdkconfig.defaults). Standard ESP-IDF workflow:

idf.py build
idf.py -p <PORT> flash monitor

License

Apache 2.0, see LICENSE. Built on Espressif's ESP-Brookesia and LVGL, and Waveshare's board support package.

About

Custom smartwatch OS for the Waveshare ESP32-C6-Touch-AMOLED-2.06

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages