summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManeesh Jain <maneesh.jain@samsung.com>2015-03-26 16:29:11 +0530
committermaneesh jain <maneesh.jain@samsung.com>2015-03-26 04:01:32 -0700
commite05e687f38625b63d92ff3e0ff80ae0a052c9b36 (patch)
tree1a70b4ab4c46355c18d03f9d328292d337eed9d8
parentfd9a46a00658da68f0abed185d87428a497d8d95 (diff)
downloadwifi-e05e687f38625b63d92ff3e0ff80ae0a052c9b36.tar.gz
wifi-e05e687f38625b63d92ff3e0ff80ae0a052c9b36.tar.bz2
wifi-e05e687f38625b63d92ff3e0ff80ae0a052c9b36.zip
[wifi-capi]: Add test case for WPS Feature
Change-Id: Id2e06ec612219a7c6ffd78455ccc156a93188d9c Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
-rw-r--r--packaging/capi-network-wifi.spec2
-rw-r--r--test/wifi_test.c22
2 files changed, 22 insertions, 2 deletions
diff --git a/packaging/capi-network-wifi.spec b/packaging/capi-network-wifi.spec
index ef36ff3..375968b 100644
--- a/packaging/capi-network-wifi.spec
+++ b/packaging/capi-network-wifi.spec
@@ -1,6 +1,6 @@
Name: capi-network-wifi
Summary: Network Wi-Fi library in TIZEN C API
-Version: 0.1.2_26
+Version: 0.1.2_27
Release: 1
Group: System/Network
License: Apache-2.0
diff --git a/test/wifi_test.c b/test/wifi_test.c
index 7a5a792..2640e89 100644
--- a/test/wifi_test.c
+++ b/test/wifi_test.c
@@ -304,7 +304,27 @@ static bool __test_found_connect_wps_callback(wifi_ap_h ap, void *user_data)
}
if (strstr(ap_name, ap_name_part) != NULL) {
- rv = wifi_connect(ap, __test_connected_callback, NULL);
+ int user_sel;
+ char pin[32] = {0,};
+
+ printf("%s - Input WPS method (1:PBC, 2:PIN) :\n", ap_name);
+ rv = scanf("%9d", &user_sel);
+
+ switch (user_sel) {
+ case 1:
+ rv = wifi_connect_by_wps_pbc(ap, __test_connected_callback, NULL);
+ break;
+ case 2:
+ printf("Input PIN code :\n");
+ rv = scanf("%31s", pin);
+ rv = wifi_connect_by_wps_pin(ap, pin, __test_connected_callback, NULL);
+ break;
+ default:
+ printf("Invalid input!\n");
+ g_free(ap_name);
+ return false;
+ }
+
if (rv != WIFI_ERROR_NONE)
printf("Fail to connection request [%s] : %s\n", ap_name, __test_convert_error_to_string(rv));
else