How to connect to a Hidden Access Point

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

My project is having a problem connecting to hidden networks.

The normal API flow is wiced_network_up() which calls wiced_wifi_join() which calls either wiced_wifi_join_specific() or wiced_wifi_join() depending on whether the MAC address is known.

We don't know the MAC address of the access point so the code will go the wiced_wifi_join() route, which makes sense I think.

But even that API call asks for the security type which we don't know.

This information is unknown because hidden networks show up with a null string in the ssid field for the wiced's wifi scan. So if there are X hidden networks in the vicinity, how does one figure out which MAC address to choose? You don't know which one is the right one simply from the generic wifi scan.

I'm not entirely well-versed on WiFi but my understanding is that for hidden networks there is a "direct-scan" which takes form as a probe-request that includes the ssid. The network that has that ssid should reply with a probe-response.

How is this done in Wiced? How do I go about joining a hidden network when the user only provides me with the ssid and key?

0 Likes
1 Solution
JoYi_1844281
Level 6
Level 6
100 sign-ins 100 replies posted 50 likes received

You could call wwd_wifi_scan() and pass the SSID which you want join to get the scan result of AP with specified SSID,

Then you got the security type of hidden SSID!

View solution in original post

3 Replies
JoYi_1844281
Level 6
Level 6
100 sign-ins 100 replies posted 50 likes received

You could call wwd_wifi_scan() and pass the SSID which you want join to get the scan result of AP with specified SSID,

Then you got the security type of hidden SSID!

Anonymous
Not applicable

Thank you for the help.

The correct call is wiced_wifi_scan() that allows for many optional modifications of the scan.

We were using wiced_wifi_scan_networks() which is the simple but more restricted call.

0 Likes
Anonymous
Not applicable

If you could accept to modify wifi.c placed in <WICED-SDK>/Wiced/internal/,

following code let you use wiced_wifi_scan_networks() with SSID.

-----

     return handler_user_data;

}

- wiced_result_t wiced_wifi_scan_networks( wiced_scan_result_handler_t results_handler, void* user_data )

+ wiced_result_t wiced_wifi_scan_networks( wiced_ssid_t *ssid, wiced_scan_result_handler_t results_handler, void* user_data )

{

     static internal_scan_handler_t scan_handler;

     wiced_result_t result;

...

     scan_result_ptr->scan_complete = WICED_FALSE;

     scan_result_ptr->user_data = user_data;

-     if (wiced_wifi_scan( WICED_SCAN_TYPE_ACTIVE, WICED_BSS_TYPE_ANY, NULL, NULL, chlist, &extparam, scan_result_handler, (wiced_scan_result_t**) &scan_result_ptr, &scan_handler ) != WICED_SUCCESS)

+     if (wiced_wifi_scan( WICED_SCAN_TYPE_ACTIVE, WICED_BSS_TYPE_ANY, ssid, NULL, chlist, &extparam, scan_result_handler, (wiced_scan_result_t**) &scan_result_ptr, &scan_handler ) != WICED_SUCCESS)

     {

         goto error_with_result_ptr;

     }

-----

wiced_wifi.h also needs to be modified as well.

*Note: This modification causes some build error on existing application including sample code

0 Likes