【WIFI连接失败】直接写死wifi配置,连接失败
Posted: Sun Sep 24, 2023 8:58 am
用的官方例程,modbus tcp master链接的wifi_connect.c:
CONFIG_EXAMPLE_WIFI_SSID_PWD_FROM_STDIN是 not set
CONFIG_EXAMPLE_WIFI_SSID是我的手机热点名字
CONFIG_EXAMPLE_WIFI_PASSWORD是我的手机热点密码
CONFIG_EXAMPLE_WIFI_CONN_MAX_RETRY=6
CONFIG_EXAMPLE_WIFI_SCAN_METHOD_FAST is not set
CONFIG_EXAMPLE_WIFI_SCAN_METHOD_ALL_CHANNEL=y
CONFIG_EXAMPLE_WIFI_SCAN_RSSI_THRESHOLD是-127
CONFIG_EXAMPLE_WIFI_AUTH_OPEN=1
错误码是201,对应NO_AP_FOUND,但我试过连接路由器的wifi,手机的wifi都是这个错,信号很好啊,非常奇怪,求解答
- wifi_config_t wifi_config = {
- .sta = {
- #if !CONFIG_EXAMPLE_WIFI_SSID_PWD_FROM_STDIN
- .ssid = CONFIG_EXAMPLE_WIFI_SSID,
- .password = CONFIG_EXAMPLE_WIFI_PASSWORD,
- #endif
- .scan_method = EXAMPLE_WIFI_SCAN_METHOD,
- .sort_method = EXAMPLE_WIFI_CONNECT_AP_SORT_METHOD,
- .threshold.rssi = CONFIG_EXAMPLE_WIFI_SCAN_RSSI_THRESHOLD,
- .threshold.authmode = EXAMPLE_WIFI_SCAN_AUTH_MODE_THRESHOLD,
- },
- };
CONFIG_EXAMPLE_WIFI_SSID是我的手机热点名字
CONFIG_EXAMPLE_WIFI_PASSWORD是我的手机热点密码
CONFIG_EXAMPLE_WIFI_CONN_MAX_RETRY=6
CONFIG_EXAMPLE_WIFI_SCAN_METHOD_FAST is not set
CONFIG_EXAMPLE_WIFI_SCAN_METHOD_ALL_CHANNEL=y
CONFIG_EXAMPLE_WIFI_SCAN_RSSI_THRESHOLD是-127
CONFIG_EXAMPLE_WIFI_AUTH_OPEN=1
错误码是201,对应NO_AP_FOUND,但我试过连接路由器的wifi,手机的wifi都是这个错,信号很好啊,非常奇怪,求解答