esp32c3 使用softap 配网 进入死循环问题

suki1213
Posts: 20
Joined: Wed May 29, 2024 3:24 am

esp32c3 使用softap 配网 进入死循环问题

Postby suki1213 » Mon Dec 02, 2024 7:13 am

在代码中我选择了 WIFI_PROV_SECURITY_1 进行配网
wifi_prov_security_t security = WIFI_PROV_SECURITY_1;
const char *pop = "abcd1234";
wifi_prov_security1_params_t *sec_params = pop;
ESP_ERROR_CHECK(wifi_prov_mgr_start_provisioning(security, (const void *) sec_params, service_name, service_key));


在触发WIFI_PROV_CRED_RECV事件 并打印Wi-Fi相关信息之后 没有在往下进行 app的现象是第三步一直转圈 始终无法连接成功

在menuconfig中将log登记设置为debug时 发现 接收完Wi-Fi名称和密码之后 一直会重复打印一段http的相关日志 一下是debug日志输出的内容 :
59:28.967532 D (74565) httpd: httpd_process_session: processing socket 57
59:28.968530 D (74565) httpd_sess: httpd_sess_process: httpd_req_new
59:28.979056 D (74565) httpd_txrx: httpd_recv_with_opt: requested length = 128
59:28.984055 D (74575) httpd_txrx: httpd_recv_with_opt: received length = 128
59:28.989050 D (74585) httpd_parse: read_block: received HTTP request block size = 128
59:28.995563 D (74585) httpd_parse: cb_url: message begin
59:29.000560 D (74595) httpd_parse: cb_url: processing url = /prov-config
59:29.006061 D (74595) httpd_parse: verify_url: received URI = /prov-config
59:29.011793 D (74605) httpd_parse: cb_header_field: headers begin
59:29.017418 D (74605) httpd_txrx: httpd_unrecv: length = 100
59:29.017918 D (74615) httpd_parse: pause_parsing: paused
59:29.022417 D (74615) httpd_parse: cb_header_field: processing field = Accept
59:29.033919 D (74625) httpd_txrx: httpd_recv_with_opt: requested length = 128
59:29.039422 D (74635) httpd_txrx: httpd_recv_with_opt: pending length = 100
59:29.044942 D (74635) httpd_parse: read_block: received HTTP request block size = 100
59:29.050444 D (74645) httpd_parse: continue_parsing: skip pre-parsed data of size = 7
59:29.055943 D (74655) httpd_parse: continue_parsing: un-paused
59:29.061543 D (74655) httpd_parse: cb_header_value: processing value = text/plain
59:29.067417 D (74665) httpd_parse: cb_header_field: processing field = Content-type
59:29.078456 D (74665) httpd_parse: cb_header_value: processing value = application/x-www-form-urlencoded
59:29.083455 D (74675) httpd_parse: cb_header_field: processing field = Cookie
59:29.089456 D (74685) httpd_parse: cb_header_value: processing value = session=2416751418
59:29.094810 D (74695) httpd_parse: cb_header_field: processing field = Use
59:29.100310 D (74695) httpd_parse: parse_block: parsed block size = 100
59:29.106310 D (74705) httpd_txrx: httpd_recv_with_opt: requested length = 128
59:29.117018 D (74705) httpd_txrx: httpd_recv_with_opt: received length = 128
59:29.122518 D (74715) httpd_parse: read_block: received HTTP request block size = 128
59:29.128518 D (74725) httpd_parse: cb_header_field: processing field = r-Agent
59:29.139215 D (74725) httpd_parse: cb_header_value: processing value = Dalvik/2.1.0 (Linux; U; Android 14; 2106118C Build/UKQ1.231207.002)
59:29.145215 D (74735) httpd_parse: cb_header_field: processing field = Host
59:29.150225 D (74745) httpd_parse: cb_header_value: processing value = 192.168.4.1
59:29.156234 D (74755) httpd_parse: cb_header_field: processing field = Connection
59:29.167235 D (74755) httpd_parse: cb_header_value: processing value = Keep-Alive
59:34.597097 D (80185) httpd_parse: cb_header_field: processing field = Accept-
59:34.602609 D (80195) httpd_parse: parse_block: parsed block size = 228
59:34.608109 D (80205) httpd_txrx: httpd_recv_with_opt: requested length = 128
59:34.613609 D (80205) httpd_txrx: httpd_recv_with_opt: received length = 39
59:34.619573 D (80215) httpd_parse: read_block: received HTTP request block size = 39
59:34.624849 D (80215) httpd_parse: cb_header_field: processing field = Encoding
59:34.630351 D (80225) httpd_parse: cb_header_value: processing value = gzip
59:34.641583 D (80235) httpd_parse: cb_header_field: processing field = Content-Length
59:34.647066 D (80235) httpd_parse: cb_header_value: processing value = 2
59:34.652748 D (80245) httpd_parse: cb_headers_complete: bytes read = 295
59:34.658248 D (80255) httpd_parse: cb_headers_complete: content length = 2
59:34.669367 D (80255) event: no handlers have been registered for event ESP_HTTP_SERVER_EVENT:3 posted to loop 0x3fc9a888
59:34.669754 D (80265) httpd_txrx: httpd_unrecv: length = 2
59:34.674766 D (80275) httpd_parse: pause_parsing: paused
59:34.680194 D (80275) httpd_parse: cb_on_body: body begins
59:34.686195 D (80275) httpd_parse: httpd_parse_req: parsing complete
59:34.691694 D (80285) httpd_uri: httpd_uri: request for /prov-config with type 3
59:34.697203 D (80295) httpd_uri: httpd_find_uri_handler: [0] = /proto-ver
59:34.702717 D (80295) httpd_uri: httpd_find_uri_handler: [1] = /prov-session
59:34.708351 D (80305) httpd_uri: httpd_find_uri_handler: [2] = /prov-config
59:34.713851 D (80305) protocomm_httpd: Received cookie session=2416751418
59:34.719350 D (80315) protocomm_httpd: Continuing Session 2416751418
59:34.724848 D (80325) httpd_txrx: httpd_req_recv: remaining length = 2
59:34.730367 D (80325) httpd_txrx: httpd_recv_with_opt: requested length = 2
59:34.736367 D (80335) httpd_txrx: httpd_recv_with_opt: pending length = 2
59:34.741366 D (80335) httpd_txrx: httpd_req_recv: received length = 2
59:34.752742 D (80345) event: no handlers have been registered for event ESP_HTTP_SERVER_EVENT:5 posted to loop 0x3fc9a888
59:34.758194 D (80355) WiFiProvConfig: In wifi_prov_config_command_dispatcher Cmd=0
59:34.763694 D (80355) WiFiProvConfig: Enter cmd_get_status_handler
59:34.769194 D (80365) wifi_prov_handlers: Got state : connecting
59:34.775348 D (80375) httpd_txrx: httpd_send_all: sent = 61
59:34.780279 D (80375) httpd_txrx: httpd_send_all: sent = 2
59:34.791783 D (80375) event: no handlers have been registered for event ESP_HTTP_SERVER_EVENT:4 posted to loop 0x3fc9a888
59:34.797066 D (80385) httpd_txrx: httpd_send_all: sent = 6
59:34.802569 D (80395) event: no handlers have been registered for event ESP_HTTP_SERVER_EVENT:6 posted to loop 0x3fc9a888
59:34.808070 D (80405) httpd_sess: httpd_sess_process: httpd_req_delete
59:34.813661 D (80405) httpd_sess: httpd_sess_process: success
59:34.819698 D (80415) httpd: httpd_server: doing select maxfd+1 = 58

以上日志会一直打印 直到复位 复位之后 配网 还是会出现

求解 :?: :?: :?:

Who is online

Users browsing this forum: Google Adsense [Bot] and 99 guests