Xiao Zhi AI Communication Protocol Fix: Registering Devices via OTA Interface

Xiao Zhi AI Communication Protocol Fix: Registering Devices via OTA Interface

Last week, I organized the WebSocket communication protocol of Xiao Zhi AI, titled “Reproducing Xiao Zhi AI Step 2: Learning Its WebSocket Protocol with Two Core Flowcharts“, and later during debugging, I discovered a missing point, which was the omission of the device registration step. Initially, I found the <span>"OTA_VERSION_URL": "https://api.tenclass.net/xiaozhi/ota/"</span> field in the configuration … Read more

Daphne: A Magical Python Library for HTTP Servers!

Daphne: A Magical Python Library for HTTP Servers!

▼ Click the card below to follow me ▲ Click the card above to follow me Once, asynchronous web servers in Python were a headache. Various complex configurations and obscure concepts made many developers hesitant. But now, Daphne has emerged, turning this “problem” into a “simple task”! What is Daphne? Daphne is not an ordinary … Read more

Recreating Xiao Zhi AI Step 2: Learning Its WebSocket Protocol Through Two Core Flowcharts

Recreating Xiao Zhi AI Step 2: Learning Its WebSocket Protocol Through Two Core Flowcharts

Introduction Continuing the attempt to recreate Xiao Zhi AI, but based on the Arduino framework. Last week, I completed the development environment setup for ESP32-S3 + ESP-SR + ESP-TTS using VSCode + PlatformIO + Arduino (see the article “Recreating Xiao Zhi AI, ESP32-S3 Building Arduino + ESP-SR + ESP-TTS Development Environment Pitfall Record”), and the … Read more

Can HTTP/2 + SSE Completely Replace WebSocket?

Can HTTP/2 + SSE Completely Replace WebSocket?

Hello everyone, it’s great to see you again. I am Advancing Frontend Technology, and I will guide everyone to focus on cutting-edge frontend topics and delve into the underlying technologies, so we can all improve together. Please feel free to follow, like, bookmark, and share! 1. What is SSE (Server-Sent Events) Server-Sent Events (SSE) is … Read more

Have You Been Asked About the TCP/IP Protocol in an Interview?

Have You Been Asked About the TCP/IP Protocol in an Interview?

From: Xia Yu Link: blog.csdn.net/yulyu/article/details/69062288 Image from the internet 0 Introduction Mastering TCP/IP and proficiently using Sockets for network programming. Seeing this sentence, does it feel familiar? Many people have encountered this requirement when submitting their resumes, and many might think that such knowledge is generally unnecessary in actual development, thus dismissing it. However, the … Read more

MQTT and WebSocket: The Collision and Fusion of Two Communication Methods

MQTT and WebSocket: The Collision and Fusion of Two Communication Methods

Note: Please be aware that there is a resource download method at the end of the article. Please download and save it as soon as possible to avoid deletion! MQTT and WebSocket: The Collision and Fusion of Two Communication Methods In the world of the Internet of Things (IoT), data transmission is core. When it … Read more

Understanding the Relationship Between TCP, Sockets, and HTTP

Understanding the Relationship Between TCP, Sockets, and HTTP

Recently, I needed to implement an HTTP interface for a project. So, I took this opportunity to explain the relationship between HTTP and sockets, as well as their connection to TCP. First, it’s essential to understand that in the network layer architecture, the HTTP protocol belongs to the application layer, while the TCP protocol belongs … Read more

Aiohttp: The Perfect Choice for Asynchronous HTTP Clients and Servers in Python

Aiohttp: The Perfect Choice for Asynchronous HTTP Clients and Servers in Python

In the world of Python, asynchronous programming is an efficient way to handle high-concurrency tasks. This article will quickly guide you to understand and master the aiohttp library, a powerful asynchronous HTTP client and server framework. Whether you are a beginner or an experienced developer, you will be able to easily get started with aiohttp … Read more

An Elegant and Lightweight HTTP Client Supporting WebSocket and Stomp

An Elegant and Lightweight HTTP Client Supporting WebSocket and Stomp

A lightweight yet powerful HTTP client The description “A lightweight yet powerful HTTP client” can apply to various libraries in different programming languages. Here are some popular HTTP clients that fit this description: Python – `requests`: This is a very popular Python HTTP library that is user-friendly and powerful. – `httpx`: Similar to `requests`, but … Read more

What Is a Network Protocol? Understanding Network Processes

What Is a Network Protocol? Understanding Network Processes

1. HTTP (Hypertext Transfer Protocol) Hypertext Transfer Protocol (HTTP) is a simple request-response protocol that typically runs on top of TCP. It specifies what kind of messages a client can send to a server and what kind of responses it can expect. The headers of request and response messages are given in ASCII; while the … Read more