在AP模式下,开启http_server显示图片的问题

超级小星星123
Posts: 11
Joined: Fri Oct 21, 2022 9:36 am

在AP模式下,开启http_server显示图片的问题

Postby 超级小星星123 » Thu Feb 23, 2023 8:16 am

在AP模式下,开启http_server显示图片的问题,将图片的编译路径写入CMakeLists.txt文件中

Code: Select all

idf_component_register(SRCS "main.c" "http_server.c" "mqtt_server.c"
                    INCLUDE_DIRS "."
                    EMBED_FILES "favicon.ico" "connect.html" "connect_bgc.png" "color.html")
但是有的图片可以显示,有的图片就显示不出来,是图片的原因还是需要配置其他的选项
会出现如下报错

Code: Select all

E (9969) file_server: Failed to stat file : /data/connect_bgc.png
W (9979) httpd_txrx: httpd_resp_send_err: 404 Not Found - File does not exist
W (9979) httpd_uri: httpd_uri: uri handler execution failed
E (11989) file_server: Failed to stat file : /data/connect_bgc.png
W (11989) httpd_txrx: httpd_resp_send_err: 404 Not Found - File does not exist
W (11999) httpd_uri: httpd_uri: uri handler execution failed
W (119719) httpd_txrx: httpd_sock_err: error in recv : 104
W (119719) httpd_txrx: httpd_sock_err: error in recv : 104
使用file_serving例程修改,使用IDF4.4.3
将图片格式从png转换为ico还是无法显示,原图片大小为700k,压缩后150k
Last edited by 超级小星星123 on Thu Feb 23, 2023 9:19 am, edited 3 times in total.

Who is online

Users browsing this forum: No registered users and 167 guests