Update project version to 2.3.0 and modify dependencies in idf_component.yml; enhance DHCP hostname configuration in WifiBoard class

This commit is contained in:
Terrence
2026-07-15 15:13:21 +08:00
parent 03fe29a313
commit 1b48ebd786
3 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -9,5 +9,5 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake)
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
idf_build_set_property(MINIMAL_BUILD ON)
set(PROJECT_VER "2.2.6")
set(PROJECT_VER "2.3.0")
project(xiaozhi)
+9
View File
@@ -10,6 +10,7 @@
#include <freertos/task.h>
#include <esp_network.h>
#include <esp_log.h>
#include <esp_mac.h>
#include <utility>
#include <font_awesome.h>
@@ -56,6 +57,14 @@ void WifiBoard::StartNetwork() {
WifiManagerConfig config;
config.ssid_prefix = "Xiaozhi";
config.language = Lang::CODE;
// Set a DHCP hostname so the router shows a friendly name instead of "espressif".
// Uses the same "<prefix>-<last 2 MAC bytes>" scheme as the config AP SSID.
uint8_t mac[6];
if (esp_read_mac(mac, ESP_MAC_WIFI_STA) == ESP_OK) {
char hostname[32];
snprintf(hostname, sizeof(hostname), "%s-%02X%02X", config.ssid_prefix.c_str(), mac[4], mac[5]);
config.station_hostname = hostname;
}
wifi_manager.Initialize(config);
// Set unified event callback - forward to NetworkEvent with SSID data
+1 -1
View File
@@ -20,7 +20,7 @@ dependencies:
waveshare/custom_io_expander_ch32v003: ^1.0.0
espressif/esp_lcd_panel_io_additions: ^1.0.1
78/esp_lcd_nv3023: ~1.0.0
78/esp-wifi-connect: ~3.2.1
78/esp-wifi-connect: ~3.2.2
espressif/esp_audio_effects: ~1.3.0
espressif/esp_audio_codec: ~2.5.0
78/esp-ml307: ~3.6.5