- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
when call wiced_network_up( WICED_STA_INTERFACE, WICED_USE_EXTERNAL_DHCP_SERVER, NULL ) don' t return success
I want to start a timer period call wiced_network_up( WICED_STA_INTERFACE, WICED_USE_EXTERNAL_DHCP_SERVER, NULL ) until join ap code
wiced_rtos_register_timed_event( &poll_event, WICED_HARDWARE_IO_WORKER_THREAD, &poll_dameon,10000, 0 );
wiced_result_t poll_dameon (void* arg )
{
if(wiced_network_up( WICED_STA_INTERFACE, WICED_USE_EXTERNAL_DHCP_SERVER, NULL )==WICED_SUCCESS)
{
wiced_rtos_deregister_timed_event(poll_event);
}
}
but this code can't work normal.
- Labels:
-
SPI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When no AP exists, wiced_network_up() takes more than 20 seconds.
So you should change timer value to 30~ seconds I think.
By default, wiced_network_up() tries connecting 3 times.
You can change also WICED_JOIN_RETRY_ATTEMPTS to 1 defined in wiced_defaults.h
I hope this resolves the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi dmiya,
Thank you ! I change timer value to 30 seconds and set retry value 1,when the second run wiced_network_up(),the system will die and reboot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using WICED_HARDWARE_IO_WORKER_THREAD causes this issue.
Please try again after replacing it to WICED_NETWORKING_WORKER_THREAD.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi dmiya,
Thank you !!!,It is ok. can you tell me the reason of reboot ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, but I don't know. Maybe stack size is too small.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are correct Daisuke. The hardware worker thread has a very small stack by default which will overflow if wiced_network_up() is called from within its context.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please create a new discussion if there is still a question here.