- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a Redbear Duo and want to clear and be sure device will not try to connect unconfigured networks.
Here the question that I asked at Redbear forums : Clear Wifi DCT - WICED (Broadcom/Cypress) - Discussion Forums
Current message that show unconfigured connect trial:
Joining : �����������������������������������������������������������������������������������������������������������������������������������������������������������������
Failed to join : ����������������������������������������������������������������������������������������������������������������������������������������������������������
I am using WICED SDK 5.0.1.
Solved! Go to Solution.
- Labels:
-
DCT
-
Wi-Fi Direct
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have modified the dct_read_write snip in WICED to clear the soft AP list of wifi_config_dct. The approach you followed appears correct.
I would suggest you lock the DCT before modifying it.
I have tried the application in CYW943907AEVAL1F EVK in WICED SDK 6.0.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How about this ?
static wiced_result_t config_at_worker_thread( void * arg )
{
platform_dct_wifi_config_t dct_wifi_config;
if (wiced_dct_read_with_copy( &dct_wifi_config, DCT_WIFI_CONFIG_SECTION, 0, sizeof(platform_dct_wifi_config_t) ) == WICED_SUCCESS) {
// dct_wifi_config.device_configured = WICED_FALSE;
memset(&dct_wifi_config, 0, sizeof(dct_wifi_config));
if (wiced_dct_write( &dct_wifi_config, DCT_WIFI_CONFIG_SECTION, 0, sizeof(platform_dct_wifi_config_t)) == WICED_SUCCESS) {
const configuration_entry_t app_config[] = { {0,0,0,0} };
r_ = wiced_configure_device( app_config );
if (r_) GW_PRINTF("wiced_configure_device() failed! r_=%d\n", r_);
r_ = wiced_rtos_set_event_flags(&app.events, GW_EVENT_CONFIG_FINISHED);
if (r_) GW_PRINTF("wiced_rtos_set_event_flags(GW_EVENT_CONFIG_FINISHED) failed! r_=%d\n", r_);
}
else GW_PRINTF("wiced_dct_write(dct_wifi_config.device_configured=false) failed! r_=%d\n", r_);
}
else GW_PRINTF("wiced_dct_read(dct_wifi_config) failed! r_=%d\n", r_);
return WICED_SUCCESS;
}
Simply with words:
- Get DCT
- Clear DCT
- Write DCT to back
- Run `wiced_configure_device()`
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Clearing all data was a wrong choice. Only clearing the stored AP list solves my problem. But, don't know this is a right answer.
static wiced_result_t config_at_worker_thread( void * arg )
{
platform_dct_wifi_config_t dct_wifi_config;
uint32_t i = 0;
if (wiced_dct_read_with_copy( &dct_wifi_config, DCT_WIFI_CONFIG_SECTION, 0, sizeof(platform_dct_wifi_config_t) ) == WICED_SUCCESS) {
dct_wifi_config.device_configured = WICED_FALSE;
for(i = 0; i < CONFIG_AP_LIST_SIZE; ++i) memset(&dct_wifi_config.stored_ap_list, 0, sizeof(wiced_config_ap_entry_t));
// memcpy(&dct_wifi_config.mac_address, &mac_address, sizeof(wiced_mac_t));
// dct_wifi_config.country_code = WICED_COUNTRY_TURKEY;
if (wiced_dct_write( &dct_wifi_config, DCT_WIFI_CONFIG_SECTION, 0, sizeof(platform_dct_wifi_config_t)) == WICED_SUCCESS) {
const configuration_entry_t app_config[] = { {0,0,0,0} };
r_ = wiced_configure_device( app_config );
if (r_) GW_PRINTF("wiced_configure_device() failed! r_=%d\n", r_);
r_ = wiced_rtos_set_event_flags(&app.events, GW_EVENT_CONFIG_FINISHED);
if (r_) GW_PRINTF("wiced_rtos_set_event_flags(GW_EVENT_CONFIG_FINISHED) failed! r_=%d\n", r_);
}
else GW_PRINTF("wiced_dct_write(dct_wifi_config.device_configured=false) failed! r_=%d\n", r_);
}
else GW_PRINTF("wiced_dct_read(dct_wifi_config) failed! r_=%d\n", r_);
return WICED_SUCCESS;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the answer. I don't have any eval board.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks