Logo Dark Logo XiaoZhi AI Dev – ESP32 Voice Robot Get Started Hardware & Firmware Server & AI Development Troubleshooting Ecosystem Blog About
CTRL K
    CTRL K
      • XiaoZhi AI Chatbot Documentation Center | XiaoZhi.Dev
        • AI Capabilities: What the Device Does and What the Server Does
        • Usage Guide
          • XiaoZhi AI Firmware Download
          • XiaoZhi AI Hardware Assembly Guide
          • Supported Boards
          • First Boot: Wi-Fi Setup, Activation and Binding
          • Network Configuration Guide
          • Self-Hosted Server: Connect XiaoZhi Devices to Your Own Server
          • Feature Usage Tutorial
          • XiaoZhi AI Budget Version - ESP32 Development Board Implementation
          • XiaoZhi AI Frequently Asked Questions
        • Development Guide
          • ESP-IDF Development Environment Setup and XiaoZhi Compilation
          • WebSocket Communication Protocol
          • MQTT + UDP Hybrid Communication Protocol Documentation
          • Emoji Emotion Display
          • Overview
            • MCP (Model Context Protocol) Protocol Documentation
            • MCP Protocol IoT Control Usage Guide
          • Dynamic Text Glyph Push Extension
          • Asynchronous Voice Notifications
          • Custom Board Guide
          • Custom Assets Guide: Wake Word, Fonts, Emoji and Chat Background
          • BluFi Provisioning Guide
          • Code Style Guide
          • Ecosystem Projects: Servers, Clients and Ports
        • ESP32 Development Guide
          • Chip Support and Storage Specs
          • Firmware Code Tour: Directory Layout, State Machine and Development Rules
          • Advanced Extension Points: Network Types, Wake Words, MCP and Asset Customization
          • ESP32 Development Troubleshooting
      • Get Started
      • Boards & Firmware Directory
      • Firmware Download
      • Hardware & Firmware
      • Server & AI
        • MCP Integrations: Server-Side and Smart Home
      • Development
        • Development environment
        • Source and architecture
        • Protocols
        • Feature implementation
        • Customization
        • Web Client Protocol Debugging
      • Troubleshooting
        • Device Connection Failures: Diagnose from Scratch
      • Ecosystem
      • About This Site
      • Blog
        • XiaoZhi ESP32 Firmware v2.5 Explained: ESP-IDF 6, Full-Matrix Releases and Hardening
        • Migrating a Custom Board to ESP-IDF 6: Lessons from the Upstream Migration Commit
        • Which Board Should Run XiaoZhi? A Three-Step Guide by Chip, Network and Ready-Made Board
        • What the XiaoZhi AI Voice Robot Can and Cannot Do: xiaozhi-esp32 on One Page
        • XiaoZhi AI and DeepSeek: How the Device and the Large Model Split the Work
        • Build a XiaoZhi AI Voice Assistant on a Breadboard: From Parts to the First Conversation
      • AI Capabilities: What the Device Does and What the Server Does
      • Usage Guide
        • XiaoZhi AI Firmware Download
        • XiaoZhi AI Hardware Assembly Guide
        • Supported Boards
        • First Boot: Wi-Fi Setup, Activation and Binding
        • Network Configuration Guide
        • Self-Hosted Server: Connect XiaoZhi Devices to Your Own Server
        • Feature Usage Tutorial
        • XiaoZhi AI Budget Version - ESP32 Development Board Implementation
        • XiaoZhi AI Frequently Asked Questions
      • Development Guide
        • ESP-IDF Development Environment Setup and XiaoZhi Compilation
        • WebSocket Communication Protocol
        • MQTT + UDP Hybrid Communication Protocol Documentation
        • Emoji Emotion Display
        • Overview
          • MCP (Model Context Protocol) Protocol Documentation
          • MCP Protocol IoT Control Usage Guide
        • Dynamic Text Glyph Push Extension
        • Asynchronous Voice Notifications
        • Custom Board Guide
        • Custom Assets Guide: Wake Word, Fonts, Emoji and Chat Background
        • BluFi Provisioning Guide
        • Code Style Guide
        • Ecosystem Projects: Servers, Clients and Ports
      • ESP32 Development Guide
        • Chip Support and Storage Specs
        • Firmware Code Tour: Directory Layout, State Machine and Development Rules
        • Advanced Extension Points: Network Types, Wake Words, MCP and Asset Customization
        • ESP32 Development Troubleshooting
      • 中文
      • English
      • 日本語
      • Русский
      • 繁體中文
      • Light

      • Dark

      • System

      On this page

      • Development environment
      • Source and architecture
      • Protocols
      • Feature implementation
      • Customization

      Development

      Everything needed to modify, extend or contribute to the XiaoZhi firmware: from ESP-IDF setup and source structure to the WebSocket / MQTT+UDP / MCP protocols and feature modules.

      Development environment

      ESP-IDF Setup
      Toolchain installation, dependencies and first build
      Code Style Guide
      clang-format, the C++23 baseline and error handling rules

      Source and architecture

      Firmware Code Tour
      Directory layout, application state machine and rules
      Advanced Extension Points
      Networking, wake words, MCP and resource customization

      Protocols

      WebSocket Protocol
      Connection setup, hello handshake and message types
      Web Client Protocol Debugging
      open-xiaozhi-client: connect, frame log, manual JSON and MCP tool calls
      MQTT + UDP Hybrid
      Splitting control and audio channels
      MCP
      Device tool calls: protocol spec and usage guide

      Feature implementation

      BluFi Provisioning
      Configure Wi-Fi over BLE
      Emoji Emotions
      The emotion message and emoji switching protocol
      Glyph Push
      Server pushes glyphs missing from the device font
      Async Voice Notifications
      notify messages and Ogg Opus streaming playback

      Customization

      Custom Board Guide
      Add a board directory and build packages
      Custom Assets
      Wake word, fonts, emoji and chat background packaging
      Powered by XiaoZhi.Dev
      © 2025 xiaozhi.dev.[email protected]