Languages

Menu
Sites
Language
wifi_manager_scan() Invalid argument
 
1. Invoking the wifi_manager_scan() function results in an invalid error.
How shall I do it?
 
wifi_manager_scan() 함수를 호출하면 Invalid argument 오류가 발생합니다.
어떻게 하면 좋을 까요?
 
/**
 * called by _wifi_scan_finished_cb()
 */
static void _wifi_scan_found_ap(wifi_manager_ap_h ap, void *user_data)
{
afn_log("***** _wifi_scan_found_ap()---------------------------------");
}
/**
 * called by afn_wifi_manager_scan()
 */
void _wifi_scan_finished_cb(wifi_manager_error_e error_code, void *user_data)
{
afn_log("***** _wifi_scan_finished_cb() -------------------------------------");
error_code = wifi_manager_foreach_found_ap(wifi_manager, (wifi_manager_found_ap_cb)_wifi_scan_found_ap, user_data);
if (error_code != WIFI_MANAGER_ERROR_NONE){
afn_logv_error("***** _wifi_scan_finished_cb failed with error %s --------", get_error_message(error_code));
}
}
/**
 * Search for the surrounding wifi ap.
 */
int afn_wifi_manager_scan(void *user_data)
{
afn_log("***** afn_wifi_manager_scan() ------------------");
int ret = wifi_manager_scan(wifi_manager, (wifi_manager_scan_finished_cb)_wifi_scan_finished_cb, user_data);
if(ret!=WIFI_MANAGER_ERROR_NONE){
afn_logv_error("***** wifi manager scan is failed with %s ---", get_error_message(ret));
}
return ret;
}
 
2. wifi_manager_config_create() failed with error [-22] Invalid argument
 
Invoking the wifi_manager_config_create() function also generates an invalid error.
What's the problem?
 
Thank you.
 
wifi_manager_config_create() 함수를 호출하면 Invalid argument 오류가 발생합니다.
무슨 문제가 있는 걸까요?
 
감사합니다.
 
 
char *name = "name";
char *passphrase = "name1234";
wifi_manager_security_type_e security_type = WIFI_MANAGER_SECURITY_TYPE_WPA_PSK;
//Gets access point configuration handle.
int ret = wifi_manager_config_create(manager, name, passphrase, security_type, &wifi_config);
if(ret!=WIFI_MANAGER_ERROR_NONE){
afn_logv_error("***** wifi_manager_config_create() failed with error [%d] %s ------", ret, get_error_message(ret));
return;
}

Responses

1 Replies
GEUNSOO KIM

As the error message says, you'd better check your parameters again when you call the APIs.

I would recommend you double check the variables used as wifi manager parameter, whether they are created properly or not.

good luck.