wiced_join_ap_specific ignores BSSID

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

cross mob
Anonymous
Not applicable

Hi

I am trying to use the following function to connect an emw3165 to a AP with static setup (no need to do a scan):

static int wifi_join_specific(wiced_interface_t interface, char* ssid, wiced_security_t auth_type, uint8_t* security_key, uint16_t key_length, char* bssid, char* channel, char* ip, char* netmask, char* gateway)

{

  wiced_network_config_t network_config;

    wiced_ip_setting_t static_ip_settings;

    wiced_scan_result_t ap;


    memset( &ap, 0, sizeof( ap ) );

    ap.SSID.length = strlen( ssid );

    memcpy( ap.SSID.value, ssid, ap.SSID.length );

    str_to_mac( bssid, &ap.BSSID );

    ap.channel = atoi( channel );

    ap.security = auth_type;

    ap.band = WICED_802_11_BAND_2_4GHZ;

    ap.bss_type = WICED_BSS_TYPE_ADHOC;

    if ( !( NULL_MAC(ap.BSSID.octet) ) && wiced_join_ap_specific( &ap, key_length, security_key ) == WWD_SUCCESS )

    {

        /* Tell the network stack to setup it's interface */

        if (ip == NULL )

        {

            network_config = WICED_USE_EXTERNAL_DHCP_SERVER;

        }

        else

        {

            network_config = WICED_USE_STATIC_IP;

            str_to_ip( ip,      &static_ip_settings.ip_address );

            str_to_ip( netmask, &static_ip_settings.netmask );

            str_to_ip( gateway, &static_ip_settings.gateway );

        }

        if ( wiced_ip_up( interface, network_config, &static_ip_settings ) == WICED_SUCCESS )

        {

            return WICED_SUCCESS;

        }

    }

    return WICED_ERROR;

}

There are two problems:

1) the function always returns WICED_SUCCESS even if the AP is down.

2) The BSSID of the connection (read out using wwd_wifi_get_ap_info) is sometimes changed to a random BSSID (always if the AP is down)

Any thoughts?

Regards

Jakob

0 Likes
2 Replies
Anonymous
Not applicable

Hey Jakob,

Can you try editing the default_wifi_config_dct.h file located under the include folder.

I am not sure if that will solve the problem, you could give it a try though.

Let us know if it works.

Best Regards,

AB

0 Likes
Anonymous
Not applicable

Hi,

There is no way to set a BSSID in the default_wifi_config_dct.h.

wiced_join_ap_specific just ignores the given BSSID.

I have tried to follow the call all the way down to the SDIO call and the BSSID is send all the way down.

The firmware on the 43362 just ignores it and makes a new one.

Hope you can help

Regards

Jakob

0 Likes