Merge pull request #8241 from SeppoTakalo/fix_wifi_connect_params_fail

Fix WIFI_CONNECT_PARAMS_CHANNEL_FAIL testcase.
pull/7948/head
Cruz Monrreal 2018-10-08 10:16:37 -05:00 committed by GitHub
commit 15879f5273
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,8 @@ void wifi_connect_params_channel_fail(void)
return; return;
} }
nsapi_error_t error = wifi->connect(MBED_CONF_APP_WIFI_SECURE_SSID, MBED_CONF_APP_WIFI_PASSWORD, get_security(), MBED_CONF_APP_WIFI_CH_UNSECURE); uint8_t wrong_channel = 1 + (MBED_CONF_APP_WIFI_CH_SECURE%10);
nsapi_error_t error = wifi->connect(MBED_CONF_APP_WIFI_SECURE_SSID, MBED_CONF_APP_WIFI_PASSWORD, get_security(), wrong_channel);
TEST_ASSERT(error == NSAPI_ERROR_CONNECTION_TIMEOUT || error == NSAPI_ERROR_NO_CONNECTION); TEST_ASSERT(error == NSAPI_ERROR_CONNECTION_TIMEOUT || error == NSAPI_ERROR_NO_CONNECTION);
wifi->set_channel(0); wifi->set_channel(0);