int int_value;
wifi_connection_state_e conn_state;
wifi_ip_config_type_e ip_type;
+ wifi_proxy_type_e proxy_type;
+ wifi_security_type_e sec_type;
+ wifi_encryption_type_e enc_type;
+ wifi_eap_type_e eap_type;
+ wifi_eap_auth_type_e eap_auth_type;
bool bool_value;
char *ap_bssid_part = (char*)user_data;
} else
printf("Fail to get Gateway\n");
+ if (wifi_ap_get_proxy_type(ap, &proxy_type) == WIFI_ERROR_NONE)
+ printf("Proxy type : %d\n", proxy_type);
+ else
+ printf("Fail to get Proxy type\n");
+
+ if (wifi_ap_get_proxy_address(ap, WIFI_ADDRESS_FAMILY_IPV4, &str_value) == WIFI_ERROR_NONE) {
+ printf("Proxy : %s\n", str_value);
+ g_free(str_value);
+ } else
+ printf("Fail to get Proxy\n");
+
+ if (wifi_ap_get_dns_address(ap, 1, WIFI_ADDRESS_FAMILY_IPV4, &str_value) == WIFI_ERROR_NONE) {
+ printf("DNS1 : %s\n", str_value);
+ g_free(str_value);
+ } else
+ printf("Fail to get DNS1\n");
+
+ if (wifi_ap_get_dns_address(ap, 2, WIFI_ADDRESS_FAMILY_IPV4, &str_value) == WIFI_ERROR_NONE) {
+ printf("DNS2 : %s\n", str_value);
+ g_free(str_value);
+ } else
+ printf("Fail to get DNS2\n");
+
+ /* Security info */
+ if (wifi_ap_get_security_type(ap, &sec_type) == WIFI_ERROR_NONE)
+ printf("Security type : %d\n", sec_type);
+ else
+ printf("Fail to get Security type\n");
+
+ if (wifi_ap_get_encryption_type(ap, &enc_type) == WIFI_ERROR_NONE)
+ printf("Encryption type : %d\n", enc_type);
+ else
+ printf("Fail to get Encryption type\n");
+
+ if (wifi_ap_is_passphrase_required(ap, &bool_value) == WIFI_ERROR_NONE)
+ printf("Passphrase required : %s\n", bool_value ? "TRUE" : "FALSE");
+ else
+ printf("Fail to get Passphrase required\n");
+
+ if (wifi_ap_is_wps_supported(ap, &bool_value) == WIFI_ERROR_NONE)
+ printf("WPS supported : %s\n", bool_value ? "TRUE" : "FALSE");
+ else
+ printf("Fail to get WPS supported\n");
+
+ if (sec_type != WIFI_SECURITY_TYPE_EAP) {
+ g_free(ap_bssid);
+ return false;
+ }
+
+ /* EAP info */
+ if (wifi_ap_get_eap_type(ap, &eap_type) == WIFI_ERROR_NONE)
+ printf("EAP type : %d\n", eap_type);
+ else
+ printf("Fail to get EAP type\n");
+
+ if (wifi_ap_get_eap_auth_type(ap, &eap_auth_type) == WIFI_ERROR_NONE)
+ printf("EAP auth type : %d\n", eap_auth_type);
+ else
+ printf("Fail to get EAP auth type\n");
+
+ if (wifi_ap_get_eap_passphrase(ap, &str_value, &bool_value) == WIFI_ERROR_NONE) {
+ printf("EAP user name : %s\n", str_value);
+ printf("EAP is password setted : %s\n", bool_value ? "TRUE" : "FALSE");
+ g_free(str_value);
+ } else
+ printf("Fail to get EAP passphrase(user name/password)\n");
+
+ if (wifi_ap_get_eap_ca_cert_file(ap, &str_value) == WIFI_ERROR_NONE) {
+ printf("EAP ca cert file : %s\n", str_value);
+ g_free(str_value);
+ } else
+ printf("Fail to get EAP ca cert file\n");
+
+ if (wifi_ap_get_eap_client_cert_file(ap, &str_value) == WIFI_ERROR_NONE) {
+ printf("EAP client cert file : %s\n", str_value);
+ g_free(str_value);
+ } else
+ printf("Fail to get EAP client cert file\n");
+
+ if (wifi_ap_get_eap_private_key_file(ap, &str_value) == WIFI_ERROR_NONE) {
+ printf("EAP private key file : %s\n", str_value);
+ g_free(str_value);
+ } else
+ printf("Fail to get EAP private key file\n");
+
g_free(ap_bssid);
return false;
}
printf("Wifi init succeeded\n");
return 1;
}
-
+
int test_wifi_deinit(void)
{
int rv = 0;