- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Labels:
-
SPI
- Tags:
- api
- passphrase
- sdk 3.0
- sdk 3.0.1
- ssid
- wiced_dct_read
- wiced_dct_read_wifi_config
- wiced_dct_write
- wiced_dct_write_wifi_config
- wifi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"));
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have 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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is this still an issue for you? Also, we have a new SDK Broadcom WICED Software Development Kit 3.1.0