printf("Wi-Fi wps supported : %s\n", wps_supported ? "true" : "false");
}
+static void test_print_mesh_info(connection_profile_h profile)
+{
+ char *essid = NULL;
+ char *bssid = NULL;
+ int rssi = 0;
+ int frequency = 0;
+ connection_wifi_security_type_e security_type;
+ bool pass_required = false;
+
+ if (connection_profile_get_wifi_essid(profile, &essid) != CONNECTION_ERROR_NONE)
+ printf("Fail to get Mesh essid!\n");
+ else {
+ printf("Mesh essid : %s\n", essid);
+ g_free(essid);
+ }
+
+ if (connection_profile_get_wifi_bssid(profile, &bssid) != CONNECTION_ERROR_NONE)
+ printf("Fail to get Mesh bssid!\n");
+ else {
+ printf("Mesh bssid : %s\n", bssid);
+ g_free(bssid);
+ }
+
+ if (connection_profile_get_wifi_rssi(profile, &rssi) != CONNECTION_ERROR_NONE)
+ printf("Fail to get Mesh rssi!\n");
+ else
+ printf("Mesh rssi : %d\n", rssi);
+
+ if (connection_profile_get_wifi_frequency(profile, &frequency) != CONNECTION_ERROR_NONE)
+ printf("Fail to get Mesh frequency!\n");
+ else
+ printf("Mesh frequency : %d\n", frequency);
+
+ 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);
+
+ if (connection_profile_is_wifi_passphrase_required(profile, &pass_required) != CONNECTION_ERROR_NONE)
+ printf("Fail to get Mesh passphrase required!\n");
+ else
+ printf("Mesh passphrase required : %s\n", pass_required ? "true" : "false");
+}
+
static void test_print_network_info(connection_profile_h profile, connection_address_family_e address_family)
{
char *interface_name = NULL;
case CONNECTION_PROFILE_TYPE_ETHERNET:
if (test_update_network_info(profile) == -1)
return -1;
- break;
+ break;
case CONNECTION_PROFILE_TYPE_BT:
printf("Not supported!\n");
/* fall through */
default:
+ {
+ int profile_type = prof_type;
+ if (profile_type == CONNECTION_PROFILE_TYPE_MESH) {
+ if (test_update_wifi_info(profile) == -1)
+ return -1;
+ break;
+ }
+ }
return -1;
}
printf("Profile Type : Bluetooth\n");
break;
default:
+ {
+ int profile_type = prof_type;
+ if (profile_type == CONNECTION_PROFILE_TYPE_MESH) {
+ printf("Profile Type : Mesh\n");
+ test_print_mesh_info(profile);
+ break;
+ }
+ }
return -1;
}
printf("Profile Type : Bluetooth\n");
break;
default:
+ {
+ int profile_type = prof_type;
+ if (profile_type == CONNECTION_PROFILE_TYPE_MESH) {
+ printf("Profile Type : Mesh\n");
+ test_print_mesh_info(profile);
+ break;
+ }
+ }
return -1;
}