when wiced don't join ap,we call wiced_network_up( WICED_STA_INTERFACE, WICED_USE_EXTERNAL_DHCP_SERVER, NULL ) every 10 second using timer event,the app will di

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

cross mob
chch_2120956
Level 3
Level 3
First like received First like given

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.

0 Likes
8 Replies
Anonymous
Not applicable

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.

0 Likes

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.

0 Likes
Anonymous
Not applicable

Using WICED_HARDWARE_IO_WORKER_THREAD causes this issue.

Please try again after replacing it to WICED_NETWORKING_WORKER_THREAD.

Hi dmiya,

       Thank you !!!,It is ok. can you tell me the reason of reboot ?

0 Likes
Anonymous
Not applicable

Sorry, but I don't know. Maybe stack size is too small.

0 Likes
Anonymous
Not applicable

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.

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

Please create a new discussion if there is still a question here.

0 Likes