fix: 滑动切换图片时自动跳过解码失败的无效图片

1、update_ui_ImgBle 返回类型 void → bool,解码成功返回 true,失败返回 false;
2、左滑/右滑手势回调添加 for 循环,解码失败自动跳到下一张(最多尝试 10 张防死循环);
3、更新最新设备运行日志;

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Rdzleo 2026-03-24 18:22:53 +08:00
parent 4e2f6906f9
commit 32c3dc69bc
5 changed files with 120 additions and 609 deletions

View File

@ -1,592 +1,93 @@
I (47) WeatherApi: 初始化天气API配置 - 默认城市: 北京
I (48) WeatherApi: WiFi位置缓存限制已设置为: 5 条
I (48) coexist: coex firmware version: 7b9a184
I (49) coexist: coexist rom version e7ae62f
I (49) main_task: Started on CPU0
I (59) main_task: Calling app_main()
I (79) BackgroundTask: background_task started
I (79) BluetoothProvisioning: 蓝牙配网对象创建完成
I (79) WifiBoard: force_ap is set to 1, will clear in StartNetwork()
I (79) button: IoT Button Version: 3.5.0
I (79) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (79) button: IoT Button Version: 3.5.0
I (79) gpio: GPIO[4]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (79) Airhub1: Initializing I2C master bus for audio codec...
I (79) Airhub1: Scanning I2C bus for devices...
I (79) Airhub1: I2C设备在线: 0x18
E (79) i2c.master: I2C transaction unexpected nack detected
E (79) i2c.master: s_i2c_synchronous_transaction(945): I2C transaction failed
E (79) i2c.master: i2c_master_receive(1261): I2C transaction failed
E (79) i2c.master: I2C transaction unexpected nack detected
E (79) i2c.master: s_i2c_synchronous_transaction(945): I2C transaction failed
E (79) i2c.master: i2c_master_receive(1261): I2C transaction failed
I (79) Airhub1: I2C设备在线: 0x40
I (79) Airhub1: I2C scan completed. Found 2 devices
I (79) DZBJ: 开始初始化显示硬件...
I (79) gpio: GPIO[7]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (79) st77916: LCD panel create success, version: 1.0.1
W (219) st77916: The 3Ah command has been used and will be overwritten by external initialization sequence
I (339) LCD: LCD GRAM cleared (black filled)
I (339) DZBJ: LCD 硬件初始化完成
I (339) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2
I (339) gpio: GPIO[6]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (739) CST816S: IC id: 182
I (739) LCD: Touch controller initialized successfully
I (739) LVGL: Starting LVGL task
I (739) LCD: LVGL buffer: 14400 bytes (W:360, Lines:20, DMA, single)
I (739) LCD: Touch controller added to LVGL
I (739) DZBJ: LVGL 初始化完成
I (849) Airhub1: 🤖 AI对话模式启动
I (849) Airhub1: 初始化按钮...
I (849) Airhub1: Boot button initialized on GPIO0
I (849) Airhub1: Volume up button initialized on GPIO-1
I (849) Airhub1: Volume down button initialized on GPIO-1
I (849) Airhub1: 故事按键已初始化GPIO引脚 =4
I (849) Airhub1: 所有按键已成功初始化!
I (849) Airhub1: IMU传感器未初始化跳过IoT注册
I (849) Airhub1: 配网模式跳过电池检测、IMU传感器、低功耗管理
I (849) Airhub1: 电容触摸板按钮已禁用 (ENABLE_TOUCH_PAD_BUTTONS=0)
I (849) Application: 打印设置设备状态日志: starting
I (849) Application: 正常启动流程,将执行开机播报和网络连接播报
I (849) Airhub1: Initializing audio codec (output only)...
I (849) Airhub1: Creating BoxAudioCodec (ES8311, without reference) ...
I (849) BoxAudioCodec: TX-only channel created (provisioning mode)
I (849) ES8311: Work in Slave mode
I (859) gpio: GPIO[48]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (859) BoxAudioCodec: BoxAudioDevice initialized (output only)
I (859) Airhub1: Audio codec initialized successfully
I (859) Application: 配网模式:跳过 Opus 编码器、输入重采样器、麦克风输入
I (859) I2S_IF: channel mode 0 bits:16/16 channel:2 mask:1
I (859) I2S_IF: STD Mode 1 bits:16/16 channel:2 sample_rate:16000 mask:1
I (869) Adev_Codec: Open codec device OK
I (879) AudioCodec: Set output enable to true
I (879) AudioCodec: Audio codec started (output only, provisioning mode)
I (879) AudioCodec: 将运行时输出音量设置为75
I (879) Application: 设备启动完成,播放开机播报语音
I (889) WifiBoard: force_ap cleared to 0
I (889) WifiBoard: 🔵 进入配网模式 - BLE蓝牙配网
I (889) WifiBoard: 🔵 进入配网模式 - 使用BLE蓝牙配网
I (889) WifiBoard: 🔵 正在启动BLE蓝牙配网服务...
I (889) Application: 🎵 测试模式:音频开始播放,等待播放完成
I (889) Application: ✅ 测试模式:音频播放完成
I (889) BluetoothProvisioning: 🔄 配网状态变化: IDLE -> INITIALIZING
I (889) BluetoothProvisioning: 初始化WiFi...
I (889) pp: pp rom version: e7ae62f
I (889) net80211: net80211 rom version: e7ae62f
I (899) wifi:wifi driver task: 3fcd91c4, prio:23, stack:6656, core=0
I (899) wifi:wifi firmware version: bea31f3
I (899) wifi:wifi certification version: v7.0
I (899) wifi:config NVS flash: enabled
I (899) wifi:config nano formatting: disabled
I (899) wifi:Init data frame dynamic rx buffer num: 32
I (899) wifi:Init dynamic rx mgmt buffer num: 5
I (899) wifi:Init management short buffer num: 32
I (899) wifi:Init static tx buffer num: 8
I (899) wifi:Init tx cache buffer num: 32
I (899) wifi:Init static tx FG buffer num: 2
I (899) wifi:Init static rx buffer size: 1600
I (899) wifi:Init static rx buffer num: 10
I (899) wifi:Init dynamic rx buffer num: 32
I (909) wifi_init: rx ba win: 16
I (909) wifi_init: accept mbox: 6
I (909) wifi_init: tcpip mbox: 32
I (909) wifi_init: udp mbox: 6
I (909) wifi_init: tcp mbox: 6
I (909) wifi_init: tcp tx win: 5760
I (909) wifi_init: tcp rx win: 5760
I (909) wifi_init: tcp mss: 1440
I (909) wifi_init: WiFi/LWIP prefer SPIRAM
I (909) phy_init: phy_version 701,f4f1da3a,Mar 3 2025,15:50:10
I (949) wifi:mode : sta (d0:cf:13:03:bb:f0)
I (949) wifi:enable tsf
I (949) BluetoothProvisioning: WiFi初始化完成
I (949) BluetoothProvisioning: 初始化蓝牙控制器...
I (949) BLE_INIT: BT controller compile version [6cfabcd]
I (949) BLE_INIT: Feature Config, ADV:1, BLE_50:1, DTM:1, SCAN:1, CCA:0, SMP:1, CONNECT:1
I (949) BLE_INIT: Bluetooth MAC: d0:cf:13:03:bb:f2
I (949) BluetoothProvisioning: 初始化Bluedroid协议栈...
I (969) BluetoothProvisioning: 注册 BLE GAP/GATTS 回调...
I (969) BluetoothProvisioning: ✅ GATTS App 注册成功, gatts_if=3
I (969) BluetoothProvisioning: Service 创建成功, handle=40
I (969) BluetoothProvisioning: WRITE 特征添加成功, handle=42
I (969) BluetoothProvisioning: NOTIFY 特征添加成功, handle=44
I (969) BluetoothProvisioning: CCCD 添加成功, handle=45
I (969) BluetoothProvisioning: ✅ GATT Service 启动成功
I (969) BluetoothProvisioning: 注册WiFi事件处理器...
I (969) BluetoothProvisioning: 🔄 配网状态变化: INITIALIZING -> IDLE
I (969) BluetoothProvisioning: 蓝牙配网初始化完成 (GATT Server 模式)
I (969) BluetoothProvisioning: 蓝牙MAC地址: d0:cf:13:03:bb:f2
I (969) WifiBoard: 🔍 BLE Initialize返回结果: true
I (969) BluetoothProvisioning: 🔵 开始启动蓝牙配网服务 (GATT Server)...
I (969) BluetoothProvisioning: 🔍 检查初始化状态: initialized_ = true
I (969) BluetoothProvisioning: MAC地址发送状态已重置
I (969) BluetoothProvisioning: 🔄 MAC地址发送状态已重置
I (969) BluetoothProvisioning: 🧹 清除之前的WiFi凭据...
I (969) BluetoothProvisioning: ✅ WiFi凭据清除完成准备接收新的配网信息
I (969) BluetoothProvisioning: 📡 蓝牙设备名称: Airhub_d0:cf:13:03:bb:f2
I (969) BluetoothProvisioning: 📡 广播数据构建完成,长度: 29 字节
I (969) BluetoothProvisioning: 📡 扫描响应数据构建完成,长度: 7 字节
I (969) BluetoothProvisioning: 📡 广播数据设置完成,配置扫描响应数据
I (969) BluetoothProvisioning: 📡 扫描响应数据设置完成,启动广播
I (969) BluetoothProvisioning: ✅ 广播启动成功
I (969) BluetoothProvisioning: 🔄 配网状态变化: IDLE -> ADVERTISING
I (969) BluetoothProvisioning: 蓝牙配网广播已启动,等待客户端连接...
I (969) WifiBoard: ✅ BLE蓝牙配网启动成功
I (979) WifiBoard: 📱 请使用支持BLE的手机APP连接设备进行配网
W (979) Application: Alert BLE配网模式: 请使用手机APP搜索Airhub_开头的蓝牙设备 [happy]
I (989) AI_CHAT_UI: GIF表情切换: happy
I (989) WifiBoard: Starting BLE provisioning monitor...
I (989) WifiBoard: 🔍 BLE配网启动结果: 成功
I (989) WifiBoard: ✅ BLE配网启动成功等待手机连接
I (989) Application: 配网模式:跳过协议初始化、位置检测等网络业务
I (989) Application: 打印设置设备状态日志: idle
I (999) Application: 开始播放下行音频: 样本=960 采样率=16000
I (1009) AI_CHAT_UI: GIF表情切换: neutral
I (1009) main_task: Returned from app_main()
I (5339) BluetoothProvisioning: 📱 客户端已连接, conn_id=0, addr=73:8f:af:0d:36:7a
I (5339) BluetoothProvisioning: 🔍 [DEBUG] 设置client_connected_为true
I (5339) BluetoothProvisioning: MAC地址发送状态已重置
I (5339) BluetoothProvisioning: 🔄 MAC地址发送状态已重置
I (5339) BluetoothProvisioning: 🔄 配网状态变化: ADVERTISING -> CONNECTED
I (5339) WifiBoard: BLE client connected
I (5339) BluetoothProvisioning: 🔍 [DEBUG] BLE连接处理完成client_connected_=true
I (5339) BluetoothProvisioning: 广播已停止
I (5749) BluetoothProvisioning: 连接参数更新: status=0, conn_int=24, latency=0, timeout=400
I (6079) BluetoothProvisioning: 连接参数更新: status=0, conn_int=6, latency=0, timeout=500
I (6149) BluetoothProvisioning: MTU 更新: 512
I (6229) BluetoothProvisioning: 连接参数更新: status=0, conn_int=24, latency=0, timeout=400
I (6649) BluetoothProvisioning: NOTIFY 已启用
I (6829) BluetoothProvisioning: 📱 手机请求获取WiFi列表开始扫描
W (6829) wifi:Error! Should use default active scan time parameter for WiFi scan when Bluetooth is enabled!!!!!!
I (6829) BluetoothProvisioning: 🔍 WiFi扫描已启动
I (13489) AudioCodec: Set output enable to false
I (15599) BluetoothProvisioning: 📡 WiFi扫描完成准备发送WiFi列表
I (15599) BluetoothProvisioning: 📊 扫描到 41 个WiFi热点
I (15599) BluetoothProvisioning: ✅ 成功获取WiFi扫描结果
I (15609) BluetoothProvisioning: 📊 过滤后剩余 26 个2.4GHz热点 (原始: 41)
I (15609) BluetoothProvisioning: 向客户端发送WiFi列表共26个AP
I (16129) BluetoothProvisioning: 📤 WiFi列表已发送给客户端包含 26 个热点
I (16129) BluetoothProvisioning: 📤 WiFi列表已发送包含 26 个热点
I (25099) BluetoothProvisioning: 📶 收到WiFi SSID: airhub
I (25249) BluetoothProvisioning: 🔐 收到WiFi密码 (长度: 9)
W (25249) wifi:Password length matches WPA2 standards, authmode threshold changes from OPEN to WPA2
I (25299) BluetoothProvisioning: 📡 已发起WiFi连接请求启动超时监控
I (25299) WifiBoard: WiFi credentials received via BLE
I (25399) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1, snd_ch_cfg:0x0
I (25399) wifi:state: init -> auth (0xb0)
I (25429) wifi:state: auth -> assoc (0x0)
I (25439) wifi:state: assoc -> run (0x10)
I (25499) wifi:connected with airhub, aid = 4, channel 1, BW20, bssid = 70:2a:d7:85:bc:eb
I (25499) wifi:security: WPA2-PSK, phy: bgn, rssi: -32
I (25509) wifi:pm start, type: 1
I (25509) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
I (25509) wifi:set rx beacon pti, rx_bcn_pti: 14, bcn_timeout: 25000, mt_pti: 14, mt_time: 10000
I (25509) BluetoothProvisioning: ✅ WiFi连接成功SSID: airhub等待获取IP地址
I (25529) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (25529) wifi:<ba-add>idx:0 (ifx:0, 70:2a:d7:85:bc:eb), tid:0, ssn:0, winSize:64
I (27229) esp_netif_handlers: sta ip: 192.168.124.22, mask: 255.255.255.0, gw: 192.168.124.1
I (27229) BluetoothProvisioning: ✅ WiFi获取IP地址成功: 192.168.124.22
I (27229) BluetoothProvisioning: 💾 启用WiFi配置自动保存到NVS存储...
I (27229) BluetoothProvisioning: ✅ WiFi配置将自动保存到NVS存储
I (27229) BluetoothProvisioning: 📋 获取当前WiFi配置成功SSID: airhub
I (27229) SsidManager: compare [airhub:6] [airhub:6]
W (27229) SsidManager: SSID airhub already exists, overwrite it
I (27229) BluetoothProvisioning: ✅ WiFi凭据已保存到NVS列表
I (27229) BluetoothProvisioning: BluetoothProvisioning WIFI_CONNECTED skip_session=0
I (27229) BluetoothProvisioning: 🔍 准备设置状态为SUCCESS并触发回调
I (27229) BluetoothProvisioning: 🔄 配网状态变化: CONNECTED -> SUCCESS
I (27229) WifiBoard: 设备配网成功,已连接到WiFi网络!
I (27229) BluetoothProvisioning: 🔍 [DEBUG] ReportWiFiStatus调用: success=true, client_connected_=true
I (27229) BluetoothProvisioning: 向客户端报告设备连接WiFi成功!
I (27229) BluetoothProvisioning: 📋 配网流程完成,状态: SUCCESS, client_connected_: true
I (27229) BluetoothProvisioning: ⏰ 延迟2000ms后重启设备以确保配置生效...
I (27989) WifiBoard: BLE provisioning completed successfully
I (27989) BluetoothProvisioning: 停止蓝牙配网...
I (27989) BluetoothProvisioning: 广播已停止
W (27989) BT_HCI: hci cmd send: disconnect: hdl 0x1, rsn:0x13
I (27989) BluetoothProvisioning: 📱 客户端已断开连接, reason=0x16, 当前状态: SUCCESS
I (27989) BluetoothProvisioning: 🔍 [DEBUG] 设置client_connected_为false
I (27989) BluetoothProvisioning: 🔄 配网状态变化: SUCCESS -> ADVERTISING
I (27989) WifiBoard: BLE client disconnected
I (27989) BluetoothProvisioning: 📡 广播数据设置完成,配置扫描响应数据
I (27989) BluetoothProvisioning: 📡 扫描响应数据设置完成,启动广播
I (27989) BluetoothProvisioning: 🔄 配网状态变化: ADVERTISING -> IDLE
I (27989) BluetoothProvisioning: 蓝牙配网已停止
E (27989) esp_netif_lwip: esp_netif_new_api: Failed to configure netif with config=0x3fcb5960 (config or if_key is NULL or duplicate key)
assert failed: esp_netif_create_default_wifi_sta wifi_default.c:422 (netif)
Backtrace: 0x40379d89:0x3fcb5800 0x40386cfd:0x3fcb5820 0x4038e465:0x3fcb5840 0x4215e6d7:0x3fcb5960 0x421083c9:0x3fcb5990 0x420262d2:0x3fcb5a70 0x420263c1:0x3fcb5aa0
--- 0x40379d89: panic_abort at /Users/rdzleo/esp/esp-idf/v5.4.2/esp-idf/components/esp_system/panic.c:469
--- 0x40386cfd: esp_system_abort at /Users/rdzleo/esp/esp-idf/v5.4.2/esp-idf/components/esp_system/port/esp_system_chip.c:87
--- 0x4038e465: __assert_func at /Users/rdzleo/esp/esp-idf/v5.4.2/esp-idf/components/newlib/assert.c:80
--- 0x4215e6d7: esp_netif_create_default_wifi_sta at /Users/rdzleo/esp/esp-idf/v5.4.2/esp-idf/components/esp_wifi/src/wifi_default.c:422
--- 0x421083c9: WifiStation::Start() at /Users/rdzleo/Desktop/Baji_Rtc_Toy/managed_components/78__esp-wifi-connect/wifi_station.cc:101
--- 0x420262d2: WifiBoard::MonitorBleProvisioning() at /Users/rdzleo/Desktop/Baji_Rtc_Toy/main/boards/common/wifi_board.cc:504
--- 0x420263c1: WifiBoard::StartBleProvisioning()::{lambda(void*)#1}::_FUN(void*) at /Users/rdzleo/Desktop/Baji_Rtc_Toy/main/boards/common/wifi_board.cc:426
--- (inlined by) _FUN at /Users/rdzleo/Desktop/Baji_Rtc_Toy/main/boards/common/wifi_board.cc:428
ELF file SHA256: bbf9adf60
Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x2b (SPI_FAST_FLASH_BOOT)
Saved PC:0x42065eba
--- 0x42065eba: rw_schedule at ??:?
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2820,len:0x56c
load:0x403c8700,len:0x4
load:0x403c8704,len:0xb88
load:0x403cb700,len:0x2df4
entry 0x403c88f4
I (47) WeatherApi: 初始化天气API配置 - 默认城市: 北京
I (48) WeatherApi: WiFi位置缓存限制已设置为: 5 条
I (48) coexist: coex firmware version: 7b9a184
I (49) coexist: coexist rom version e7ae62f
I (49) main_task: Started on CPU0
I (59) main_task: Calling app_main()
I (79) BackgroundTask: background_task started
I (79) BluetoothProvisioning: 蓝牙配网对象创建完成
I (79) button: IoT Button Version: 3.5.0
I (79) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (79) button: IoT Button Version: 3.5.0
I (79) gpio: GPIO[4]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (79) Airhub1: Initializing I2C master bus for audio codec...
I (79) Airhub1: Scanning I2C bus for devices...
I (79) Airhub1: I2C设备在线: 0x18
E (79) i2c.master: I2C transaction unexpected nack detected
E (79) i2c.master: s_i2c_synchronous_transaction(945): I2C transaction failed
E (79) i2c.master: i2c_master_receive(1261): I2C transaction failed
E (79) i2c.master: I2C transaction unexpected nack detected
E (79) i2c.master: s_i2c_synchronous_transaction(945): I2C transaction failed
E (79) i2c.master: i2c_master_receive(1261): I2C transaction failed
I (79) Airhub1: I2C设备在线: 0x40
I (79) Airhub1: I2C scan completed. Found 2 devices
I (79) DZBJ: 开始初始化显示硬件...
I (79) gpio: GPIO[7]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (79) st77916: LCD panel create success, version: 1.0.1
W (209) st77916: The 3Ah command has been used and will be overwritten by external initialization sequence
I (329) LCD: LCD GRAM cleared (black filled)
I (329) DZBJ: LCD 硬件初始化完成
I (329) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2
I (329) gpio: GPIO[6]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (729) CST816S: IC id: 182
I (729) LCD: Touch controller initialized successfully
I (729) LVGL: Starting LVGL task
I (729) LCD: LVGL buffer: 14400 bytes (W:360, Lines:20, DMA, single)
I (729) LCD: Touch controller added to LVGL
I (729) DZBJ: LVGL 初始化完成
I (839) Airhub1: 🤖 AI对话模式启动
I (839) Airhub1: 初始化按钮...
I (839) Airhub1: Boot button initialized on GPIO0
I (839) Airhub1: Volume up button initialized on GPIO-1
I (839) Airhub1: Volume down button initialized on GPIO-1
I (839) Airhub1: 故事按键已初始化GPIO引脚 =4
I (839) Airhub1: 所有按键已成功初始化!
I (839) Airhub1: IMU传感器未初始化跳过IoT注册
I (839) Airhub1: Initializing battery monitor...
I (839) Airhub1: ADC calibration initialized
I (839) Airhub1: 电池状态监控已初始化GPIO:3
I (839) Airhub1: 非生产测试模式且不在对话状态,姿态传感器业务已禁用以节约资源
I (839) PowerSaveTimer: Power save timer enabled
I (839) Airhub1: 🔋 PowerSaveTimer已启用20秒无活动将进入低功耗模式
I (839) Airhub1: 电容触摸板按钮已禁用 (ENABLE_TOUCH_PAD_BUTTONS=0)
I (839) Application: 打印设置设备状态日志: starting
I (839) Application: 正常启动流程,将执行开机播报和网络连接播报
I (839) Airhub1: Initializing audio codec (duplex)...
I (839) Airhub1: Creating BoxAudioCodec (ES8311+ES7210, without reference) ...
I (839) BoxAudioCodec: Duplex channels created
I (849) ES8311: Work in Slave mode
I (849) gpio: GPIO[48]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (849) ES7210: Work in Slave mode
I (859) ES7210: Enable ES7210_INPUT_MIC1
I (859) ES7210: Enable ES7210_INPUT_MIC2
I (869) BoxAudioCodec: BoxAudioDevice initialized (duplex)
I (869) Airhub1: Audio codec initialized successfully
I (869) Application: 检测到WiFi板卡将opus编码器复杂度设置为3
I (869) OpusResampler: Resampler configured with input sample rate 16000, output sample rate 8000, and channels 1
I (869) I2S_IF: channel mode 2 bits:16/16 channel:2 mask:1
I (869) I2S_IF: TDM Mode 0 bits:16/16 channel:2 sample_rate:16000 mask:1
I (869) I2S_IF: channel mode 0 bits:16/16 channel:2 mask:1
I (869) I2S_IF: STD Mode 1 bits:16/16 channel:2 sample_rate:16000 mask:1
I (869) ES7210: Bits 16
I (879) ES7210: Enable ES7210_INPUT_MIC1
I (879) ES7210: Enable ES7210_INPUT_MIC2
I (889) ES7210: Unmuted
I (889) Adev_Codec: Open codec device OK
I (889) BoxAudioCodec: Input opened: sr=16000 ch=1 mask=0x1 ref=0
I (889) AudioCodec: Set input enable to true
I (889) I2S_IF: channel mode 0 bits:16/16 channel:2 mask:1
I (889) I2S_IF: STD Mode 1 bits:16/16 channel:2 sample_rate:16000 mask:1
I (909) Adev_Codec: Open codec device OK
I (909) AudioCodec: Set output enable to true
I (909) AudioCodec: Audio codec started
I (1009) Airhub1: ADC: 2379, 原始电压: 2.38V, 计算电池电压: 10.32V, 电量: 100%, 满电电压: 4.20V
I (1009) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (1109) Airhub1: ADC: 2377, 原始电压: 2.38V, 计算电池电压: 10.32V, 电量: 100%, 满电电压: 4.20V
I (1109) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (1209) Airhub1: ADC: 2377, 原始电压: 2.38V, 计算电池电压: 10.32V, 电量: 100%, 满电电压: 4.20V
I (1209) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (1329) Airhub1: ADC: 2376, 原始电压: 2.38V, 计算电池电压: 10.31V, 电量: 100%, 满电电压: 4.20V
I (1329) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (1429) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (1429) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (1529) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (1529) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (1649) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (1649) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (1749) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (1749) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (1869) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (1869) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (1939) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (1939) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (1969) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (1969) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (2069) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (2069) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (2169) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (2169) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (2269) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (2269) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (2369) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (2369) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (2469) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (2469) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (2569) Airhub1: ADC: 2375, 原始电压: 2.38V, 计算电池电压: 10.31V, 电量: 100%, 满电电压: 4.20V
I (2569) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (2669) Airhub1: ADC: 2375, 原始电压: 2.38V, 计算电池电压: 10.31V, 电量: 100%, 满电电压: 4.20V
I (2669) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (2769) Airhub1: ADC: 2375, 原始电压: 2.38V, 计算电池电压: 10.31V, 电量: 100%, 满电电压: 4.20V
I (2769) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (2939) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (2939) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (2959) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (2959) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (3059) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (3059) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (3059) AudioCodec: 将运行时输出音量设置为75
I (3059) Application: 设备启动完成,播放开机播报语音
I (3059) pp: pp rom version: e7ae62f
I (3059) net80211: net80211 rom version: e7ae62f
I (3069) wifi:wifi driver task: 3fcdc36c, prio:23, stack:6656, core=0
I (3069) wifi:wifi firmware version: bea31f3
I (3069) wifi:wifi certification version: v7.0
I (3069) wifi:config NVS flash: disabled
I (3069) wifi:config nano formatting: disabled
I (3069) wifi:Init data frame dynamic rx buffer num: 32
I (3069) wifi:Init dynamic rx mgmt buffer num: 5
I (3069) wifi:Init management short buffer num: 32
I (3069) wifi:Init static tx buffer num: 8
I (3069) wifi:Init tx cache buffer num: 32
I (3069) wifi:Init static tx FG buffer num: 2
I (3069) wifi:Init static rx buffer size: 1600
I (3069) wifi:Init static rx buffer num: 10
I (3069) wifi:Init dynamic rx buffer num: 32
I (3069) wifi_init: rx ba win: 16
I (3069) wifi_init: accept mbox: 6
I (3069) wifi_init: tcpip mbox: 32
I (3069) wifi_init: udp mbox: 6
I (3069) wifi_init: tcp mbox: 6
I (3069) wifi_init: tcp tx win: 5760
I (3069) wifi_init: tcp rx win: 5760
I (3069) wifi_init: tcp mss: 1440
I (3069) wifi_init: WiFi/LWIP prefer SPIRAM
I (3069) phy_init: phy_version 701,f4f1da3a,Mar 3 2025,15:50:10
I (3109) phy_init: Saving new calibration data due to checksum failure or outdated calibration data, mode(0)
I (3109) Application: 开始播放下行音频: 样本=960 采样率=16000
I (3119) wifi:mode : sta (d0:cf:13:03:bb:f0)
I (3129) wifi:enable tsf
I (5539) wifi: 发现可连接 AP: airhub, BSSID: 70:2a:d7:85:bc:eb, RSSI: -31, Channel: 1, Authmode: 3
I (5539) WifiBoard: Starting WiFi connection, playing network connection sound
W (5539) wifi:Password length matches WPA2 standards, authmode threshold changes from OPEN to WPA2
I (5639) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1, snd_ch_cfg:0x0
I (5639) wifi:state: init -> auth (0xb0)
I (5659) wifi:state: auth -> assoc (0x0)
I (5679) wifi:state: assoc -> run (0x10)
I (5709) wifi:connected with airhub, aid = 4, channel 1, BW20, bssid = 70:2a:d7:85:bc:eb
I (5709) wifi:security: WPA2-PSK, phy: bgn, rssi: -30
I (5709) wifi:pm start, type: 1
I (5709) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
I (5709) wifi:set rx beacon pti, rx_bcn_pti: 14, bcn_timeout: 25000, mt_pti: 14, mt_time: 10000
I (5719) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (5749) wifi:<ba-add>idx:0 (ifx:0, 70:2a:d7:85:bc:eb), tid:0, ssn:0, winSize:64
I (6839) Airhub1: 📤 设备状态上报已启用每30秒上报一次
I (9749) wifi: Got IP: 192.168.124.22
I (9749) esp_netif_handlers: sta ip: 192.168.124.22, mask: 255.255.255.0, gw: 192.168.124.1
I (10339) VolcRtcProtocol: 设置Agent配置参数: {"Config":{"WebSearchAgentConfig":{"ParamsString":"{\"bot_id\":\"7585449675889608233\",\"stream\":true,\"location_info\":{\"city\":\"广州市\"}}"}}}
I (10339) VolcRtcProtocol: VolcRtcProtocol 开始启动...
I (10339) VolcRtcProtocol: 使用配置文件中的设备名称: d0_cf_13_03_bb_f0
I (10339) VolcRtcProtocol: NVS凭证已加载secret=1 appid=1 device_name=d0_cf_13_03_bb_f0, free_heap=8230100
[INF|volc_rtc.c:597]volc_rtc_create: set param[0]: {"debug":{"log_to_console":1}}
[INF|volc_rtc.c:597]volc_rtc_create: set param[1]: {"audio":{"codec":{"internal":{"enable":1}}}}
[INF|volc_rtc.c:597]volc_rtc_create: set param[2]: {"rtc":{"access":{"concurrent_requests":1}}}
[INF|volc_rtc.c:597]volc_rtc_create: set param[3]: {"rtc":{"ice":{"concurrent_agents":1}}}
2026-03-24 16:18:55.587 [I] VolcEngineRTCLite.c:153 ****************** HELLO BOOKA (68f0bc7617b8520178bef12c)(1.57.207.001)(HASH-5c3aa20fe851886d21cede0115044e17c3ec8a67) ********************
2026-03-24 16:18:55.588 [I] VolcEngineRTCLite.c:158 Platform esp32s3
2026-03-24 16:18:55.588 [I] VolcEngineRTCLite.c:161 OsVersion FreeRTOS/unknown
2026-03-24 16:18:55.588 [I] VolcEngineRTCLite.c:164 CompilerInfo GCC/14.2.0
2026-03-24 16:18:55.589 [I] VolcEngineRTCLite.c:100 BOOKA_DEVICE_LOW_RESOURCE : ON
2026-03-24 16:18:55.589 [I] VolcEngineRTCLite.c:104 BOOKA_ENABLE_EVENT_REPORT : ON
2026-03-24 16:18:55.589 [I] VolcEngineRTCLite.c:108 ENABLE_G722_CODEC : ON
2026-03-24 16:18:55.590 [I] GlobalParams.c:232 pGlobalParams->configParams.rtc.access.concurrent_requests from 2 to 1
2026-03-24 16:18:55.590 [I] GlobalParams.c:233 pGlobalParams->configParams.rtc.ice.concurrent_agents from 2 to 1
2026-03-24 16:18:55.590 [I] GlobalParams.c:239 pGlobalParams->configParams.audio.codec.internal.enable from 0 to 1
2026-03-24 16:18:55.591 [I] GlobalParams.c:244 pGlobalParams->configParams.debug.log_to_console from 0 to 1
2026-03-24 16:18:55.591 [I] GlobalParams.c:247 pGlobalParams->configParams.rtc.root_path to .
2026-03-24 16:18:55.593 [E] Cache.c:273 operation returned status code: 0x00000009
2026-03-24 16:18:55.598 [E] SocketConnection-Lite.c:191 bind local ip failed
2026-03-24 16:18:55.601 [I] LiteResolver.c:213 start resolve rtc-log-service.volcvideo.com by sep thread
2026-03-24 16:18:55.604 [I] API byte_rtc_set_audio_codec engine 0x3c5340e0 audio_codec_type 4
2026-03-24 16:18:55.605 [I] Common.c:82 rtcAudioCodec2SdkAudioCodec codec 5
2026-03-24 16:18:55.606 [I] API byte_rtc_set_video_codec engine 0x3c5340e0 video_codec_type 0
I (10359) VolcRtcProtocol: RTC实例已准备就绪房间加入将在监听状态后执行
I (10359) Application: 🌐 开始初始化WebSocket协议...
I (10359) Application: 🔧 创建WebsocketProtocol实例
I (10359) Application: 🚀 启动WebSocket协议
I (10359) Application: ✅ WebSocket协议初始化完成
I (10359) VolcRtcProtocol: VolcRtcProtocol初始化任务已创建
I (10359) EspHttp: Opening HTTP connection to https://xiaozhi-dev-web.goods.fun/xiaozhi/ota/
I (10369) Application: 打印设置设备状态日志: idle
I (10379) AI_CHAT_UI: GIF表情切换: neutral
I (10379) Application: Entering idle state, playing standby sound
I (10389) WeatherApi: [AutoDetectAndSetLocation] 调用全局函数自动检测位置
I (10389) WeatherApi: [AutoDetectLocation] ===== 开始自动检测位置 =====
I (10389) WeatherApi: [AutoDetectLocation] 从NVS命中位置: '广州市',已更新默认城市
I (10389) WeatherApi: [AutoDetectLocation] ===== 位置检测完成 =====
I (10389) main_task: Returned from app_main()
2026-03-24 16:18:55.656 [I] LiteResolver.c:213 start resolve rtc-log-info.volcvideo.com by sep thread
2026-03-24 16:18:55.658 [I] LiteResolver.c:213 start resolve access.rtc.volcvideo.com by sep thread
I (10489) wifi:<ba-add>idx:1 (ifx:0, 70:2a:d7:85:bc:eb), tid:3, ssn:0, winSize:64
I (10699) esp-x509-crt-bundle: Certificate validated
I (11259) Ota: HTTP response status code: 0
I (11259) Ota: Server role: , Device role: RTC_Test
W (11259) Ota: Role mismatch (Device:RTC_Test vs Server:), upgrade denied
W (11259) Ota: ✗ Upgrade conditions not met - Role: ✗, Version check: skipped
I (11259) Ota: Running partition: ota_0
2026-03-25 00:18:56.724 [E] Cache.c:311 operation returned status code: 0x00000009
2026-03-25 00:18:56.942 [I] IceAgent.c:2533 cur nominatedCandidatePair local 192.168.124.22:0 remote 59.38.99.250:443 state ICE_CANDIDATE_PAIR_STATE_SUCCEEDED
I (12939) Airhub1: ADC: 2374, 原始电压: 2.37V, 计算电池电压: 10.30V, 电量: 100%, 满电电压: 4.20V
I (12939) BluetoothMAC: Bluetooth MAC Address: d0:cf:13:03:bb:f2
I (17189) Airhub1: BOOT长按3秒切换设备模式
I (17189) Airhub1: AI模式 → 吧唧模式
I (17199) DeviceMode: 模式切换为 吧唧,即将重启...
I (17699) wifi:state: run -> init (0x0)
I (17699) wifi:pm stop, total sleep time: 7184443 us / 11986157 us
I (17699) wifi:<ba-del>idx:0, tid:0
I (17699) wifi:<ba-del>idx:1, tid:3
I (17699) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1, snd_ch_cfg:0x0
I (17699) wifi: Reconnecting airhub (attempt 1 / 5)
I (17739) wifi:flush txq
I (17739) wifi:stop sw txq
I (17739) wifi:lmac stop hw txq
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x2b (SPI_FAST_FLASH_BOOT)
Saved PC:0x40379ccd
--- 0x40379ccd: esp_restart_noos at /Users/rdzleo/esp/esp-idf/v5.4.2/esp-idf/components/esp_system/port/soc/esp32s3/system_internal.c:162
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2820,len:0x56c
load:0x403c8700,len:0x4
load:0x403c8704,len:0xb88
load:0x403cb700,len:0x2df4
entry 0x403c88f4
I (47) WeatherApi: 初始化天气API配置 - 默认城市: 北京
I (48) WeatherApi: WiFi位置缓存限制已设置为: 5 条
I (48) coexist: coex firmware version: 7b9a184
I (48) coexist: coexist rom version e7ae62f
I (49) main_task: Started on CPU0
I (59) main_task: Calling app_main()
I (79) Application: 🎴 吧唧模式:跳过 WiFi/协议/音频初始化
I (79) Application: 打印设置设备状态日志: idle
I (79) BluetoothProvisioning: 蓝牙配网对象创建完成
I (79) button: IoT Button Version: 3.5.0
I (79) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (79) button: IoT Button Version: 3.5.0
I (79) gpio: GPIO[4]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (79) Airhub1: Initializing I2C master bus for audio codec...
I (79) Airhub1: Scanning I2C bus for devices...
I (79) Airhub1: I2C设备在线: 0x18
E (79) i2c.master: I2C transaction unexpected nack detected
E (79) i2c.master: s_i2c_synchronous_transaction(945): I2C transaction failed
E (79) i2c.master: i2c_master_receive(1261): I2C transaction failed
E (79) i2c.master: I2C transaction unexpected nack detected
E (79) i2c.master: s_i2c_synchronous_transaction(945): I2C transaction failed
E (79) i2c.master: i2c_master_receive(1261): I2C transaction failed
I (79) Airhub1: I2C设备在线: 0x40
I (79) Airhub1: I2C scan completed. Found 2 devices
I (79) DZBJ: 开始初始化显示硬件...
I (79) gpio: GPIO[7]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (79) st77916: LCD panel create success, version: 1.0.1
W (209) st77916: The 3Ah command has been used and will be overwritten by external initialization sequence
I (329) LCD: LCD GRAM cleared (black filled)
I (329) DZBJ: LCD 硬件初始化完成
I (329) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2
I (329) gpio: GPIO[6]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (729) CST816S: IC id: 182
I (729) LCD: Touch controller initialized successfully
I (729) LVGL: Starting LVGL task
I (729) LCD: LVGL buffer: 14400 bytes (W:360, Lines:20, DMA, single)
I (729) LCD: Touch controller added to LVGL
I (729) DZBJ: LVGL 初始化完成
I (729) DZBJ: UI 初始化完成
I (829) DZBJ: 背光已点亮dzbj 显示模块初始化完成
I (829) Airhub1: 🎴 电子吧唧模式启动
I (829) Airhub1: 初始化吧唧模式按钮...
I (829) Airhub1: Boot button initialized on GPIO0
I (829) Airhub1: 吧唧模式按钮初始化完成
I (829) Airhub1: 初始化电子吧唧模式外设...
I (939) FATFS: SPIFFS: Total size: 2763761, Used: 78061
I (989) IMG_LIST: 开始扫描SPIFFS中的图片文件
I (989) IMG_LIST: 发现图片文件: 03.jpg
I (989) IMG_LIST: 发现图片文件: 02.jpg
I (989) IMG_LIST: 发现图片文件: default.jpg
I (1039) IMG_LIST: 图片列表初始化完成,共发现 3 张图片
I (1039) IMG_LIST: 设置默认图片索引: 2
I (1039) gpio: GPIO[4]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:2
I (1039) DZBJ_BTN: 按键初始化完成 (KEY2=GPIO4BOOT由iot_button处理)
I (1039) DZBJ_BAT: ADC校准初始化成功
I (1039) DZBJ_BAT: 电池ADC初始化完成 (GPIO3, ADC1_CH2, 分压比=2)
I (1039) DZBJ_BAT: ADC原始值=2838, ADC电压=2372mV, 电池电压=4744mV, 电量=100%
I (1039) DZBJ_BAT: 电池监控任务已启动更新间隔5000ms
I (1039) BLE_INIT: BT controller compile version [6cfabcd]
I (1039) BLE_INIT: Feature Config, ADV:1, BLE_50:1, DTM:1, SCAN:1, CCA:0, SMP:1, CONNECT:1
I (1049) BLE_INIT: Bluetooth MAC: d0:cf:13:03:bb:f2
I (1049) phy_init: phy_version 701,f4f1da3a,Mar 3 2025,15:50:10
I (1079) phy_init: Saving new calibration data due to checksum failure or outdated calibration data, mode(0)
I (1149) DZBJ_BLE: GATT server register, status 0, app_id 0
I (1149) DZBJ_BLE: 图片传输服务创建成功,句柄: 28
I (1149) DZBJ_BLE: 图片写入特征创建成功,句柄: 42
I (1149) DZBJ_BLE: 图片编辑特征创建成功,句柄: 44
I (1149) DZBJ_BLE: BLE MAC: d0:cf:13:03:bb:f2
I (1149) DZBJ_BLE: 蓝牙设备名称: Airhub_d0:cf:13:03:bb:f2
I (1149) DZBJ_BLE: Advertising data set, status 0
I (1149) DZBJ_BLE: Scan response data set, status 0
I (1149) DZBJ_BLE: Advertising start successfully
I (1149) SLEEP: 休眠管理器初始化完成(超时=10s
I (1149) Airhub1: 电子吧唧模式初始化完成
I (1149) main_task: Returned from app_main()
I (6039) DZBJ_BAT: ADC原始值=2841, ADC电压=2375mV, 电池电压=4750mV, 电量=100%
I (11039) DZBJ_BAT: ADC原始值=2841, ADC电压=2375mV, 电池电压=4750mV, 电量=100%
I (14509) DZBJ_BLE: Connected, conn_id 0, remote 73:8f:af:0d:36:7a
I (14539) DZBJ_BLE: PHY update, status 0, tx_phy 1, rx_phy 1
I (14879) DZBJ_BLE: Connection params update, status 0, conn_int 12, latency 0, timeout 400
I (15039) DZBJ_BLE: Connection params update, status 0, conn_int 6, latency 0, timeout 500
I (15179) DZBJ_BLE: Connection params update, status 0, conn_int 12, latency 0, timeout 400
I (16039) DZBJ_BAT: ADC原始值=2839, ADC电压=2372mV, 电池电压=4744mV, 电量=100%
I (16329) DZBJ_BLE: PHY update, status 0, tx_phy 2, rx_phy 2
W (17429) BT_HCI: hcif disc complete: hdl 0x1, rsn 0x13 dev_find 1
I (17429) DZBJ_BLE: Disconnected, remote 73:8f:af:0d:36:7a, reason 0x13
I (17429) DZBJ_BLE: Advertising start successfully
I (21039) DZBJ_BAT: ADC原始值=2842, ADC电压=2376mV, 电池电压=4752mV, 电量=100%
I (881719) DZBJ_BLE: Disconnected, remote 9c:76:0e:47:1b:de, reason 0x13
I (881719) IMG_UI: 准备显示图片: face_1774344833.jpg, 路径: /spiflash/face_1774344833.jpg
I (881719) IMG_UI: 文件大小: 38679 字节
I (881719) DZBJ_BLE: Advertising start successfully
I (881939) IMG_UI: 图片解码成功,宽度: 360, 高度: 360
I (881939) IMG_UI: JPEG图片更新成功: face_1774344833.jpg
I (881939) IMG_LIST: BLE导航到ScreenImg显示: face_1774344833.jpg
I (886089) DZBJ_BAT: ADC原始值=2772, ADC电压=2320mV, 电池电压=4640mV, 电量=100%
I (891089) DZBJ_BAT: ADC原始值=2777, ADC电压=2324mV, 电池电压=4648mV, 电量=100%
I (893029) LVGL: Touch detected: x=251, y=223, count=1
I (893059) LVGL: Touch detected: x=250, y=223, count=1
I (893089) LVGL: Touch detected: x=236, y=222, count=1
I (893119) LVGL: Touch detected: x=210, y=219, count=1
I (893149) LVGL: Touch detected: x=170, y=213, count=1
I (893149) IMG_LIST: 切换到下一张图片,索引: 1/8
I (893149) IMG_UI: 准备显示图片: 03.jpg, 路径: /spiflash/03.jpg
I (893169) IMG_UI: 文件大小: 8805 字节
I (893169) IMG_UI: 释放之前的图片数据
I (893269) IMG_UI: 图片解码成功,宽度: 360, 高度: 360
I (893269) IMG_UI: JPEG图片更新成功: 03.jpg
I (893919) LVGL: Touch detected: x=251, y=187, count=1
I (893949) LVGL: Touch detected: x=250, y=187, count=1
I (893979) LVGL: Touch detected: x=241, y=187, count=1
I (894009) LVGL: Touch detected: x=216, y=187, count=1
I (894039) LVGL: Touch detected: x=151, y=190, count=1
I (894039) IMG_LIST: 切换到下一张图片,索引: 2/8
I (894039) IMG_UI: 准备显示图片: 02.jpg, 路径: /spiflash/02.jpg
I (894039) IMG_UI: 文件大小: 20498 字节
I (894039) IMG_UI: 释放之前的图片数据
I (894159) IMG_UI: 图片解码成功,宽度: 360, 高度: 360
I (894159) IMG_UI: JPEG图片更新成功: 02.jpg
I (894569) LVGL: Touch detected: x=262, y=196, count=1
I (894599) LVGL: Touch detected: x=248, y=196, count=1
I (894629) LVGL: Touch detected: x=216, y=196, count=1
I (894659) LVGL: Touch detected: x=169, y=194, count=1
I (894659) IMG_LIST: 切换到下一张图片,索引: 3/8
I (894659) IMG_UI: 准备显示图片: default.jpg, 路径: /spiflash/default.jpg
I (894659) IMG_UI: 文件大小: 47430 字节
I (894659) IMG_UI: 释放之前的图片数据
I (894829) IMG_UI: 图片解码成功,宽度: 360, 高度: 360
I (894829) IMG_UI: JPEG图片更新成功: default.jpg
I (895209) LVGL: Touch detected: x=256, y=200, count=1
I (895239) LVGL: Touch detected: x=253, y=200, count=1
I (895269) LVGL: Touch detected: x=238, y=200, count=1
I (895299) LVGL: Touch detected: x=205, y=198, count=1
I (895299) IMG_LIST: 切换到下一张图片,索引: 4/8
I (895299) IMG_UI: 准备显示图片: face_1772002032846.jpg, 路径: /spiflash/face_1772002032846.jpg
I (895319) IMG_UI: 文件大小: 987342 字节
I (895319) IMG_UI: 释放之前的图片数据
E (895719) FATFS: 不是有效JPEG文件: /spiflash/face_1772002032846.jpg
E (895719) IMG_UI: 图片解码失败,错误码: -1
I (896089) DZBJ_BAT: ADC原始值=2773, ADC电压=2321mV, 电池电压=4642mV, 电量=100%
I (899189) LVGL: Touch detected: x=311, y=196, count=1
I (899219) LVGL: Touch detected: x=307, y=196, count=1
I (899249) LVGL: Touch detected: x=291, y=196, count=1
I (899279) LVGL: Touch detected: x=255, y=196, count=1
I (899279) IMG_LIST: 切换到下一张图片,索引: 5/8
I (899279) IMG_UI: 准备显示图片: face_1774340638342.jpg, 路径: /spiflash/face_1774340638342.jpg
I (899279) IMG_UI: 文件大小: 70339 字节
I (899539) IMG_UI: 图片解码成功,宽度: 360, 高度: 360
I (899539) IMG_UI: JPEG图片更新成功: face_1774340638342.jpg
I (900279) LVGL: Touch detected: x=286, y=204, count=1
I (900309) LVGL: Touch detected: x=285, y=204, count=1
I (900339) LVGL: Touch detected: x=275, y=204, count=1
I (900369) LVGL: Touch detected: x=220, y=203, count=1
I (900369) IMG_LIST: 切换到下一张图片,索引: 6/8
I (900369) IMG_UI: 准备显示图片: face_1774340678141.jpg, 路径: /spiflash/face_1774340678141.jpg
I (900369) IMG_UI: 文件大小: 71774 字节
I (900369) IMG_UI: 释放之前的图片数据
I (900639) IMG_UI: 图片解码成功,宽度: 360, 高度: 360
I (900639) IMG_UI: JPEG图片更新成功: face_1774340678141.jpg
I (901089) DZBJ_BAT: ADC原始值=2754, ADC电压=2306mV, 电池电压=4612mV, 电量=100%
I (901109) LVGL: Touch detected: x=292, y=212, count=1
I (901139) LVGL: Touch detected: x=288, y=212, count=1
I (901169) LVGL: Touch detected: x=272, y=211, count=1
I (901199) LVGL: Touch detected: x=236, y=209, count=1
I (901199) IMG_LIST: 切换到下一张图片,索引: 7/8
I (901199) IMG_UI: 准备显示图片: face_1774344117.jpg, 路径: /spiflash/face_1774344117.jpg
I (901199) IMG_UI: 文件大小: 94251 字节
I (901199) IMG_UI: 释放之前的图片数据
E (901279) FATFS: 不是有效JPEG文件: /spiflash/face_1774344117.jpg
E (901279) IMG_UI: 图片解码失败,错误码: -1
I (902049) LVGL: Touch detected: x=333, y=214, count=1
I (902079) LVGL: Touch detected: x=331, y=214, count=1
I (902109) LVGL: Touch detected: x=318, y=214, count=1
I (902139) LVGL: Touch detected: x=288, y=214, count=1
I (902169) LVGL: Touch detected: x=210, y=214, count=1
I (902169) IMG_LIST: 切换到下一张图片,索引: 8/8
I (902169) IMG_UI: 准备显示图片: face_1774344833.jpg, 路径: /spiflash/face_1774344833.jpg
I (902169) IMG_UI: 文件大小: 38679 字节
I (902389) IMG_UI: 图片解码成功,宽度: 360, 高度: 360
I (902389) IMG_UI: JPEG图片更新成功: face_1774344833.jpg
I (906089) DZBJ_BAT: ADC原始值=2763, ADC电压=2312mV, 电池电压=4624mV, 电量=100%

View File

@ -915,15 +915,15 @@ void pages_cleanup_gif(void) {
#endif // LV_USE_GIF
// 更新ui_ImgBle控件的图片支持 JPEG
void update_ui_ImgBle(const char *img_name) {
bool update_ui_ImgBle(const char *img_name) {
if(!img_name) {
ESP_LOGE("IMG_UI", "图片名为空");
return;
return false;
}
if(!ui_ImgBle) {
ESP_LOGE("IMG_UI", "ui_ImgBle控件不存在");
return;
return false;
}
static uint8_t *ui_img_data = NULL;
@ -937,7 +937,7 @@ void update_ui_ImgBle(const char *img_name) {
struct stat file_stat;
if(stat(img_path, &file_stat) != 0) {
ESP_LOGE("IMG_UI", "文件不存在: %s", img_path);
return;
return false;
}
ESP_LOGI("IMG_UI", "文件大小: %ld 字节", file_stat.st_size);
@ -961,13 +961,13 @@ void update_ui_ImgBle(const char *img_name) {
FILE *gif_file = fopen(img_path, "rb");
if (!gif_file) {
ESP_LOGE("IMG_UI", "GIF文件打开失败: %s", img_path);
return;
return false;
}
gif_psram_buf = heap_caps_malloc(file_stat.st_size, MALLOC_CAP_SPIRAM);
if (!gif_psram_buf) {
ESP_LOGE("IMG_UI", "PSRAM分配失败: %ld 字节", file_stat.st_size);
fclose(gif_file);
return;
return false;
}
fread(gif_psram_buf, 1, file_stat.st_size, gif_file);
fclose(gif_file);
@ -978,13 +978,14 @@ void update_ui_ImgBle(const char *img_name) {
ESP_LOGE("IMG_UI", "gifdec 打开失败: %s", img_name);
free(gif_psram_buf);
gif_psram_buf = NULL;
return;
return false;
}
// 启动自定义 GIF 播放器Palette LUT + 双缓冲流水线)
gif_player_start();
ESP_LOGI("IMG_UI", "GIF显示启动(优化): %s", img_name);
return true;
} else
#endif // LV_USE_GIF
{
@ -1017,7 +1018,7 @@ void update_ui_ImgBle(const char *img_name) {
if(ui_img_data == NULL) {
ESP_LOGE("IMG_UI", "解码数据为空");
return;
return false;
}
// 配置图片数据
@ -1034,9 +1035,12 @@ void update_ui_ImgBle(const char *img_name) {
lvgl_port_unlock();
ESP_LOGI("IMG_UI", "JPEG图片更新成功: %s", img_name);
return true;
} else {
ESP_LOGE("IMG_UI", "图片解码失败,错误码: %d", ret);
ui_img_data = NULL;
return false;
}
}
return false;
}

View File

@ -24,7 +24,7 @@ void free_spiffs_image_list(void); // 重置图片列表
bool set_image_index_by_name(const char *name); // 根据文件名设置当前图片索引
const char* get_next_image(void); // 获取下一张图片
const char* get_prev_image(void); // 获取上一张图片
void update_ui_ImgBle(const char *img_name); // 更新ui_ImgBle控件的图片
bool update_ui_ImgBle(const char *img_name); // 更新ui_ImgBle控件的图片成功返回true
void ble_image_navigate(const char *filename); // BLE接收后导航到ScreenImg显示
void ble_image_navigate_with_data(const char *filename, uint8_t *data, size_t data_size); // BLE接收后直通显示跳过SPIFFS重读

View File

@ -9,7 +9,7 @@
#include "esp_log.h" // 用于日志输出
extern void init_spiffs_image_list(void);
extern void update_ui_ImgBle(const char *img_name);
extern bool update_ui_ImgBle(const char *img_name);
extern void free_spiffs_image_list(void);
extern const char* get_next_image(void);
extern const char* get_prev_image(void);
@ -124,16 +124,22 @@ lv_indev_wait_release(lv_indev_get_act());
}
if ( event_code == LV_EVENT_GESTURE && lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_LEFT ) {
lv_indev_wait_release(lv_indev_get_act());
// 解码失败时自动跳过,最多尝试全部图片避免死循环
for(int try = 0; try < 10; try++) {
const char *next_img = get_next_image();
if(next_img) {
update_ui_ImgBle(next_img);
if(!next_img) break;
if(update_ui_ImgBle(next_img)) break;
ESP_LOGW("ScreenImg", "跳过无效图片,继续下一张");
}
}
if ( event_code == LV_EVENT_GESTURE && lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_RIGHT ) {
lv_indev_wait_release(lv_indev_get_act());
// 解码失败时自动跳过,最多尝试全部图片避免死循环
for(int try = 0; try < 10; try++) {
const char *prev_img = get_prev_image();
if(prev_img) {
update_ui_ImgBle(prev_img);
if(!prev_img) break;
if(update_ui_ImgBle(prev_img)) break;
ESP_LOGW("ScreenImg", "跳过无效图片,继续上一张");
}
}
}

View File

@ -21,7 +21,7 @@ extern lv_obj_t *ui_ImageDel;
extern lv_obj_t *ui_ImageReturn;
extern void init_spiffs_image_list(void);
extern void update_ui_ImgBle(const char *img_name);
extern bool update_ui_ImgBle(const char *img_name);
extern void free_spiffs_image_list(void);
extern const char* get_next_image(void);
extern const char* get_prev_image(void);