tripflex / wifi-captive-portal

Mongoose OS WiFi Captive Portal Library
https://forum.mongoose-os.com/discussion/2702/library-wifi-captive-portal-web-ui-list-ssids-test-configure-rpc-gzip-support
Other
24 stars 9 forks source link

Calling Wif-Scan fails #16

Closed gadget-man closed 5 years ago

gadget-man commented 5 years ago

When calling wifi.Scan from an iOS device using an RPC call, it usually fails the first time round:

[Jan 30 21:30:45.872] mgos_http_server.c:176 0x3ffbd73c HTTP connection from 192.168.4.2:51670 [Jan 30 21:30:46.014] mg_ssl_if_mbedtls.c:35 0x3ffcbdec ciphersuite: TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 [Jan 30 21:30:46.026] SW ECDH curve 3 [Jan 30 21:30:47.452] mgos_http_server.c:176 0x3ffdd598 HTTP connection from 192.168.4.2:51671 [Jan 30 21:30:47.504] mg_rpc.c:293 wifi.scan via HTTP 192.168.4.2:51671 [Jan 30 21:30:47.510] esp32_wifi.c:236 cur mode: 2 [Jan 30 21:30:47.515] esp32_wifi.c:196 WiFi mode: AP+STA [Jan 30 21:30:47.520] I (40603) wifi: station: c0:a6:00:21:33:ef leave, AID = 1, bss_flags is 134259 [Jan 30 21:30:47.527] I (40613) wifi: n:6 0, o:6 0, ap:6 1, sta:255 255, prof:6 [Jan 30 21:30:47.534] mgos_wifi.c:408 WiFi scan done, num_res -2 [Jan 30 21:30:47.560] I (40653) wifi: flush txq [Jan 30 21:30:47.563] I (40653) wifi: stop sw txq [Jan 30 21:30:47.567] I (40653) wifi: lmac stop hw txq [Jan 30 21:30:47.576] I (40663) wifi: mode : sta (30:ae:a4:8b:ae:54) + softAP (30:ae:a4:8b:ae:55) [Jan 30 21:30:47.594] mg_ssl_if_mbedtls.c:35 0x3ffcbdec mbedtls_ssl_flush_output() returned -78 (-0x004e) [Jan 30 21:30:47.603] mg_ssl_if_mbedtls.c:35 0x3ffcbdec mbedtls_ssl_write_record() returned -78 (-0x004e) [Jan 30 21:30:47.611] mg_ssl_if_mbedtls.c:35 0x3ffcbdec mbedtls_ssl_send_alert_message() returned -78 (-0x004e) [Jan 30 21:30:47.622] mgos_wifi.c:160 c0:a6:00:21:33:ef disconnected

tripflex commented 5 years ago

@needlerp okay so are you referring to the RPC Wifi.Scan or this actual library (which does make that call)? If it's an issue with Wifi.Scan then I think that should be addressed in that specific library which this one depends on

tripflex commented 5 years ago

Please try the new library: https://github.com/tripflex/captive-portal-wifi-stack

This one is going to be deprecated and will not be updated anymore