*/
int wifi_ap_get_essid(wifi_ap_h ap, char** essid);
+/**
+ * @brief Gets Raw SSID Bytes (Service Set Identifier).
+ * @since_tizen 3.0
+ * @remarks You must release @a ssid using free().
+ * @param[in] ap The access point handle
+ * @param[out] ssid The Raw SSID Bytes
+ * @param[out] ssid_len The Raw SSID Length
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #WIFI_ERROR_NOT_SUPPORTED Not supported
+ */
+int wifi_ap_get_raw_ssid(wifi_ap_h ap, char** ssid, int *ssid_len);
+
/**
* @brief Gets BSSID (Basic Service Set Identifier).
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
return WIFI_ERROR_NONE;
}
+EXPORT_API int wifi_ap_get_raw_ssid(wifi_ap_h ap, char** ssid, int *ssid_len)
+{
+#if defined TIZEN_TV
+ CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+ if (_wifi_libnet_check_ap_validity(ap) == false || ssid == NULL ||
+ ssid_len == NULL) {
+ WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+ return WIFI_ERROR_INVALID_PARAMETER;
+ }
+
+ net_profile_info_t *profile_info = ap;
+ *ssid = g_try_malloc0(profile_info->ProfileInfo.Wlan.ssid_len);
+ if (*ssid == NULL) {
+ WIFI_LOG(WIFI_ERROR, "Out of memory");
+ return WIFI_ERROR_OUT_OF_MEMORY;
+ }
+
+ *ssid_len = profile_info->ProfileInfo.Wlan.ssid_len;
+ memcpy(*ssid, profile_info->ProfileInfo.Wlan.ssid, *ssid_len);
+
+ WIFI_LOG(WIFI_INFO, "Wi-Fi ssid_len [%d]\n", *ssid_len);
+ return WIFI_ERROR_NONE;
+#else
+ return WIFI_ERROR_NOT_SUPPORTED;
+#endif
+}
+
EXPORT_API int wifi_ap_get_bssid(wifi_ap_h ap, char** bssid)
{
CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
/* Basic info */
printf("ESSID : %s\n", ap_name);
+#if defined TIZEN_TV
+ if (wifi_ap_get_raw_ssid(ap, &str_value, &int_value) == WIFI_ERROR_NONE) {
+ int i;
+ printf("Raw SSID : ");
+ for (i = 0; i < int_value; i++) {
+ printf("%02x", str_value[i]);
+ }
+ printf("\n");
+ g_free(str_value);
+ } else
+ printf("Fail to get SSID\n");
+#endif
+
if (wifi_ap_get_bssid(ap, &str_value) == WIFI_ERROR_NONE) {
printf("BSSID : %s\n", str_value);
g_free(str_value);