cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

Anonymous
Not applicable

Is there a way to dynamically add AP's  to the DCT?

I want to do this at run time from a list that is obtained at runtime.

0 Likes
Reply
1 Solution
Anonymous
Not applicable

I ended up choosing to store the info in the application DCT area using DEFINE_APP_DCT and manage it myself, perhaps I'll change to this approach later.

View solution in original post

0 Likes
Reply
2 Replies
Employee

Hello David,

Yes, you can dynamically add APs to the DCT, as in the following code in SDK\libraries\utilities\command_console\wifi\command_console_wifi.c.

You can test this by building and downloading test.console to your WICED board. Type in help in the terminal and it will give you a list of commands. The "join" command will let you type in the AP SSID, password, security type and it will store the info into the DCT.

To store multiple AP information you will have to extend the DCT either statically or store the AP information in the application section of the DCT. Then you could use your application to read this information and join the specific AP of your choice.

I hope this helps.

Thanks,

Jaeyoung

    /* Read config */

    wiced_dct_read_lock( (void**) &dct_wifi_config, WICED_TRUE, DCT_WIFI_CONFIG_SECTION, 0, sizeof(platform_dct_wifi_config_t) );

    /* Modify config */

    dct_wifi_config->stored_ap_list[0].details.SSID.length = strlen( ssid );

    strncpy((char*)dct_wifi_config->stored_ap_list[0].details.SSID.value, ssid, MAX_SSID_LEN);

    dct_wifi_config->stored_ap_list[0].details.security = auth_type;

    if ( ( auth_type & ENTERPRISE_ENABLED ) == 0 )

    {

        /* Save credentials for non-enterprise AP */

        memcpy((char*)dct_wifi_config->stored_ap_list[0].security_key, (char*)key, MAX_PASSPHRASE_LEN);

        dct_wifi_config->stored_ap_list[0].security_key_length = key_length;

    }

    /* Write config */

    wiced_dct_write( (const void*) dct_wifi_config, DCT_WIFI_CONFIG_SECTION, 0, sizeof(platform_dct_wifi_config_t) );

Anonymous
Not applicable

I ended up choosing to store the info in the application DCT area using DEFINE_APP_DCT and manage it myself, perhaps I'll change to this approach later.

View solution in original post

0 Likes
Reply