Sometimes wiced_network_up() fails to start AP

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

cross mob
Not applicable

Test on SDK-3.1.1/FreeRTOS+LwIP/on 4390.

My device is running as AP.

Sometimes the device fails to boot due to wiced_network_up() fails.

result = wiced_network_up(WICED_AP_INTERFACE, WICED_USE_INTERNAL_DHCP_SERVER, &ap_ip_settings);

wiced_network_up() returns 2 (TIMEOUT)

  ->wwd_wifi_start_ap() returns 2 (TIMEOUT)

    -> wwd_wifi_ap_init() returns 2

My debug code shows it fails in below lines:

151     CHECK_RETURN_WITH_SEMAPHORE( wwd_management_set_event_handler( apsta_events, wwd_handle_apsta_event, NULL, WWD_AP_INTERFACE ), &wwd_wifi_sleep    _flag );


153     /* Set AP mode */

154     data = (uint32_t*) wwd_sdpcm_get_ioctl_buffer( &buffer, (uint16_t) 4 );

155     CHECK_IOCTL_BUFFER_WITH_SEMAPHORE( data, &wwd_wifi_sleep_flag );

156     *data = 1; /* Turn on AP */

157     CHECK_RETURN_WITH_SEMAPHORE( wwd_sdpcm_send_ioctl( SDPCM_SET, WLC_SET_AP, buffer, 0, WWD_AP_INTERFACE ), &wwd_wifi_sleep_flag );

I did retry a few times, then

The first error happens at line 151.

The second retry still fails at line 157.

The third time retry hang up completely... (It passes line 151, then hang up)

Just hit reset button a few times to test this issue, it's pretty easy to reproduce this problem.

Generally, the boot failure rate is about 1/6.

2 Replies
50 sign-ins 25 sign-ins 25 comments on KBA

Sent Private Message on this.

Not applicable

I encountered the same Problem, however my device always fails to set up the network (TIMEOUT). Even while using sample snippets.

My SDK Version is 2.4.1, I'm using ThreadX/NetX and the device is an ACKme AMW004 Module.

How did you solve this Problem?

@ gangi: How are private Messages supposed to help others finding a solution? 😉