int wifi_manager_cancel_wps(wifi_manager_h wifi);
/**
+ * @brief Gets the WPS generated PIN code.
+ * @since_tizen 5.0
+ * @remarks You must release @a wps_pin using free().
+ * @param[in] wifi The Wi-Fi handle
+ * @param[out] wps_pin The WPS PIN
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_MANAGER_ERROR_NONE Successful
+ * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported
+ */
+int wifi_manager_get_wps_generated_pin(wifi_manager_h wifi, char **wps_pin);
+
+/**
* @brief Deletes the information of a stored access point and disconnects from it if it was connected to.
* @details If an AP is connected to, then connection information will be stored.
* This information is used when a connection to that AP is established automatically.
return 1;
}
+int test_wifi_manager_get_wps_generated_pin(void)
+{
+ int rv = 0;
+ char *wps_pin = NULL;
+
+ rv = wifi_manager_get_wps_generated_pin(wifi, &wps_pin);
+ if (rv != WIFI_MANAGER_ERROR_NONE) {
+ printf("wifi_manager_get_wps_generated_pin() is failed [%s]\n", __test_convert_error_to_string(rv));
+ return -1;
+ }
+ printf("Generaged pin number is [%s]\n", wps_pin);
+ g_free(wps_pin);
+ return 1;
+}
+
int test_wifi_manager_set_autoscan_state(void)
{
int autoscan = 0;
printf("F - Set IP conflict detection mode\n");
printf("G - Get IP conflict detection mode\n");
printf("H - Get IP conflict state\n");
+ printf("I - Get generated PIN number\n");
/* Extension APIs */
printf(LOG_BLUE "[Extension API]\n" LOG_END);
- printf("I - Set Enable or Disable Auto Scan\n");
- printf("J - Set Mode of Auto Scan\n");
- printf("K - Get Enable or Disable Auto Scan\n");
- printf("L - Get Mode of Auto Scan\n");
- printf("M - Flush BSS\n");
- printf("N - Set enable or disable auto connect\n");
- printf("O - Get enable or disable auto connect\n");
- printf("P - Set enable or disable of Wi-Fi profile auto-connect\n");
- printf("Q - Get enable or disable of Wi-Fi profile auto-connect\n");
- printf("R - Set the IP conflict detection period\n");
- printf("S - Get the IP conflict detection period\n");
- printf("T - Netlink Scan Normal/Specific-AP\n");
- printf("U - Get passpoint state\n");
- printf("V - Set passpoint on/off\n");
+ printf("J - Set Enable or Disable Auto Scan\n");
+ printf("K - Set Mode of Auto Scan\n");
+ printf("L - Get Enable or Disable Auto Scan\n");
+ printf("M - Get Mode of Auto Scan\n");
+ printf("N - Flush BSS\n");
+ printf("O - Set enable or disable auto connect\n");
+ printf("P - Get enable or disable auto connect\n");
+ printf("Q - Set enable or disable of Wi-Fi profile auto-connect\n");
+ printf("R - Get enable or disable of Wi-Fi profile auto-connect\n");
+ printf("S - Set the IP conflict detection period\n");
+ printf("T - Get the IP conflict detection period\n");
+ printf("U - Netlink Scan Normal/Specific-AP\n");
+ printf("V - Get passpoint state\n");
+ printf("W - Set passpoint on/off\n");
printf(LOG_RED "0 - Exit \n" LOG_END);
printf("ENTER - Show options menu.......\n");
case 'H':
rv = test_wifi_manager_get_ip_conflict_state();
break;
-/* Extension APIs */
case 'I':
- rv = test_wifi_manager_set_autoscan_state();
+ rv = test_wifi_manager_get_wps_generated_pin();
break;
+
+/* Extension APIs */
case 'J':
- rv = test_wifi_manager_set_autoscan_mode();
+ rv = test_wifi_manager_set_autoscan_state();
break;
case 'K':
- rv = test_wifi_manager_get_autoscan_state();
+ rv = test_wifi_manager_set_autoscan_mode();
break;
case 'L':
- rv = test_wifi_manager_get_autoscan_mode();
+ rv = test_wifi_manager_get_autoscan_state();
break;
case 'M':
- rv = test_wifi_manager_flush_bss();
+ rv = test_wifi_manager_get_autoscan_mode();
break;
case 'N':
- rv = test_wifi_manager_set_auto_connect();
+ rv = test_wifi_manager_flush_bss();
break;
case 'O':
- rv = test_wifi_manager_get_auto_connect();
+ rv = test_wifi_manager_set_auto_connect();
break;
case 'P':
- rv = test_wifi_manager_set_ap_auto_connect();
+ rv = test_wifi_manager_get_auto_connect();
break;
case 'Q':
- rv = test_wifi_manager_get_ap_auto_connect();
+ rv = test_wifi_manager_set_ap_auto_connect();
break;
case 'R':
- rv = test_wifi_manager_set_ip_conflict_period();
+ rv = test_wifi_manager_get_ap_auto_connect();
break;
case 'S':
- rv = test_wifi_manager_get_ip_conflict_period();
+ rv = test_wifi_manager_set_ip_conflict_period();
break;
case 'T':
- rv = test_wifi_manager_netlink_scan();
+ rv = test_wifi_manager_get_ip_conflict_period();
break;
case 'U':
- rv = test_wifi_manager_get_passpoint_state();
+ rv = test_wifi_manager_netlink_scan();
break;
case 'V':
+ rv = test_wifi_manager_get_passpoint_state();
+ break;
+ case 'W':
rv = test_wifi_manager_set_passpoint_enable();
break;
default: