}
}
+static const char *test_print_wifi_security_type(connection_wifi_security_type_e type)
+{
+ switch (type) {
+ case CONNECTION_WIFI_SECURITY_TYPE_NONE:
+ return "None";
+ case CONNECTION_WIFI_SECURITY_TYPE_WEP:
+ return "WEP";
+ case CONNECTION_WIFI_SECURITY_TYPE_WPA_PSK:
+ return "WPA_PSK";
+ case CONNECTION_WIFI_SECURITY_TYPE_WPA2_PSK:
+ return "WPA2_PSK";
+ case CONNECTION_WIFI_SECURITY_TYPE_EAP:
+ return "EAP";
+ case CONNECTION_WIFI_SECURITY_TYPE_SAE:
+ return "SAE";
+ default:
+ return "Unknown";
+ }
+}
+
static const char *test_print_cellular_service_type(connection_cellular_service_type_e type)
{
switch (type) {
CONNECTION_ERROR_NONE)
printf("Fail to get cellular service type!\n");
- printf("[%s]",
+ printf(" [%s]",
test_print_cellular_service_type(service_type));
+ } else if (profile_type == CONNECTION_PROFILE_TYPE_WIFI) {
+ connection_wifi_security_type_e security_type;
+ if (connection_profile_get_wifi_security_type(
+ profile_h, &security_type) !=
+ CONNECTION_ERROR_NONE)
+ printf("Fail to get wifi security type!\n");
+
+ printf(" [%s]",
+ test_print_wifi_security_type(security_type));
}
printf("\n");
if (connection_profile_get_wifi_security_type(profile, &security_type) != CONNECTION_ERROR_NONE)
printf("Fail to get Wi-Fi security type!\n");
else
- printf("Wi-Fi security type : %d\n", security_type);
+ printf("Wi-Fi security type : %s\n", test_print_wifi_security_type(security_type));
if (connection_profile_get_wifi_encryption_type(profile, &encryption_type) != CONNECTION_ERROR_NONE)
printf("Fail to get Wi-Fi encryption type!\n");
if (connection_profile_get_wifi_security_type(profile, &security_type) != CONNECTION_ERROR_NONE)
printf("Fail to get Mesh security type!\n");
else
- printf("Mesh security type : %d\n", security_type);
+ printf("Mesh security type : %s\n", test_print_wifi_security_type(security_type));
if (connection_profile_is_wifi_passphrase_required(profile, &pass_required) != CONNECTION_ERROR_NONE)
printf("Fail to get Mesh passphrase required!\n");