Storing and setting ssid/passphrase information in sdk 3.0.1

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

cross mob
Anonymous
Not applicable

What is the replacement/equivalent of the functions wiced_dct_read_wifi_config_section and wiced_dct_write_wifi_config_section in sdk 3.0.1? These functions are listed as depreciated in the API.

0 Likes
4 Replies
Anonymous
Not applicable

It appears that the new method is to use

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

to get a pointer to the flash file, directly write, and then call

wiced_dct_read_unlock( wifi_config, WICED_TRUE ) to release it.

0 Likes
Anonymous
Not applicable

This isn't actually working for me.  After attempting to configure a new SSID and passphrase, it appears that the dict hasn't changed; I just get:

Joining : YOUR_AP_SSID

Failed to join: YOUR_AP_SSID

My code is:

            if (wiced_dct_read_lock( (void**) &wifi_config, WICED_TRUE, DCT_WIFI_CONFIG_SECTION, 0, sizeof(platform_dct_wifi_config_t) ) == WICED_SUCCESS)

            {

                WPRINT_APP_INFO(("read dct\n"));

                strncpy((char*)&wifi_config_dct_local.stored_ap_list[0].details.SSID.val, info.pointer1, MAX_SSID_LEN);

                wifi_config_dct_local.stored_ap_list[0].details.security = new_security_type;

                memcpy((char*)wifi_config_dct_local.stored_ap_list[0].security_key, new_ssid, MAX_PASSPHRASE_LEN);

                wifi_config_dct_local.stored_ap_list[0].security_key_length = strlen(new_security_key);

                if(wiced_dct_read_unlock( wifi_config, WICED_TRUE ) == WICED_SUCCESS){

                     wiced_init();

                    WPRINT_APP_INFO(("new credentials configured\n"));

                }else{

                    WPRINT_APP_INFO(("credential config failed\n"));

                }

            }

0 Likes

Capture.JPGHave a look at this function:wifi_join() in apps/test/console/wifi/


int wifi_join(char* ssid, wiced_security_t auth_type, uint8_t* key, uint16_t key_length, char* ip, char* netmask, char* gateway)


0 Likes
GregG_16
Employee
Employee
50 sign-ins 25 sign-ins 25 comments on KBA

Is this still an issue for you? Also, we have a new SDK Broadcom WICED Software Development Kit 3.1.0

0 Likes